/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */

//     Underscore.js 1.5.1
//     http://underscorejs.org
//     (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.

/**
 * @license RequireJS text 2.0.13+ Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */

//     (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
//     Backbone may be freely distributed under the MIT license.
//     For all details and documentation:
//     http://backbonejs.org

/*! jQuery UI - v1.12.1 - 2018-01-23
* http://jqueryui.com
* Includes: widget.js, keycode.js, unique-id.js, widgets/datepicker.js, widgets/progressbar.js, widgets/tabs.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

/*! jsTree - v3.3.5 - 2018-01-02 - (MIT) */

/*
 * SimpleModal @VERSION - jQuery Plugin
 * http://simplemodal.com/
 * Copyright (c) 2014 Eric Martin
 * Licensed under MIT and GPL
 * Date:
 */

/**
 * marked - a markdown parser
 * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
 * https://github.com/chjj/marked
 */

/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */

/*
Copyright 2012 Igor Vaynberg

Version: 3.5.2 Timestamp: Sat Nov  1 14:43:36 EDT 2014

This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.

You may obtain a copy of the Apache License and the GPL License at:

    http://www.apache.org/licenses/LICENSE-2.0
    http://www.gnu.org/licenses/gpl-2.0.html

Unless required by applicable law or agreed to in writing, software distributed under the
Apache License or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
the specific language governing permissions and limitations under the Apache License and the GPL License.
*/

/*
 * jQuery Iframe Transport Plugin
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/*! jQuery UI - v1.11.1 - 2014-09-17
* http://jqueryui.com
* Includes: widget.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */

/*!
 * jQuery UI Widget 1.11.1
 * http://jqueryui.com
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */

/*
 * jQuery File Upload Plugin
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/*
 * jQuery File Upload Processing Plugin
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2012, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/*
 * jQuery File Upload Validation Plugin
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2013, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

/*
 * jQuery File Upload User Interface Plugin
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */

!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function i(e,t,i){var n,r=(t=t||ae).createElement("script");if(r.text=e,i)for(n in we)i[n]&&(r[n]=i[n]);t.head.appendChild(r).parentNode.removeChild(r)}function n(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?he[pe.call(e)]||"object":typeof e}function r(e){var t=!!e&&"length"in e&&e.length,i=n(e);return!ve(e)&&!ye(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function s(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,i){return ve(t)?be.grep(e,function(e,n){return!!t.call(e,n,e)!==i}):t.nodeType?be.grep(e,function(e){return e===t!==i}):"string"!=typeof t?be.grep(e,function(e){return ue.call(t,e)>-1!==i}):be.filter(t,e,i)}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return be.each(e.match(je)||[],function(e,i){t[i]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,i,n){var r;try{e&&ve(r=e.promise)?r.call(e).done(t).fail(i):e&&ve(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}function h(){ae.removeEventListener("DOMContentLoaded",h),e.removeEventListener("load",h),be.ready()}function p(e,t){return t.toUpperCase()}function m(e){return e.replace(Fe,"ms-").replace(Xe,p)}function _(){this.expando=be.expando+_.uid++}function f(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ne.test(e)?JSON.parse(e):e)}function g(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(We,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=f(i)}catch(e){}Oe.set(e,t,i)}else i=void 0;return i}function v(e,t,i,n){var r,s,a=20,o=n?function(){return n.cur()}:function(){return be.css(e,t,"")},d=o(),l=i&&i[3]||(be.cssNumber[t]?"":"px"),c=(be.cssNumber[t]||"px"!==l&&+d)&&Be.exec(be.css(e,t));if(c&&c[3]!==l){for(d/=2,l=l||c[3],c=+d||1;a--;)be.style(e,t,c+l),(1-s)*(1-(s=o()/d||.5))<=0&&(a=0),c/=s;c*=2,be.style(e,t,c+l),i=i||[]}return i&&(c=+c||+d||0,r=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=l,n.start=c,n.end=r)),r}function y(e){var t,i=e.ownerDocument,n=e.nodeName,r=Ge[n];return r||(t=i.body.appendChild(i.createElement(n)),r=be.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ge[n]=r,r)}function w(e,t){for(var i,n,r=[],s=0,a=e.length;s<a;s++)(n=e[s]).style&&(i=n.style.display,t?("none"===i&&(r[s]=$e.get(n,"display")||null,r[s]||(n.style.display="")),""===n.style.display&&Re(n)&&(r[s]=y(n))):"none"!==i&&(r[s]="none",$e.set(n,"display",i)));for(s=0;s<a;s++)null!=r[s]&&(e[s].style.display=r[s]);return e}function b(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&s(e,t)?be.merge([e],i):i}function M(e,t){for(var i=0,n=e.length;i<n;i++)$e.set(e[i],"globalEval",!t||$e.get(t[i],"globalEval"))}function Y(e,t,i,r,s){for(var a,o,d,l,c,u,h=t.createDocumentFragment(),p=[],m=0,_=e.length;m<_;m++)if((a=e[m])||0===a)if("object"===n(a))be.merge(p,a.nodeType?[a]:a);else if(qe.test(a)){for(o=o||h.appendChild(t.createElement("div")),d=(Ue.exec(a)||["",""])[1].toLowerCase(),l=Ve[d]||Ve._default,o.innerHTML=l[1]+be.htmlPrefilter(a)+l[2],u=l[0];u--;)o=o.lastChild;be.merge(p,o.childNodes),(o=h.firstChild).textContent=""}else p.push(t.createTextNode(a));for(h.textContent="",m=0;a=p[m++];)if(r&&be.inArray(a,r)>-1)s&&s.push(a);else if(c=be.contains(a.ownerDocument,a),o=b(h.appendChild(a),"script"),c&&M(o),i)for(u=0;a=o[u++];)ze.test(a.type||"")&&i.push(a);return h}function L(){return!0}function k(){return!1}function T(){try{return ae.activeElement}catch(e){}}function D(e,t,i,n,r,s){var a,o;if("object"==typeof t){"string"!=typeof i&&(n=n||i,i=void 0);for(o in t)D(e,o,i,n,t[o],s);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=k;else if(!r)return e;return 1===s&&(a=r,(r=function(e){return be().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=be.guid++)),e.each(function(){be.event.add(this,t,r,n,i)})}function S(e,t){return s(e,"table")&&s(11!==t.nodeType?t:t.firstChild,"tr")?be(e).children("tbody")[0]||e:e}function x(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function C(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function H(e,t){var i,n,r,s,a,o,d,l;if(1===t.nodeType){if($e.hasData(e)&&(s=$e.access(e),a=$e.set(t,s),l=s.events)){delete a.handle,a.events={};for(r in l)for(i=0,n=l[r].length;i<n;i++)be.event.add(t,r,l[r][i])}Oe.hasData(e)&&(o=Oe.access(e),d=be.extend({},o),Oe.set(t,d))}}function j(e,t){var i=t.nodeName.toLowerCase();"input"===i&&Ke.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function Z(e,t,n,r){t=le.apply([],t);var s,a,o,d,l,c,u=0,h=e.length,p=h-1,m=t[0],_=ve(m);if(_||h>1&&"string"==typeof m&&!ge.checkClone&&at.test(m))return e.each(function(i){var s=e.eq(i);_&&(t[0]=m.call(this,i,s.html())),Z(s,t,n,r)});if(h&&(s=Y(t,e[0].ownerDocument,!1,e,r),a=s.firstChild,1===s.childNodes.length&&(s=a),a||r)){for(d=(o=be.map(b(s,"script"),x)).length;u<h;u++)l=s,u!==p&&(l=be.clone(l,!0,!0),d&&be.merge(o,b(l,"script"))),n.call(e[u],l,u);if(d)for(c=o[o.length-1].ownerDocument,be.map(o,C),u=0;u<d;u++)l=o[u],ze.test(l.type||"")&&!$e.access(l,"globalEval")&&be.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?be._evalUrl&&be._evalUrl(l.src):i(l.textContent.replace(ot,""),c,l))}return e}function P(e,t,i){for(var n,r=t?be.filter(t,e):e,s=0;null!=(n=r[s]);s++)i||1!==n.nodeType||be.cleanData(b(n)),n.parentNode&&(i&&be.contains(n.ownerDocument,n)&&M(b(n,"script")),n.parentNode.removeChild(n));return e}function J(e,t,i){var n,r,s,a,o=e.style;return(i=i||lt(e))&&(""!==(a=i.getPropertyValue(t)||i[t])||be.contains(e.ownerDocument,e)||(a=be.style(e,t)),!ge.pixelBoxStyles()&&dt.test(a)&&ct.test(t)&&(n=o.width,r=o.minWidth,s=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=i.width,o.width=n,o.minWidth=r,o.maxWidth=s)),void 0!==a?a+"":a}function F(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function X(e){if(e in ft)return e;for(var t=e[0].toUpperCase()+e.slice(1),i=_t.length;i--;)if((e=_t[i]+t)in ft)return e}function E(e){var t=be.cssProps[e];return t||(t=be.cssProps[e]=X(e)||e),t}function $(e,t,i){var n=Be.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function O(e,t,i,n,r,s){var a="width"===t?1:0,o=0,d=0;if(i===(n?"border":"content"))return 0;for(;a<4;a+=2)"margin"===i&&(d+=be.css(e,i+Qe[a],!0,r)),n?("content"===i&&(d-=be.css(e,"padding"+Qe[a],!0,r)),"margin"!==i&&(d-=be.css(e,"border"+Qe[a]+"Width",!0,r))):(d+=be.css(e,"padding"+Qe[a],!0,r),"padding"!==i?d+=be.css(e,"border"+Qe[a]+"Width",!0,r):o+=be.css(e,"border"+Qe[a]+"Width",!0,r));return!n&&s>=0&&(d+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-d-o-.5))),d}function N(e,t,i){var n=lt(e),r=J(e,t,n),s="border-box"===be.css(e,"boxSizing",!1,n),a=s;if(dt.test(r)){if(!i)return r;r="auto"}return a=a&&(ge.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===be.css(e,"display",!1,n))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(r=parseFloat(r)||0)+O(e,t,i||(s?"border":"content"),a,n,r)+"px"}function W(e,t,i,n,r){return new W.prototype.init(e,t,i,n,r)}function A(){vt&&(!1===ae.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(A):e.setTimeout(A,be.fx.interval),be.fx.tick())}function B(){return e.setTimeout(function(){gt=void 0}),gt=Date.now()}function Q(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=Qe[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function R(e,t,i){for(var n,r=(K.tweeners[t]||[]).concat(K.tweeners["*"]),s=0,a=r.length;s<a;s++)if(n=r[s].call(i,t,e))return n}function I(e,t,i){var n,r,s,a,o,d,l,c,u="width"in t||"height"in t,h=this,p={},m=e.style,_=e.nodeType&&Re(e),f=$e.get(e,"fxshow");i.queue||(null==(a=be._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,o=a.empty.fire,a.empty.fire=function(){a.unqueued||o()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,be.queue(e,"fx").length||a.empty.fire()})}));for(n in t)if(r=t[n],yt.test(r)){if(delete t[n],s=s||"toggle"===r,r===(_?"hide":"show")){if("show"!==r||!f||void 0===f[n])continue;_=!0}p[n]=f&&f[n]||be.style(e,n)}if((d=!be.isEmptyObject(t))||!be.isEmptyObject(p)){u&&1===e.nodeType&&(i.overflow=[m.overflow,m.overflowX,m.overflowY],null==(l=f&&f.display)&&(l=$e.get(e,"display")),"none"===(c=be.css(e,"display"))&&(l?c=l:(w([e],!0),l=e.style.display||l,c=be.css(e,"display"),w([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===be.css(e,"float")&&(d||(h.done(function(){m.display=l}),null==l&&(c=m.display,l="none"===c?"":c)),m.display="inline-block")),i.overflow&&(m.overflow="hidden",h.always(function(){m.overflow=i.overflow[0],m.overflowX=i.overflow[1],m.overflowY=i.overflow[2]})),d=!1;for(n in p)d||(f?"hidden"in f&&(_=f.hidden):f=$e.access(e,"fxshow",{display:l}),s&&(f.hidden=!_),_&&w([e],!0),h.done(function(){_||w([e]),$e.remove(e,"fxshow");for(n in p)be.style(e,n,p[n])})),d=R(_?f[n]:0,n,h),n in f||(f[n]=d.start,_&&(d.end=d.start,d.start=0))}}function G(e,t){var i,n,r,s,a;for(i in e)if(n=m(i),r=t[n],s=e[i],Array.isArray(s)&&(r=s[1],s=e[i]=s[0]),i!==n&&(e[n]=s,delete e[i]),(a=be.cssHooks[n])&&"expand"in a){s=a.expand(s),delete e[n];for(i in s)i in e||(e[i]=s[i],t[i]=r)}else t[n]=r}function K(e,t,i){var n,r,s=0,a=K.prefilters.length,o=be.Deferred().always(function(){delete d.elem}),d=function(){if(r)return!1;for(var t=gt||B(),i=Math.max(0,l.startTime+l.duration-t),n=1-(i/l.duration||0),s=0,a=l.tweens.length;s<a;s++)l.tweens[s].run(n);return o.notifyWith(e,[l,n,i]),n<1&&a?i:(a||o.notifyWith(e,[l,1,0]),o.resolveWith(e,[l]),!1)},l=o.promise({elem:e,props:be.extend({},t),opts:be.extend(!0,{specialEasing:{},easing:be.easing._default},i),originalProperties:t,originalOptions:i,startTime:gt||B(),duration:i.duration,tweens:[],createTween:function(t,i){var n=be.Tween(e,l.opts,t,i,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(n),n},stop:function(t){var i=0,n=t?l.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)l.tweens[i].run(1);return t?(o.notifyWith(e,[l,1,0]),o.resolveWith(e,[l,t])):o.rejectWith(e,[l,t]),this}}),c=l.props;for(G(c,l.opts.specialEasing);s<a;s++)if(n=K.prefilters[s].call(l,e,c,l.opts))return ve(n.stop)&&(be._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return be.map(c,R,l),ve(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),be.fx.timer(be.extend(d,{elem:e,anim:l,queue:l.opts.queue})),l}function U(e){return(e.match(je)||[]).join(" ")}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return Array.isArray(e)?e:"string"==typeof e?e.match(je)||[]:[]}function q(e,t,i,r){var s;if(Array.isArray(t))be.each(t,function(t,n){i||Ht.test(e)?r(e,n):q(e+"["+("object"==typeof n&&null!=n?t:"")+"]",n,i,r)});else if(i||"object"!==n(t))r(e,t);else for(s in t)q(e+"["+s+"]",t[s],i,r)}function ee(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,s=t.toLowerCase().match(je)||[];if(ve(i))for(;n=s[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function te(e,t,i,n){function r(o){var d;return s[o]=!0,be.each(e[o]||[],function(e,o){var l=o(t,i,n);return"string"!=typeof l||a||s[l]?a?!(d=l):void 0:(t.dataTypes.unshift(l),r(l),!1)}),d}var s={},a=e===At;return r(t.dataTypes[0])||!s["*"]&&r("*")}function ie(e,t){var i,n,r=be.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&be.extend(!0,e,n),e}function ne(e,t,i){for(var n,r,s,a,o=e.contents,d=e.dataTypes;"*"===d[0];)d.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in o)if(o[r]&&o[r].test(n)){d.unshift(r);break}if(d[0]in i)s=d[0];else{for(r in i){if(!d[0]||e.converters[r+" "+d[0]]){s=r;break}a||(a=r)}s=s||a}if(s)return s!==d[0]&&d.unshift(s),i[s]}function re(e,t,i,n){var r,s,a,o,d,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(s=c.shift();s;)if(e.responseFields[s]&&(i[e.responseFields[s]]=t),!d&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),d=s,s=c.shift())if("*"===s)s=d;else if("*"!==d&&d!==s){if(!(a=l[d+" "+s]||l["* "+s]))for(r in l)if((o=r.split(" "))[1]===s&&(a=l[d+" "+o[0]]||l["* "+o[0]])){!0===a?a=l[r]:!0!==l[r]&&(s=o[0],c.unshift(o[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+d+" to "+s}}}return{state:"success",data:t}}var se=[],ae=e.document,oe=Object.getPrototypeOf,de=se.slice,le=se.concat,ce=se.push,ue=se.indexOf,he={},pe=he.toString,me=he.hasOwnProperty,_e=me.toString,fe=_e.call(Object),ge={},ve=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ye=function(e){return null!=e&&e===e.window},we={type:!0,src:!0,noModule:!0},be=function(e,t){return new be.fn.init(e,t)},Me=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;be.fn=be.prototype={jquery:"3.3.1",constructor:be,length:0,toArray:function(){return de.call(this)},get:function(e){return null==e?de.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=be.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return be.each(this,e)},map:function(e){return this.pushStack(be.map(this,function(t,i){return e.call(t,i,t)}))},slice:function(){return this.pushStack(de.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:ce,sort:se.sort,splice:se.splice},be.extend=be.fn.extend=function(){var e,t,i,n,r,s,a=arguments[0]||{},o=1,d=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[o]||{},o++),"object"==typeof a||ve(a)||(a={}),o===d&&(a=this,o--);o<d;o++)if(null!=(e=arguments[o]))for(t in e)i=a[t],a!==(n=e[t])&&(l&&n&&(be.isPlainObject(n)||(r=Array.isArray(n)))?(r?(r=!1,s=i&&Array.isArray(i)?i:[]):s=i&&be.isPlainObject(i)?i:{},a[t]=be.extend(l,s,n)):void 0!==n&&(a[t]=n));return a},be.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==pe.call(e)||(t=oe(e))&&("function"!=typeof(i=me.call(t,"constructor")&&t.constructor)||_e.call(i)!==fe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){i(e)},each:function(e,t){var i,n=0;if(r(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Me,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(r(Object(e))?be.merge(i,"string"==typeof e?[e]:e):ce.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:ue.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,r=e.length;n<i;n++)e[r++]=t[n];return e.length=r,e},grep:function(e,t,i){for(var n=[],r=0,s=e.length,a=!i;r<s;r++)!t(e[r],r)!==a&&n.push(e[r]);return n},map:function(e,t,i){var n,s,a=0,o=[];if(r(e))for(n=e.length;a<n;a++)null!=(s=t(e[a],a,i))&&o.push(s);else for(a in e)null!=(s=t(e[a],a,i))&&o.push(s);return le.apply([],o)},guid:1,support:ge}),"function"==typeof Symbol&&(be.fn[Symbol.iterator]=se[Symbol.iterator]),be.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){he["[object "+t+"]"]=t.toLowerCase()});var Ye=function(e){function t(e,t,i,n){var r,s,a,o,d,c,h,p=t&&t.ownerDocument,m=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return i;if(!n&&((t?t.ownerDocument||t:$)!==H&&C(t),t=t||H,Z)){if(11!==m&&(d=_e.exec(e)))if(r=d[1]){if(9===m){if(!(a=t.getElementById(r)))return i;if(a.id===r)return i.push(a),i}else if(p&&(a=p.getElementById(r))&&X(t,a)&&a.id===r)return i.push(a),i}else{if(d[2])return U.apply(i,t.getElementsByTagName(e)),i;if((r=d[3])&&w.getElementsByClassName&&t.getElementsByClassName)return U.apply(i,t.getElementsByClassName(r)),i}if(w.qsa&&!B[e+" "]&&(!P||!P.test(e))){if(1!==m)p=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((o=t.getAttribute("id"))?o=o.replace(ye,we):t.setAttribute("id",o=E),s=(c=L(e)).length;s--;)c[s]="#"+o+" "+u(c[s]);h=c.join(","),p=fe.test(e)&&l(t.parentNode)||t}if(h)try{return U.apply(i,p.querySelectorAll(h)),i}catch(e){}finally{o===E&&t.removeAttribute("id")}}}return T(e.replace(se,"$1"),t,i,n)}function i(){function e(i,n){return t.push(i+" ")>b.cacheLength&&delete e[t.shift()],e[i+" "]=n}var t=[];return e}function n(e){return e[E]=!0,e}function r(e){var t=H.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function s(e,t){for(var i=e.split("|"),n=i.length;n--;)b.attrHandle[i[n]]=t}function a(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function o(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Me(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function d(e){return n(function(t){return t=+t,n(function(i,n){for(var r,s=e([],i.length,t),a=s.length;a--;)i[r=s[a]]&&(i[r]=!(n[r]=i[r]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function u(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function h(e,t,i){var n=t.dir,r=t.next,s=r||n,a=i&&"parentNode"===s,o=N++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||a)return e(t,i,r);return!1}:function(t,i,d){var l,c,u,h=[O,o];if(d){for(;t=t[n];)if((1===t.nodeType||a)&&e(t,i,d))return!0}else for(;t=t[n];)if(1===t.nodeType||a)if(u=t[E]||(t[E]={}),c=u[t.uniqueID]||(u[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[n]||t;else{if((l=c[s])&&l[0]===O&&l[1]===o)return h[2]=l[2];if(c[s]=h,h[2]=e(t,i,d))return!0}return!1}}function p(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function m(e,i,n){for(var r=0,s=i.length;r<s;r++)t(e,i[r],n);return n}function _(e,t,i,n,r){for(var s,a=[],o=0,d=e.length,l=null!=t;o<d;o++)(s=e[o])&&(i&&!i(s,n,r)||(a.push(s),l&&t.push(o)));return a}function f(e,t,i,r,s,a){return r&&!r[E]&&(r=f(r)),s&&!s[E]&&(s=f(s,a)),n(function(n,a,o,d){var l,c,u,h=[],p=[],f=a.length,g=n||m(t||"*",o.nodeType?[o]:o,[]),v=!e||!n&&t?g:_(g,h,e,o,d),y=i?s||(n?e:f||r)?[]:a:v;if(i&&i(v,y,o,d),r)for(l=_(y,p),r(l,[],o,d),c=l.length;c--;)(u=l[c])&&(y[p[c]]=!(v[p[c]]=u));if(n){if(s||e){if(s){for(l=[],c=y.length;c--;)(u=y[c])&&l.push(v[c]=u);s(null,y=[],l,d)}for(c=y.length;c--;)(u=y[c])&&(l=s?V(n,u):h[c])>-1&&(n[l]=!(a[l]=u))}}else y=_(y===a?y.splice(f,y.length):y),s?s(null,a,y,d):U.apply(a,y)})}function g(e){for(var t,i,n,r=e.length,s=b.relative[e[0].type],a=s||b.relative[" "],o=s?1:0,d=h(function(e){return e===t},a,!0),l=h(function(e){return V(t,e)>-1},a,!0),c=[function(e,i,n){var r=!s&&(n||i!==D)||((t=i).nodeType?d(e,i,n):l(e,i,n));return t=null,r}];o<r;o++)if(i=b.relative[e[o].type])c=[h(p(c),i)];else{if((i=b.filter[e[o].type].apply(null,e[o].matches))[E]){for(n=++o;n<r&&!b.relative[e[n].type];n++);return f(o>1&&p(c),o>1&&u(e.slice(0,o-1).concat({value:" "===e[o-2].type?"*":""})).replace(se,"$1"),i,o<n&&g(e.slice(o,n)),n<r&&g(e=e.slice(n)),n<r&&u(e))}c.push(i)}return p(c)}function v(e,i){var r=i.length>0,s=e.length>0,a=function(n,a,o,d,l){var c,u,h,p=0,m="0",f=n&&[],g=[],v=D,y=n||s&&b.find.TAG("*",l),w=O+=null==v?1:Math.random()||.1,M=y.length;for(l&&(D=a===H||a||l);m!==M&&null!=(c=y[m]);m++){if(s&&c){for(u=0,a||c.ownerDocument===H||(C(c),o=!Z);h=e[u++];)if(h(c,a||H,o)){d.push(c);break}l&&(O=w)}r&&((c=!h&&c)&&p--,n&&f.push(c))}if(p+=m,r&&m!==p){for(u=0;h=i[u++];)h(f,g,a,o);if(n){if(p>0)for(;m--;)f[m]||g[m]||(g[m]=G.call(d));g=_(g)}U.apply(d,g),l&&!n&&g.length>0&&p+i.length>1&&t.uniqueSort(d)}return l&&(O=w,D=v),f};return r?n(a):a}var y,w,b,M,Y,L,k,T,D,S,x,C,H,j,Z,P,J,F,X,E="sizzle"+1*new Date,$=e.document,O=0,N=0,W=i(),A=i(),B=i(),Q=function(e,t){return e===t&&(x=!0),0},R={}.hasOwnProperty,I=[],G=I.pop,K=I.push,U=I.push,z=I.slice,V=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ie="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",ne=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",re=new RegExp(ee+"+","g"),se=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),oe=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),de=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(ne),ce=new RegExp("^"+te+"$"),ue={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+ne),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,_e=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,fe=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},ye=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,we=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},be=function(){C()},Me=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{U.apply(I=z.call($.childNodes),$.childNodes),I[$.childNodes.length].nodeType}catch(e){U={apply:I.length?function(e,t){K.apply(e,z.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}w=t.support={},Y=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},C=t.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:$;return n!==H&&9===n.nodeType&&n.documentElement?(H=n,j=H.documentElement,Z=!Y(H),$!==H&&(i=H.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",be,!1):i.attachEvent&&i.attachEvent("onunload",be)),w.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=r(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=r(function(e){return j.appendChild(e).id=E,!H.getElementsByName||!H.getElementsByName(E).length}),w.getById?(b.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&Z){var i=t.getElementById(e);return i?[i]:[]}}):(b.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&Z){var i,n,r,s=t.getElementById(e);if(s){if((i=s.getAttributeNode("id"))&&i.value===e)return[s];for(r=t.getElementsByName(e),n=0;s=r[n++];)if((i=s.getAttributeNode("id"))&&i.value===e)return[s]}return[]}}),b.find.TAG=w.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,s=t.getElementsByTagName(e);if("*"===e){for(;i=s[r++];)1===i.nodeType&&n.push(i);return n}return s},b.find.CLASS=w.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&Z)return t.getElementsByClassName(e)},J=[],P=[],(w.qsa=me.test(H.querySelectorAll))&&(r(function(e){j.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ee+"*(?:value|"+q+")"),e.querySelectorAll("[id~="+E+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||P.push(".#.+[+~]")}),r(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&P.push(":enabled",":disabled"),j.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(w.matchesSelector=me.test(F=j.matches||j.webkitMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector||j.msMatchesSelector))&&r(function(e){w.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),J.push("!=",ne)}),P=P.length&&new RegExp(P.join("|")),J=J.length&&new RegExp(J.join("|")),t=me.test(j.compareDocumentPosition),X=t||me.test(j.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Q=t?function(e,t){if(e===t)return x=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!w.sortDetached&&t.compareDocumentPosition(e)===i?e===H||e.ownerDocument===$&&X($,e)?-1:t===H||t.ownerDocument===$&&X($,t)?1:S?V(S,e)-V(S,t):0:4&i?-1:1)}:function(e,t){if(e===t)return x=!0,0;var i,n=0,r=e.parentNode,s=t.parentNode,o=[e],d=[t];if(!r||!s)return e===H?-1:t===H?1:r?-1:s?1:S?V(S,e)-V(S,t):0;if(r===s)return a(e,t);for(i=e;i=i.parentNode;)o.unshift(i);for(i=t;i=i.parentNode;)d.unshift(i);for(;o[n]===d[n];)n++;return n?a(o[n],d[n]):o[n]===$?-1:d[n]===$?1:0},H):H},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==H&&C(e),i=i.replace(de,"='$1']"),w.matchesSelector&&Z&&!B[i+" "]&&(!J||!J.test(i))&&(!P||!P.test(i)))try{var n=F.call(e,i);if(n||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return t(i,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&C(e),X(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&C(e);var i=b.attrHandle[t.toLowerCase()],n=i&&R.call(b.attrHandle,t.toLowerCase())?i(e,t,!Z):void 0;return void 0!==n?n:w.attributes||!Z?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.escape=function(e){return(e+"").replace(ye,we)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],n=0,r=0;if(x=!w.detectDuplicates,S=!w.sortStable&&e.slice(0),e.sort(Q),x){for(;t=e[r++];)t===e[r]&&(n=i.push(r));for(;n--;)e.splice(i[n],1)}return S=null,e},M=t.getText=function(e){var t,i="",n=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=M(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[n++];)i+=M(t);return i},(b=t.selectors={cacheLength:50,createPseudo:n,match:ue,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return ue.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&le.test(i)&&(t=L(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,i,n){return function(r){var s=t.attr(r,e);return null==s?"!="===i:!i||(s+="","="===i?s===n:"!="===i?s!==n:"^="===i?n&&0===s.indexOf(n):"*="===i?n&&s.indexOf(n)>-1:"$="===i?n&&s.slice(-n.length)===n:"~="===i?(" "+s.replace(re," ")+" ").indexOf(n)>-1:"|="===i&&(s===n||s.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,i,n,r){var s="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,d){var l,c,u,h,p,m,_=s!==a?"nextSibling":"previousSibling",f=t.parentNode,g=o&&t.nodeName.toLowerCase(),v=!d&&!o,y=!1;if(f){if(s){for(;_;){for(h=t;h=h[_];)if(o?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;m=_="only"===e&&!m&&"nextSibling"}return!0}if(m=[a?f.firstChild:f.lastChild],a&&v){for(y=(p=(l=(c=(u=(h=f)[E]||(h[E]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]||[])[0]===O&&l[1])&&l[2],h=p&&f.childNodes[p];h=++p&&h&&h[_]||(y=p=0)||m.pop();)if(1===h.nodeType&&++y&&h===t){c[e]=[O,p,y];break}}else if(v&&(y=p=(l=(c=(u=(h=t)[E]||(h[E]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]||[])[0]===O&&l[1]),!1===y)for(;(h=++p&&h&&h[_]||(y=p=0)||m.pop())&&((o?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++y||(v&&((c=(u=h[E]||(h[E]={}))[h.uniqueID]||(u[h.uniqueID]={}))[e]=[O,y]),h!==t)););return(y-=r)===n||y%n==0&&y/n>=0}}},PSEUDO:function(e,i){var r,s=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return s[E]?s(i):s.length>1?(r=[e,e,"",i],b.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,r=s(e,i),a=r.length;a--;)e[n=V(e,r[a])]=!(t[n]=r[a])}):function(e){return s(e,0,r)}):s}},pseudos:{not:n(function(e){var t=[],i=[],r=k(e.replace(se,"$1"));return r[E]?n(function(e,t,i,n){for(var s,a=r(e,null,n,[]),o=e.length;o--;)(s=a[o])&&(e[o]=!(t[o]=s))}):function(e,n,s){return t[0]=e,r(t,null,s,i),t[0]=null,!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return e=e.replace(ge,ve),function(t){return(t.textContent||t.innerText||M(t)).indexOf(e)>-1}}),lang:n(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,ve).toLowerCase(),function(t){var i;do{if(i=Z?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===j},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:o(!1),disabled:o(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){
for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:d(function(){return[0]}),last:d(function(e,t){return[t-1]}),eq:d(function(e,t,i){return[i<0?i+t:i]}),even:d(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:d(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:d(function(e,t,i){for(var n=i<0?i+t:i;--n>=0;)e.push(n);return e}),gt:d(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}}).pseudos.nth=b.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[y]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(y);for(y in{submit:!0,reset:!0})b.pseudos[y]=function(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}(y);return c.prototype=b.filters=b.pseudos,b.setFilters=new c,L=t.tokenize=function(e,i){var n,r,s,a,o,d,l,c=A[e+" "];if(c)return i?0:c.slice(0);for(o=e,d=[],l=b.preFilter;o;){n&&!(r=ae.exec(o))||(r&&(o=o.slice(r[0].length)||o),d.push(s=[])),n=!1,(r=oe.exec(o))&&(n=r.shift(),s.push({value:n,type:r[0].replace(se," ")}),o=o.slice(n.length));for(a in b.filter)!(r=ue[a].exec(o))||l[a]&&!(r=l[a](r))||(n=r.shift(),s.push({value:n,type:a,matches:r}),o=o.slice(n.length));if(!n)break}return i?o.length:o?t.error(e):A(e,d).slice(0)},k=t.compile=function(e,t){var i,n=[],r=[],s=B[e+" "];if(!s){for(t||(t=L(e)),i=t.length;i--;)(s=g(t[i]))[E]?n.push(s):r.push(s);(s=B(e,v(r,n))).selector=e}return s},T=t.select=function(e,t,i,n){var r,s,a,o,d,c="function"==typeof e&&e,h=!n&&L(e=c.selector||e);if(i=i||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===t.nodeType&&Z&&b.relative[s[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ge,ve),t)||[])[0]))return i;c&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(r=ue.needsContext.test(e)?0:s.length;r--&&(a=s[r],!b.relative[o=a.type]);)if((d=b.find[o])&&(n=d(a.matches[0].replace(ge,ve),fe.test(s[0].type)&&l(t.parentNode)||t))){if(s.splice(r,1),!(e=n.length&&u(s)))return U.apply(i,n),i;break}}return(c||k(e,h))(n,t,!Z,i,!t||fe.test(e)&&l(t.parentNode)||t),i},w.sortStable=E.split("").sort(Q).join("")===E,w.detectDuplicates=!!x,C(),w.sortDetached=r(function(e){return 1&e.compareDocumentPosition(H.createElement("fieldset"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||s("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||s("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||s(q,function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);be.find=Ye,be.expr=Ye.selectors,be.expr[":"]=be.expr.pseudos,be.uniqueSort=be.unique=Ye.uniqueSort,be.text=Ye.getText,be.isXMLDoc=Ye.isXML,be.contains=Ye.contains,be.escapeSelector=Ye.escape;var Le=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&be(e).is(i))break;n.push(e)}return n},ke=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},Te=be.expr.match.needsContext,De=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;be.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?be.find.matchesSelector(n,e)?[n]:[]:be.find.matches(e,be.grep(t,function(e){return 1===e.nodeType}))},be.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(be(e).filter(function(){for(t=0;t<n;t++)if(be.contains(r[t],this))return!0}));for(i=this.pushStack([]),t=0;t<n;t++)be.find(e,r[t],i);return n>1?be.uniqueSort(i):i},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&Te.test(e)?be(e):e||[],!1).length}});var Se,xe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(be.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||Se,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:xe.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof be?t[0]:t,be.merge(this,be.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ae,!0)),De.test(n[1])&&be.isPlainObject(t))for(n in t)ve(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=ae.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):ve(e)?void 0!==i.ready?i.ready(e):e(be):be.makeArray(e,this)}).prototype=be.fn,Se=be(ae);var Ce=/^(?:parents|prev(?:Until|All))/,He={children:!0,contents:!0,next:!0,prev:!0};be.fn.extend({has:function(e){var t=be(e,this),i=t.length;return this.filter(function(){for(var e=0;e<i;e++)if(be.contains(this,t[e]))return!0})},closest:function(e,t){var i,n=0,r=this.length,s=[],a="string"!=typeof e&&be(e);if(!Te.test(e))for(;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:1===i.nodeType&&be.find.matchesSelector(i,e))){s.push(i);break}return this.pushStack(s.length>1?be.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?ue.call(be(e),this[0]):ue.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(be.uniqueSort(be.merge(this.get(),be(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),be.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Le(e,"parentNode")},parentsUntil:function(e,t,i){return Le(e,"parentNode",i)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return Le(e,"nextSibling")},prevAll:function(e){return Le(e,"previousSibling")},nextUntil:function(e,t,i){return Le(e,"nextSibling",i)},prevUntil:function(e,t,i){return Le(e,"previousSibling",i)},siblings:function(e){return ke((e.parentNode||{}).firstChild,e)},children:function(e){return ke(e.firstChild)},contents:function(e){return s(e,"iframe")?e.contentDocument:(s(e,"template")&&(e=e.content||e),be.merge([],e.childNodes))}},function(e,t){be.fn[e]=function(i,n){var r=be.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=be.filter(n,r)),this.length>1&&(He[e]||be.uniqueSort(r),Ce.test(e)&&r.reverse()),this.pushStack(r)}});var je=/[^\x20\t\r\n\f]+/g;be.Callbacks=function(e){e="string"==typeof e?d(e):be.extend({},e);var t,i,r,s,a=[],o=[],l=-1,c=function(){for(s=s||e.once,r=t=!0;o.length;l=-1)for(i=o.shift();++l<a.length;)!1===a[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=a.length,i=!1);e.memory||(i=!1),t=!1,s&&(a=i?[]:"")},u={add:function(){return a&&(i&&!t&&(l=a.length-1,o.push(i)),function t(i){be.each(i,function(i,r){ve(r)?e.unique&&u.has(r)||a.push(r):r&&r.length&&"string"!==n(r)&&t(r)})}(arguments),i&&!t&&c()),this},remove:function(){return be.each(arguments,function(e,t){for(var i;(i=be.inArray(t,a,i))>-1;)a.splice(i,1),i<=l&&l--}),this},has:function(e){return e?be.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return s=o=[],a=i="",this},disabled:function(){return!a},lock:function(){return s=o=[],i||t||(a=i=""),this},locked:function(){return!!s},fireWith:function(e,i){return s||(i=[e,(i=i||[]).slice?i.slice():i],o.push(i),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},be.extend({Deferred:function(t){var i=[["notify","progress",be.Callbacks("memory"),be.Callbacks("memory"),2],["resolve","done",be.Callbacks("once memory"),be.Callbacks("once memory"),0,"resolved"],["reject","fail",be.Callbacks("once memory"),be.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return be.Deferred(function(t){be.each(i,function(i,n){var r=ve(e[n[4]])&&e[n[4]];s[n[1]](function(){var e=r&&r.apply(this,arguments);e&&ve(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,n,r){function s(t,i,n,r){return function(){var o=this,d=arguments,u=function(){var e,u;if(!(t<a)){if((e=n.apply(o,d))===i.promise())throw new TypeError("Thenable self-resolution");u=e&&("object"==typeof e||"function"==typeof e)&&e.then,ve(u)?r?u.call(e,s(a,i,l,r),s(a,i,c,r)):(a++,u.call(e,s(a,i,l,r),s(a,i,c,r),s(a,i,l,i.notifyWith))):(n!==l&&(o=void 0,d=[e]),(r||i.resolveWith)(o,d))}},h=r?u:function(){try{u()}catch(e){be.Deferred.exceptionHook&&be.Deferred.exceptionHook(e,h.stackTrace),t+1>=a&&(n!==c&&(o=void 0,d=[e]),i.rejectWith(o,d))}};t?h():(be.Deferred.getStackHook&&(h.stackTrace=be.Deferred.getStackHook()),e.setTimeout(h))}}var a=0;return be.Deferred(function(e){i[0][3].add(s(0,e,ve(r)?r:l,e.notifyWith)),i[1][3].add(s(0,e,ve(t)?t:l)),i[2][3].add(s(0,e,ve(n)?n:c))}).promise()},promise:function(e){return null!=e?be.extend(e,r):r}},s={};return be.each(i,function(e,t){var a=t[2],o=t[5];r[t[1]]=a.add,o&&a.add(function(){n=o},i[3-e][2].disable,i[3-e][3].disable,i[0][2].lock,i[0][3].lock),a.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=a.fireWith}),r.promise(s),t&&t.call(s,s),s},when:function(e){var t=arguments.length,i=t,n=Array(i),r=de.call(arguments),s=be.Deferred(),a=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?de.call(arguments):i,--t||s.resolveWith(n,r)}};if(t<=1&&(u(e,s.done(a(i)).resolve,s.reject,!t),"pending"===s.state()||ve(r[i]&&r[i].then)))return s.then();for(;i--;)u(r[i],a(i),s.reject);return s.promise()}});var Ze=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;be.Deferred.exceptionHook=function(t,i){e.console&&e.console.warn&&t&&Ze.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)},be.readyException=function(t){e.setTimeout(function(){throw t})};var Pe=be.Deferred();be.fn.ready=function(e){return Pe.then(e).catch(function(e){be.readyException(e)}),this},be.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--be.readyWait:be.isReady)||(be.isReady=!0,!0!==e&&--be.readyWait>0||Pe.resolveWith(ae,[be]))}}),be.ready.then=Pe.then,"complete"===ae.readyState||"loading"!==ae.readyState&&!ae.documentElement.doScroll?e.setTimeout(be.ready):(ae.addEventListener("DOMContentLoaded",h),e.addEventListener("load",h));var Je=function(e,t,i,r,s,a,o){var d=0,l=e.length,c=null==i;if("object"===n(i)){s=!0;for(d in i)Je(e,t,d,i[d],!0,a,o)}else if(void 0!==r&&(s=!0,ve(r)||(o=!0),c&&(o?(t.call(e,r),t=null):(c=t,t=function(e,t,i){return c.call(be(e),i)})),t))for(;d<l;d++)t(e[d],i,o?r:r.call(e[d],d,t(e[d],i)));return s?e:c?t.call(e):l?t(e[0],i):a},Fe=/^-ms-/,Xe=/-([a-z])/g,Ee=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};_.uid=1,_.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Ee(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[m(t)]=i;else for(n in t)r[m(n)]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][m(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(m):(t=m(t))in n?[t]:t.match(je)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||be.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!be.isEmptyObject(t)}};var $e=new _,Oe=new _,Ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,We=/[A-Z]/g;be.extend({hasData:function(e){return Oe.hasData(e)||$e.hasData(e)},data:function(e,t,i){return Oe.access(e,t,i)},removeData:function(e,t){Oe.remove(e,t)},_data:function(e,t,i){return $e.access(e,t,i)},_removeData:function(e,t){$e.remove(e,t)}}),be.fn.extend({data:function(e,t){var i,n,r,s=this[0],a=s&&s.attributes;if(void 0===e){if(this.length&&(r=Oe.get(s),1===s.nodeType&&!$e.get(s,"hasDataAttrs"))){for(i=a.length;i--;)a[i]&&0===(n=a[i].name).indexOf("data-")&&(n=m(n.slice(5)),g(s,n,r[n]));$e.set(s,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){Oe.set(this,e)}):Je(this,function(t){var i;if(s&&void 0===t){if(void 0!==(i=Oe.get(s,e)))return i;if(void 0!==(i=g(s,e)))return i}else this.each(function(){Oe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Oe.remove(this,e)})}}),be.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=$e.get(e,t),i&&(!n||Array.isArray(i)?n=$e.access(e,t,be.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=be.queue(e,t),n=i.length,r=i.shift(),s=be._queueHooks(e,t),a=function(){be.dequeue(e,t)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete s.stop,r.call(e,a,s)),!n&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return $e.get(e,i)||$e.access(e,i,{empty:be.Callbacks("once memory").add(function(){$e.remove(e,[t+"queue",i])})})}}),be.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?be.queue(this[0],e):void 0===t?this:this.each(function(){var i=be.queue(this,e,t);be._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&be.dequeue(this,e)})},dequeue:function(e){return this.each(function(){be.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=be.Deferred(),s=this,a=this.length,o=function(){--n||r.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(i=$e.get(s[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(o));return o(),r.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Be=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),Qe=["Top","Right","Bottom","Left"],Re=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&be.contains(e.ownerDocument,e)&&"none"===be.css(e,"display")},Ie=function(e,t,i,n){var r,s,a={};for(s in t)a[s]=e.style[s],e.style[s]=t[s];r=i.apply(e,n||[]);for(s in t)e.style[s]=a[s];return r},Ge={};be.fn.extend({show:function(){return w(this,!0)},hide:function(){return w(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?be(this).show():be(this).hide()})}});var Ke=/^(?:checkbox|radio)$/i,Ue=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ze=/^$|^module$|\/(?:java|ecma)script/i,Ve={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td;var qe=/<|&#?\w+;/;!function(){var e=ae.createDocumentFragment().appendChild(ae.createElement("div")),t=ae.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),ge.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",ge.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var et=ae.documentElement,tt=/^key/,it=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nt=/^([^.]*)(?:\.(.+)|)/;be.event={global:{},add:function(e,t,i,n,r){var s,a,o,d,l,c,u,h,p,m,_,f=$e.get(e);if(f)for(i.handler&&(i=(s=i).handler,r=s.selector),r&&be.find.matchesSelector(et,r),i.guid||(i.guid=be.guid++),(d=f.events)||(d=f.events={}),(a=f.handle)||(a=f.handle=function(t){return void 0!==be&&be.event.triggered!==t.type?be.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(je)||[""]).length;l--;)p=_=(o=nt.exec(t[l])||[])[1],m=(o[2]||"").split(".").sort(),p&&(u=be.event.special[p]||{},p=(r?u.delegateType:u.bindType)||p,u=be.event.special[p]||{},c=be.extend({type:p,origType:_,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&be.expr.match.needsContext.test(r),namespace:m.join(".")},s),(h=d[p])||((h=d[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,n,m,a)||e.addEventListener&&e.addEventListener(p,a)),u.add&&(u.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),be.event.global[p]=!0)},remove:function(e,t,i,n,r){var s,a,o,d,l,c,u,h,p,m,_,f=$e.hasData(e)&&$e.get(e);if(f&&(d=f.events)){for(l=(t=(t||"").match(je)||[""]).length;l--;)if(o=nt.exec(t[l])||[],p=_=o[1],m=(o[2]||"").split(".").sort(),p){for(u=be.event.special[p]||{},h=d[p=(n?u.delegateType:u.bindType)||p]||[],o=o[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=h.length;s--;)c=h[s],!r&&_!==c.origType||i&&i.guid!==c.guid||o&&!o.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(s,1),c.selector&&h.delegateCount--,u.remove&&u.remove.call(e,c));a&&!h.length&&(u.teardown&&!1!==u.teardown.call(e,m,f.handle)||be.removeEvent(e,p,f.handle),delete d[p])}else for(p in d)be.event.remove(e,p+t[l],i,n,!0);be.isEmptyObject(d)&&$e.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,s,a,o=be.event.fix(e),d=new Array(arguments.length),l=($e.get(this,"events")||{})[o.type]||[],c=be.event.special[o.type]||{};for(d[0]=o,t=1;t<arguments.length;t++)d[t]=arguments[t];if(o.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,o)){for(a=be.event.handlers.call(this,o,l),t=0;(r=a[t++])&&!o.isPropagationStopped();)for(o.currentTarget=r.elem,i=0;(s=r.handlers[i++])&&!o.isImmediatePropagationStopped();)o.rnamespace&&!o.rnamespace.test(s.namespace)||(o.handleObj=s,o.data=s.data,void 0!==(n=((be.event.special[s.origType]||{}).handle||s.handler).apply(r.elem,d))&&!1===(o.result=n)&&(o.preventDefault(),o.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,o),o.result}},handlers:function(e,t){var i,n,r,s,a,o=[],d=t.delegateCount,l=e.target;if(d&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(s=[],a={},i=0;i<d;i++)void 0===a[r=(n=t[i]).selector+" "]&&(a[r]=n.needsContext?be(r,this).index(l)>-1:be.find(r,this,null,[l]).length),a[r]&&s.push(n);s.length&&o.push({elem:l,handlers:s})}return l=this,d<t.length&&o.push({elem:l,handlers:t.slice(d)}),o},addProp:function(e,t){Object.defineProperty(be.Event.prototype,e,{enumerable:!0,configurable:!0,get:ve(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[be.expando]?e:new be.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==T()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===T()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&s(this,"input"))return this.click(),!1},_default:function(e){return s(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},be.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},be.Event=function(e,t){if(!(this instanceof be.Event))return new be.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?L:k,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&be.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[be.expando]=!0},be.Event.prototype={constructor:be.Event,isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=L,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=L,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=L,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},be.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&it.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},be.event.addProp),be.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){be.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,s=e.handleObj;return r&&(r===n||be.contains(n,r))||(e.type=s.origType,i=s.handler.apply(this,arguments),e.type=t),i}}}),be.fn.extend({on:function(e,t,i,n){return D(this,e,t,i,n)},one:function(e,t,i,n){return D(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,be(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=k),this.each(function(){be.event.remove(this,e,i,t)})}});var rt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,st=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;be.extend({htmlPrefilter:function(e){return e.replace(rt,"<$1></$2>")},clone:function(e,t,i){var n,r,s,a,o=e.cloneNode(!0),d=be.contains(e.ownerDocument,e);if(!(ge.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||be.isXMLDoc(e)))for(a=b(o),n=0,r=(s=b(e)).length;n<r;n++)j(s[n],a[n]);if(t)if(i)for(s=s||b(e),a=a||b(o),n=0,r=s.length;n<r;n++)H(s[n],a[n]);else H(e,o);return(a=b(o,"script")).length>0&&M(a,!d&&b(e,"script")),o},cleanData:function(e){for(var t,i,n,r=be.event.special,s=0;void 0!==(i=e[s]);s++)if(Ee(i)){if(t=i[$e.expando]){if(t.events)for(n in t.events)r[n]?be.event.remove(i,n):be.removeEvent(i,n,t.handle);i[$e.expando]=void 0}i[Oe.expando]&&(i[Oe.expando]=void 0)}}}),be.fn.extend({detach:function(e){return P(this,e,!0)},remove:function(e){return P(this,e)},text:function(e){return Je(this,function(e){return void 0===e?be.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Z(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||S(this,e).appendChild(e)})},prepend:function(){return Z(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Z(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Z(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(be.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return be.clone(this,e,t)})},html:function(e){return Je(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!st.test(e)&&!Ve[(Ue.exec(e)||["",""])[1].toLowerCase()]){e=be.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(be.cleanData(b(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Z(this,arguments,function(t){var i=this.parentNode;be.inArray(this,e)<0&&(be.cleanData(b(this)),i&&i.replaceChild(t,this))},e)}}),be.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){be.fn[e]=function(e){for(var i,n=[],r=be(e),s=r.length-1,a=0;a<=s;a++)i=a===s?this:this.clone(!0),be(r[a])[t](i),ce.apply(n,i.get());return this.pushStack(n)}});var dt=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),lt=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},ct=new RegExp(Qe.join("|"),"i");!function(){function t(){if(l){d.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",et.appendChild(d).appendChild(l);var t=e.getComputedStyle(l);n="1%"!==t.top,o=12===i(t.marginLeft),l.style.right="60%",a=36===i(t.right),r=36===i(t.width),l.style.position="absolute",s=36===l.offsetWidth||"absolute",et.removeChild(d),l=null}}function i(e){return Math.round(parseFloat(e))}var n,r,s,a,o,d=ae.createElement("div"),l=ae.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",ge.clearCloneStyle="content-box"===l.style.backgroundClip,be.extend(ge,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),o},scrollboxSize:function(){return t(),s}}))}();var ut=/^(none|table(?!-c[ea]).+)/,ht=/^--/,pt={position:"absolute",visibility:"hidden",display:"block"},mt={letterSpacing:"0",fontWeight:"400"},_t=["Webkit","Moz","ms"],ft=ae.createElement("div").style;be.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=J(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,o=m(t),d=ht.test(t),l=e.style;if(d||(t=E(o)),a=be.cssHooks[t]||be.cssHooks[o],void 0===i)return a&&"get"in a&&void 0!==(r=a.get(e,!1,n))?r:l[t];"string"==(s=typeof i)&&(r=Be.exec(i))&&r[1]&&(i=v(e,t,r),s="number"),null!=i&&i===i&&("number"===s&&(i+=r&&r[3]||(be.cssNumber[o]?"":"px")),ge.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(i=a.set(e,i,n))||(d?l.setProperty(t,i):l[t]=i))}},css:function(e,t,i,n){var r,s,a,o=m(t);return ht.test(t)||(t=E(o)),(a=be.cssHooks[t]||be.cssHooks[o])&&"get"in a&&(r=a.get(e,!0,i)),void 0===r&&(r=J(e,t,n)),"normal"===r&&t in mt&&(r=mt[t]),""===i||i?(s=parseFloat(r),!0===i||isFinite(s)?s||0:r):r}}),be.each(["height","width"],function(e,t){be.cssHooks[t]={get:function(e,i,n){if(i)return!ut.test(be.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?N(e,t,n):Ie(e,pt,function(){return N(e,t,n)})},set:function(e,i,n){var r,s=lt(e),a="border-box"===be.css(e,"boxSizing",!1,s),o=n&&O(e,t,n,a,s);return a&&ge.scrollboxSize()===s.position&&(o-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-O(e,t,"border",!1,s)-.5)),o&&(r=Be.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=be.css(e,t)),$(e,i,o)}}}),be.cssHooks.marginLeft=F(ge.reliableMarginLeft,function(e,t){if(t)return(parseFloat(J(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),be.each({margin:"",padding:"",border:"Width"},function(e,t){be.cssHooks[e+t]={expand:function(i){for(var n=0,r={},s="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+Qe[n]+t]=s[n]||s[n-2]||s[0];return r}},"margin"!==e&&(be.cssHooks[e+t].set=$)}),be.fn.extend({css:function(e,t){return Je(this,function(e,t,i){var n,r,s={},a=0;if(Array.isArray(t)){for(n=lt(e),r=t.length;a<r;a++)s[t[a]]=be.css(e,t[a],!1,n);return s}return void 0!==i?be.style(e,t,i):be.css(e,t)},e,t,arguments.length>1)}}),be.Tween=W,W.prototype={constructor:W,init:function(e,t,i,n,r,s){this.elem=e,this.prop=i,this.easing=r||be.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=s||(be.cssNumber[i]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,i=W.propHooks[this.prop];return this.options.duration?this.pos=t=be.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=be.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){be.fx.step[e.prop]?be.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[be.cssProps[e.prop]]&&!be.cssHooks[e.prop]?e.elem[e.prop]=e.now:be.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},be.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},be.fx=W.prototype.init,be.fx.step={};var gt,vt,yt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;be.Animation=be.extend(K,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return v(i.elem,e,Be.exec(t),i),i}]},tweener:function(e,t){ve(e)?(t=e,e=["*"]):e=e.match(je);for(var i,n=0,r=e.length;n<r;n++)i=e[n],K.tweeners[i]=K.tweeners[i]||[],K.tweeners[i].unshift(t)},prefilters:[I],prefilter:function(e,t){t?K.prefilters.unshift(e):K.prefilters.push(e)}}),be.speed=function(e,t,i){var n=e&&"object"==typeof e?be.extend({},e):{complete:i||!i&&t||ve(e)&&e,duration:e,easing:i&&t||t&&!ve(t)&&t};return be.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in be.fx.speeds?n.duration=be.fx.speeds[n.duration]:n.duration=be.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){ve(n.old)&&n.old.call(this),n.queue&&be.dequeue(this,n.queue)},n},be.fn.extend({fadeTo:function(e,t,i,n){return this.filter(Re).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=be.isEmptyObject(e),s=be.speed(t,i,n),a=function(){var t=K(this,be.extend({},e),s);(r||$e.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===s.queue?this.each(a):this.queue(s.queue,a)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",s=be.timers,a=$e.get(this);if(r)a[r]&&a[r].stop&&n(a[r]);else for(r in a)a[r]&&a[r].stop&&wt.test(r)&&n(a[r]);for(r=s.length;r--;)s[r].elem!==this||null!=e&&s[r].queue!==e||(s[r].anim.stop(i),t=!1,s.splice(r,1));!t&&i||be.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){
var t,i=$e.get(this),n=i[e+"queue"],r=i[e+"queueHooks"],s=be.timers,a=n?n.length:0;for(i.finish=!0,be.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),be.each(["toggle","show","hide"],function(e,t){var i=be.fn[t];be.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Q(t,!0),e,n,r)}}),be.each({slideDown:Q("show"),slideUp:Q("hide"),slideToggle:Q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){be.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),be.timers=[],be.fx.tick=function(){var e,t=0,i=be.timers;for(gt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||be.fx.stop(),gt=void 0},be.fx.timer=function(e){be.timers.push(e),be.fx.start()},be.fx.interval=13,be.fx.start=function(){vt||(vt=!0,A())},be.fx.stop=function(){vt=null},be.fx.speeds={slow:600,fast:200,_default:400},be.fn.delay=function(t,i){return t=be.fx?be.fx.speeds[t]||t:t,i=i||"fx",this.queue(i,function(i,n){var r=e.setTimeout(i,t);n.stop=function(){e.clearTimeout(r)}})},function(){var e=ae.createElement("input"),t=ae.createElement("select").appendChild(ae.createElement("option"));e.type="checkbox",ge.checkOn=""!==e.value,ge.optSelected=t.selected,(e=ae.createElement("input")).value="t",e.type="radio",ge.radioValue="t"===e.value}();var bt,Mt=be.expr.attrHandle;be.fn.extend({attr:function(e,t){return Je(this,be.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){be.removeAttr(this,e)})}}),be.extend({attr:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?be.prop(e,t,i):(1===s&&be.isXMLDoc(e)||(r=be.attrHooks[t.toLowerCase()]||(be.expr.match.bool.test(t)?bt:void 0)),void 0!==i?null===i?void be.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:null==(n=be.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!ge.radioValue&&"radio"===t&&s(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(je);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),bt={set:function(e,t,i){return!1===t?be.removeAttr(e,i):e.setAttribute(i,i),i}},be.each(be.expr.match.bool.source.match(/\w+/g),function(e,t){var i=Mt[t]||be.find.attr;Mt[t]=function(e,t,n){var r,s,a=t.toLowerCase();return n||(s=Mt[a],Mt[a]=r,r=null!=i(e,t,n)?a:null,Mt[a]=s),r}});var Yt=/^(?:input|select|textarea|button)$/i,Lt=/^(?:a|area)$/i;be.fn.extend({prop:function(e,t){return Je(this,be.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[be.propFix[e]||e]})}}),be.extend({prop:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&be.isXMLDoc(e)||(t=be.propFix[t]||t,r=be.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=be.find.attr(e,"tabindex");return t?parseInt(t,10):Yt.test(e.nodeName)||Lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ge.optSelected||(be.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),be.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){be.propFix[this.toLowerCase()]=this}),be.fn.extend({addClass:function(e){var t,i,n,r,s,a,o,d=0;if(ve(e))return this.each(function(t){be(this).addClass(e.call(this,t,z(this)))});if((t=V(e)).length)for(;i=this[d++];)if(r=z(i),n=1===i.nodeType&&" "+U(r)+" "){for(a=0;s=t[a++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");r!==(o=U(n))&&i.setAttribute("class",o)}return this},removeClass:function(e){var t,i,n,r,s,a,o,d=0;if(ve(e))return this.each(function(t){be(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if((t=V(e)).length)for(;i=this[d++];)if(r=z(i),n=1===i.nodeType&&" "+U(r)+" "){for(a=0;s=t[a++];)for(;n.indexOf(" "+s+" ")>-1;)n=n.replace(" "+s+" "," ");r!==(o=U(n))&&i.setAttribute("class",o)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):ve(e)?this.each(function(i){be(this).toggleClass(e.call(this,i,z(this),t),t)}):this.each(function(){var t,r,s,a;if(n)for(r=0,s=be(this),a=V(e);t=a[r++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==i||((t=z(this))&&$e.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$e.get(this,"__className__")||""))})},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+U(z(i))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;be.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=ve(e),this.each(function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,be(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=be.map(r,function(e){return null==e?"":e+""})),(t=be.valHooks[this.type]||be.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=be.valHooks[r.type]||be.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(kt,""):null==i?"":i:void 0}}),be.extend({valHooks:{option:{get:function(e){var t=be.find.attr(e,"value");return null!=t?t:U(be.text(e))}},select:{get:function(e){var t,i,n,r=e.options,a=e.selectedIndex,o="select-one"===e.type,d=o?null:[],l=o?a+1:r.length;for(n=a<0?l:o?a:0;n<l;n++)if(((i=r[n]).selected||n===a)&&!i.disabled&&(!i.parentNode.disabled||!s(i.parentNode,"optgroup"))){if(t=be(i).val(),o)return t;d.push(t)}return d},set:function(e,t){for(var i,n,r=e.options,s=be.makeArray(t),a=r.length;a--;)((n=r[a]).selected=be.inArray(be.valHooks.option.get(n),s)>-1)&&(i=!0);return i||(e.selectedIndex=-1),s}}}}),be.each(["radio","checkbox"],function(){be.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=be.inArray(be(e).val(),t)>-1}},ge.checkOn||(be.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ge.focusin="onfocusin"in e;var Tt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};be.extend(be.event,{trigger:function(t,i,n,r){var s,a,o,d,l,c,u,h,p=[n||ae],m=me.call(t,"type")?t.type:t,_=me.call(t,"namespace")?t.namespace.split("."):[];if(a=h=o=n=n||ae,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(m+be.event.triggered)&&(m.indexOf(".")>-1&&(m=(_=m.split(".")).shift(),_.sort()),l=m.indexOf(":")<0&&"on"+m,t=t[be.expando]?t:new be.Event(m,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:be.makeArray(i,[t]),u=be.event.special[m]||{},r||!u.trigger||!1!==u.trigger.apply(n,i))){if(!r&&!u.noBubble&&!ye(n)){for(d=u.delegateType||m,Tt.test(d+m)||(a=a.parentNode);a;a=a.parentNode)p.push(a),o=a;o===(n.ownerDocument||ae)&&p.push(o.defaultView||o.parentWindow||e)}for(s=0;(a=p[s++])&&!t.isPropagationStopped();)h=a,t.type=s>1?d:u.bindType||m,(c=($e.get(a,"events")||{})[t.type]&&$e.get(a,"handle"))&&c.apply(a,i),(c=l&&a[l])&&c.apply&&Ee(a)&&(t.result=c.apply(a,i),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(p.pop(),i)||!Ee(n)||l&&ve(n[m])&&!ye(n)&&((o=n[l])&&(n[l]=null),be.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Dt),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Dt),be.event.triggered=void 0,o&&(n[l]=o)),t.result}},simulate:function(e,t,i){var n=be.extend(new be.Event,i,{type:e,isSimulated:!0});be.event.trigger(n,null,t)}}),be.fn.extend({trigger:function(e,t){return this.each(function(){be.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return be.event.trigger(e,t,i,!0)}}),ge.focusin||be.each({focus:"focusin",blur:"focusout"},function(e,t){var i=function(e){be.event.simulate(t,e.target,be.event.fix(e))};be.event.special[t]={setup:function(){var n=this.ownerDocument||this,r=$e.access(n,t);r||n.addEventListener(e,i,!0),$e.access(n,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=$e.access(n,t)-1;r?$e.access(n,t,r):(n.removeEventListener(e,i,!0),$e.remove(n,t))}}});var St=e.location,xt=Date.now(),Ct=/\?/;be.parseXML=function(t){var i;if(!t||"string"!=typeof t)return null;try{i=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||be.error("Invalid XML: "+t),i};var Ht=/\[\]$/,jt=/\r?\n/g,Zt=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;be.param=function(e,t){var i,n=[],r=function(e,t){var i=ve(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(e)||e.jquery&&!be.isPlainObject(e))be.each(e,function(){r(this.name,this.value)});else for(i in e)q(i,e[i],t,r);return n.join("&")},be.fn.extend({serialize:function(){return be.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=be.prop(this,"elements");return e?be.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!be(this).is(":disabled")&&Pt.test(this.nodeName)&&!Zt.test(e)&&(this.checked||!Ke.test(e))}).map(function(e,t){var i=be(this).val();return null==i?null:Array.isArray(i)?be.map(i,function(e){return{name:t.name,value:e.replace(jt,"\r\n")}}):{name:t.name,value:i.replace(jt,"\r\n")}}).get()}});var Jt=/%20/g,Ft=/#.*$/,Xt=/([?&])_=[^&]*/,Et=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ot=/^(?:GET|HEAD)$/,Nt=/^\/\//,Wt={},At={},Bt="*/".concat("*"),Qt=ae.createElement("a");Qt.href=St.href,be.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:$t.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":be.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ie(ie(e,be.ajaxSettings),t):ie(be.ajaxSettings,e)},ajaxPrefilter:ee(Wt),ajaxTransport:ee(At),ajax:function(t,i){function n(t,i,n,o){var l,h,p,w,b,M=i;c||(c=!0,d&&e.clearTimeout(d),r=void 0,a=o||"",Y.readyState=t>0?4:0,l=t>=200&&t<300||304===t,n&&(w=ne(m,Y,n)),w=re(m,w,Y,l),l?(m.ifModified&&((b=Y.getResponseHeader("Last-Modified"))&&(be.lastModified[s]=b),(b=Y.getResponseHeader("etag"))&&(be.etag[s]=b)),204===t||"HEAD"===m.type?M="nocontent":304===t?M="notmodified":(M=w.state,h=w.data,l=!(p=w.error))):(p=M,!t&&M||(M="error",t<0&&(t=0))),Y.status=t,Y.statusText=(i||M)+"",l?g.resolveWith(_,[h,M,Y]):g.rejectWith(_,[Y,M,p]),Y.statusCode(y),y=void 0,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[Y,m,l?h:p]),v.fireWith(_,[Y,M]),u&&(f.trigger("ajaxComplete",[Y,m]),--be.active||be.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=void 0),i=i||{};var r,s,a,o,d,l,c,u,h,p,m=be.ajaxSetup({},i),_=m.context||m,f=m.context&&(_.nodeType||_.jquery)?be(_):be.event,g=be.Deferred(),v=be.Callbacks("once memory"),y=m.statusCode||{},w={},b={},M="canceled",Y={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o)for(o={};t=Et.exec(a);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)Y.always(e[Y.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||M;return r&&r.abort(t),n(0,t),this}};if(g.promise(Y),m.url=((t||m.url||St.href)+"").replace(Nt,St.protocol+"//"),m.type=i.method||i.type||m.method||m.type,m.dataTypes=(m.dataType||"*").toLowerCase().match(je)||[""],null==m.crossDomain){l=ae.createElement("a");try{l.href=m.url,l.href=l.href,m.crossDomain=Qt.protocol+"//"+Qt.host!=l.protocol+"//"+l.host}catch(e){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=be.param(m.data,m.traditional)),te(Wt,m,i,Y),c)return Y;(u=be.event&&m.global)&&0==be.active++&&be.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!Ot.test(m.type),s=m.url.replace(Ft,""),m.hasContent?m.data&&m.processData&&0===(m.contentType||"").indexOf("application/x-www-form-urlencoded")&&(m.data=m.data.replace(Jt,"+")):(p=m.url.slice(s.length),m.data&&(m.processData||"string"==typeof m.data)&&(s+=(Ct.test(s)?"&":"?")+m.data,delete m.data),!1===m.cache&&(s=s.replace(Xt,"$1"),p=(Ct.test(s)?"&":"?")+"_="+xt+++p),m.url=s+p),m.ifModified&&(be.lastModified[s]&&Y.setRequestHeader("If-Modified-Since",be.lastModified[s]),be.etag[s]&&Y.setRequestHeader("If-None-Match",be.etag[s])),(m.data&&m.hasContent&&!1!==m.contentType||i.contentType)&&Y.setRequestHeader("Content-Type",m.contentType),Y.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Bt+"; q=0.01":""):m.accepts["*"]);for(h in m.headers)Y.setRequestHeader(h,m.headers[h]);if(m.beforeSend&&(!1===m.beforeSend.call(_,Y,m)||c))return Y.abort();if(M="abort",v.add(m.complete),Y.done(m.success),Y.fail(m.error),r=te(At,m,i,Y)){if(Y.readyState=1,u&&f.trigger("ajaxSend",[Y,m]),c)return Y;m.async&&m.timeout>0&&(d=e.setTimeout(function(){Y.abort("timeout")},m.timeout));try{c=!1,r.send(w,n)}catch(e){if(c)throw e;n(-1,e)}}else n(-1,"No Transport");return Y},getJSON:function(e,t,i){return be.get(e,t,i,"json")},getScript:function(e,t){return be.get(e,void 0,t,"script")}}),be.each(["get","post"],function(e,t){be[t]=function(e,i,n,r){return ve(i)&&(r=r||n,n=i,i=void 0),be.ajax(be.extend({url:e,type:t,dataType:r,data:i,success:n},be.isPlainObject(e)&&e))}}),be._evalUrl=function(e){return be.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},be.fn.extend({wrapAll:function(e){var t;return this[0]&&(ve(e)&&(e=e.call(this[0])),t=be(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return ve(e)?this.each(function(t){be(this).wrapInner(e.call(this,t))}):this.each(function(){var t=be(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=ve(e);return this.each(function(i){be(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){be(this).replaceWith(this.childNodes)}),this}}),be.expr.pseudos.hidden=function(e){return!be.expr.pseudos.visible(e)},be.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},be.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},It=be.ajaxSettings.xhr();ge.cors=!!It&&"withCredentials"in It,ge.ajax=It=!!It,be.ajaxTransport(function(t){var i,n;if(ge.cors||It&&!t.crossDomain)return{send:function(r,s){var a,o=t.xhr();if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)o[a]=t.xhrFields[a];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)o.setRequestHeader(a,r[a]);i=function(e){return function(){i&&(i=n=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?s(0,"error"):s(o.status,o.statusText):s(Rt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=i(),n=o.onerror=o.ontimeout=i("error"),void 0!==o.onabort?o.onabort=n:o.onreadystatechange=function(){4===o.readyState&&e.setTimeout(function(){i&&n()})},i=i("abort");try{o.send(t.hasContent&&t.data||null)}catch(e){if(i)throw e}},abort:function(){i&&i()}}}),be.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),be.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return be.globalEval(e),e}}}),be.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),be.ajaxTransport("script",function(e){if(e.crossDomain){var t,i;return{send:function(n,r){t=be("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&r("error"===e.type?404:200,e.type)}),ae.head.appendChild(t[0])},abort:function(){i&&i()}}}});var Gt=[],Kt=/(=)\?(?=&|$)|\?\?/;be.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||be.expando+"_"+xt++;return this[e]=!0,e}}),be.ajaxPrefilter("json jsonp",function(t,i,n){var r,s,a,o=!1!==t.jsonp&&(Kt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(t.data)&&"data");if(o||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=ve(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,o?t[o]=t[o].replace(Kt,"$1"+r):!1!==t.jsonp&&(t.url+=(Ct.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||be.error(r+" was not called"),a[0]},t.dataTypes[0]="json",s=e[r],e[r]=function(){a=arguments},n.always(function(){void 0===s?be(e).removeProp(r):e[r]=s,t[r]&&(t.jsonpCallback=i.jsonpCallback,Gt.push(r)),a&&ve(s)&&s(a[0]),a=s=void 0}),"script"}),ge.createHTMLDocument=function(){var e=ae.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),be.parseHTML=function(e,t,i){if("string"!=typeof e)return[];"boolean"==typeof t&&(i=t,t=!1);var n,r,s;return t||(ge.createHTMLDocument?((n=(t=ae.implementation.createHTMLDocument("")).createElement("base")).href=ae.location.href,t.head.appendChild(n)):t=ae),r=De.exec(e),s=!i&&[],r?[t.createElement(r[1])]:(r=Y([e],t,s),s&&s.length&&be(s).remove(),be.merge([],r.childNodes))},be.fn.load=function(e,t,i){var n,r,s,a=this,o=e.indexOf(" ");return o>-1&&(n=U(e.slice(o)),e=e.slice(0,o)),ve(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&be.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){s=arguments,a.html(n?be("<div>").append(be.parseHTML(e)).find(n):e)}).always(i&&function(e,t){a.each(function(){i.apply(this,s||[e.responseText,t,e])})}),this},be.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){be.fn[t]=function(e){return this.on(t,e)}}),be.expr.pseudos.animated=function(e){return be.grep(be.timers,function(t){return e===t.elem}).length},be.offset={setOffset:function(e,t,i){var n,r,s,a,o,d,l=be.css(e,"position"),c=be(e),u={};"static"===l&&(e.style.position="relative"),o=c.offset(),s=be.css(e,"top"),d=be.css(e,"left"),("absolute"===l||"fixed"===l)&&(s+d).indexOf("auto")>-1?(a=(n=c.position()).top,r=n.left):(a=parseFloat(s)||0,r=parseFloat(d)||0),ve(t)&&(t=t.call(e,i,be.extend({},o))),null!=t.top&&(u.top=t.top-o.top+a),null!=t.left&&(u.left=t.left-o.left+r),"using"in t?t.using.call(e,u):c.css(u)}},be.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){be.offset.setOffset(this,e,t)});var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],r={top:0,left:0};if("fixed"===be.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===be.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((r=be(e).offset()).top+=be.css(e,"borderTopWidth",!0),r.left+=be.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-be.css(n,"marginTop",!0),left:t.left-r.left-be.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===be.css(e,"position");)e=e.offsetParent;return e||et})}}),be.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i="pageYOffset"===t;be.fn[e]=function(n){return Je(this,function(e,n,r){var s;if(ye(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===r)return s?s[t]:e[n];s?s.scrollTo(i?s.pageXOffset:r,i?r:s.pageYOffset):e[n]=r},e,n,arguments.length)}}),be.each(["top","left"],function(e,t){be.cssHooks[t]=F(ge.pixelPosition,function(e,i){if(i)return i=J(e,t),dt.test(i)?be(e).position()[t]+"px":i})}),be.each({Height:"height",Width:"width"},function(e,t){be.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){be.fn[n]=function(r,s){var a=arguments.length&&(i||"boolean"!=typeof r),o=i||(!0===r||!0===s?"margin":"border");return Je(this,function(t,i,r){var s;return ye(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===r?be.css(t,i,o):be.style(t,i,r,o)},t,a?r:void 0,a)}})}),be.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){be.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),be.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),be.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}}),be.proxy=function(e,t){var i,n,r;if("string"==typeof t&&(i=e[t],t=e,e=i),ve(e))return n=de.call(arguments,2),r=function(){return e.apply(t||this,n.concat(de.call(arguments)))},r.guid=e.guid=e.guid||be.guid++,r},be.holdReady=function(e){e?be.readyWait++:be.ready(!0)},be.isArray=Array.isArray,be.parseJSON=JSON.parse,be.nodeName=s,be.isFunction=ve,be.isWindow=ye,be.camelCase=m,be.type=n,be.now=Date.now,be.isNumeric=function(e){var t=be.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return be});var Ut=e.jQuery,zt=e.$;return be.noConflict=function(t){return e.$===be&&(e.$=zt),t&&e.jQuery===be&&(e.jQuery=Ut),be},t||(e.jQuery=e.$=be),be}),function(){var e=this,t=e._,i={},n=Array.prototype,r=Object.prototype,s=Function.prototype,a=n.push,o=n.slice,d=n.concat,l=r.toString,c=r.hasOwnProperty,u=n.forEach,h=n.map,p=n.reduce,m=n.reduceRight,_=n.filter,f=n.every,g=n.some,v=n.indexOf,y=n.lastIndexOf,w=Array.isArray,b=Object.keys,M=s.bind,Y=function(e){return e instanceof Y?e:this instanceof Y?void(this._wrapped=e):new Y(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=Y),exports._=Y):e._=Y,Y.VERSION="1.5.1";var L=Y.each=Y.forEach=function(e,t,n){if(null!=e)if(u&&e.forEach===u)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(t.call(n,e[r],r,e)===i)return}else for(var a in e)if(Y.has(e,a)&&t.call(n,e[a],a,e)===i)return};Y.map=Y.collect=function(e,t,i){var n=[];return null==e?n:h&&e.map===h?e.map(t,i):(L(e,function(e,r,s){n.push(t.call(i,e,r,s))}),n)};var k="Reduce of empty array with no initial value";Y.reduce=Y.foldl=Y.inject=function(e,t,i,n){var r=arguments.length>2;if(null==e&&(e=[]),p&&e.reduce===p)return n&&(t=Y.bind(t,n)),r?e.reduce(t,i):e.reduce(t);if(L(e,function(e,s,a){r?i=t.call(n,i,e,s,a):(i=e,r=!0)}),!r)throw new TypeError(k);return i},Y.reduceRight=Y.foldr=function(e,t,i,n){var r=arguments.length>2;if(null==e&&(e=[]),m&&e.reduceRight===m)return n&&(t=Y.bind(t,n)),r?e.reduceRight(t,i):e.reduceRight(t);var s=e.length;if(s!==+s){var a=Y.keys(e);s=a.length}if(L(e,function(o,d,l){d=a?a[--s]:--s,r?i=t.call(n,i,e[d],d,l):(i=e[d],r=!0)}),!r)throw new TypeError(k);return i},Y.find=Y.detect=function(e,t,i){var n;return T(e,function(e,r,s){if(t.call(i,e,r,s))return n=e,!0}),n},Y.filter=Y.select=function(e,t,i){var n=[];return null==e?n:_&&e.filter===_?e.filter(t,i):(L(e,function(e,r,s){t.call(i,e,r,s)&&n.push(e)}),n)},Y.reject=function(e,t,i){return Y.filter(e,function(e,n,r){return!t.call(i,e,n,r)},i)},Y.every=Y.all=function(e,t,n){t||(t=Y.identity);var r=!0;return null==e?r:f&&e.every===f?e.every(t,n):(L(e,function(e,s,a){if(!(r=r&&t.call(n,e,s,a)))return i}),!!r)};var T=Y.some=Y.any=function(e,t,n){t||(t=Y.identity);var r=!1;return null==e?r:g&&e.some===g?e.some(t,n):(L(e,function(e,s,a){if(r||(r=t.call(n,e,s,a)))return i}),!!r)};Y.contains=Y.include=function(e,t){return null!=e&&(v&&e.indexOf===v?-1!=e.indexOf(t):T(e,function(e){return e===t}))},Y.invoke=function(e,t){var i=o.call(arguments,2),n=Y.isFunction(t);return Y.map(e,function(e){return(n?t:e[t]).apply(e,i)})},Y.pluck=function(e,t){return Y.map(e,function(e){return e[t]})},Y.where=function(e,t,i){return Y.isEmpty(t)?i?void 0:[]:Y[i?"find":"filter"](e,function(e){for(var i in t)if(t[i]!==e[i])return!1;return!0})},Y.findWhere=function(e,t){return Y.where(e,t,!0)},Y.max=function(e,t,i){if(!t&&Y.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&Y.isEmpty(e))return-1/0;var n={computed:-1/0,value:-1/0};return L(e,function(e,r,s){var a=t?t.call(i,e,r,s):e;a>n.computed&&(n={value:e,computed:a})}),n.value},Y.min=function(e,t,i){if(!t&&Y.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&Y.isEmpty(e))return 1/0;var n={computed:1/0,value:1/0};return L(e,function(e,r,s){var a=t?t.call(i,e,r,s):e;a<n.computed&&(n={value:e,computed:a})}),n.value},Y.shuffle=function(e){var t,i=0,n=[];return L(e,function(e){t=Y.random(i++),n[i-1]=n[t],n[t]=e}),n};var D=function(e){return Y.isFunction(e)?e:function(t){return t[e]}};Y.sortBy=function(e,t,i){var n=D(t);return Y.pluck(Y.map(e,function(e,t,r){return{value:e,index:t,criteria:n.call(i,e,t,r)}}).sort(function(e,t){var i=e.criteria,n=t.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(i<n||void 0===n)return-1}return e.index<t.index?-1:1}),"value")};var S=function(e,t,i,n){var r={},s=D(null==t?Y.identity:t);return L(e,function(t,a){var o=s.call(i,t,a,e);n(r,o,t)}),r};Y.groupBy=function(e,t,i){return S(e,t,i,function(e,t,i){(Y.has(e,t)?e[t]:e[t]=[]).push(i)})},Y.countBy=function(e,t,i){return S(e,t,i,function(e,t){Y.has(e,t)||(e[t]=0),e[t]++})},Y.sortedIndex=function(e,t,i,n){i=null==i?Y.identity:D(i);for(var r=i.call(n,t),s=0,a=e.length;s<a;){var o=s+a>>>1;i.call(n,e[o])<r?s=o+1:a=o}return s},Y.toArray=function(e){return e?Y.isArray(e)?o.call(e):e.length===+e.length?Y.map(e,Y.identity):Y.values(e):[]},Y.size=function(e){return null==e?0:e.length===+e.length?e.length:Y.keys(e).length},Y.first=Y.head=Y.take=function(e,t,i){if(null!=e)return null==t||i?e[0]:o.call(e,0,t)},Y.initial=function(e,t,i){return o.call(e,0,e.length-(null==t||i?1:t))},Y.last=function(e,t,i){if(null!=e)return null==t||i?e[e.length-1]:o.call(e,Math.max(e.length-t,0))},Y.rest=Y.tail=Y.drop=function(e,t,i){return o.call(e,null==t||i?1:t)},Y.compact=function(e){return Y.filter(e,Y.identity)};var x=function(e,t,i){return t&&Y.every(e,Y.isArray)?d.apply(i,e):(L(e,function(e){Y.isArray(e)||Y.isArguments(e)?t?a.apply(i,e):x(e,t,i):i.push(e)}),i)};Y.flatten=function(e,t){return x(e,t,[])},Y.without=function(e){return Y.difference(e,o.call(arguments,1))},Y.uniq=Y.unique=function(e,t,i,n){Y.isFunction(t)&&(n=i,i=t,t=!1);var r=i?Y.map(e,i,n):e,s=[],a=[];return L(r,function(i,n){(t?n&&a[a.length-1]===i:Y.contains(a,i))||(a.push(i),s.push(e[n]))}),s},Y.union=function(){return Y.uniq(Y.flatten(arguments,!0))},Y.intersection=function(e){var t=o.call(arguments,1);return Y.filter(Y.uniq(e),function(e){return Y.every(t,function(t){return Y.indexOf(t,e)>=0})})},Y.difference=function(e){var t=d.apply(n,o.call(arguments,1));return Y.filter(e,function(e){return!Y.contains(t,e)})},Y.zip=function(){for(var e=Y.max(Y.pluck(arguments,"length").concat(0)),t=new Array(e),i=0;i<e;i++)t[i]=Y.pluck(arguments,""+i);return t},Y.object=function(e,t){if(null==e)return{};for(var i={},n=0,r=e.length;n<r;n++)t?i[e[n]]=t[n]:i[e[n][0]]=e[n][1];return i},Y.indexOf=function(e,t,i){if(null==e)return-1;var n=0,r=e.length;if(i){if("number"!=typeof i)return n=Y.sortedIndex(e,t),e[n]===t?n:-1;n=i<0?Math.max(0,r+i):i}if(v&&e.indexOf===v)return e.indexOf(t,i);for(;n<r;n++)if(e[n]===t)return n;return-1},Y.lastIndexOf=function(e,t,i){if(null==e)return-1;var n=null!=i;if(y&&e.lastIndexOf===y)return n?e.lastIndexOf(t,i):e.lastIndexOf(t);for(var r=n?i:e.length;r--;)if(e[r]===t)return r;return-1},Y.range=function(e,t,i){arguments.length<=1&&(t=e||0,e=0),i=arguments[2]||1;for(var n=Math.max(Math.ceil((t-e)/i),0),r=0,s=new Array(n);r<n;)s[r++]=e,e+=i;return s};var C=function(){};Y.bind=function(e,t){var i,n;if(M&&e.bind===M)return M.apply(e,o.call(arguments,1));if(!Y.isFunction(e))throw new TypeError;return i=o.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,i.concat(o.call(arguments)));C.prototype=e.prototype;var r=new C;C.prototype=null;var s=e.apply(r,i.concat(o.call(arguments)));return Object(s)===s?s:r}},Y.partial=function(e){var t=o.call(arguments,1);return function(){return e.apply(this,t.concat(o.call(arguments)))}},Y.bindAll=function(e){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return L(t,function(t){e[t]=Y.bind(e[t],e)}),e},Y.memoize=function(e,t){var i={};return t||(t=Y.identity),function(){var n=t.apply(this,arguments);return Y.has(i,n)?i[n]:i[n]=e.apply(this,arguments)}},Y.delay=function(e,t){var i=o.call(arguments,2);return setTimeout(function(){return e.apply(null,i)},t)},Y.defer=function(e){return Y.delay.apply(Y,[e,1].concat(o.call(arguments,1)))},Y.throttle=function(e,t,i){var n,r,s,a=null,o=0;i||(i={});var d=function(){o=!1===i.leading?0:new Date,a=null,s=e.apply(n,r)};return function(){var l=new Date;o||!1!==i.leading||(o=l);var c=t-(l-o);return n=this,r=arguments,c<=0?(clearTimeout(a),a=null,o=l,s=e.apply(n,r)):a||!1===i.trailing||(a=setTimeout(d,c)),s}},Y.debounce=function(e,t,i){var n,r=null;return function(){var s=this,a=arguments,o=function(){r=null,i||(n=e.apply(s,a))},d=i&&!r;return clearTimeout(r),r=setTimeout(o,t),d&&(n=e.apply(s,a)),n}},Y.once=function(e){var t,i=!1;return function(){return i?t:(i=!0,t=e.apply(this,arguments),e=null,t)}},Y.wrap=function(e,t){return function(){var i=[e];return a.apply(i,arguments),t.apply(this,i)}},Y.compose=function(){var e=arguments;return function(){for(var t=arguments,i=e.length-1;i>=0;i--)t=[e[i].apply(this,t)];return t[0]}},Y.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},Y.keys=b||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var i in e)Y.has(e,i)&&t.push(i);return t},Y.values=function(e){var t=[];for(var i in e)Y.has(e,i)&&t.push(e[i]);return t},Y.pairs=function(e){var t=[];for(var i in e)Y.has(e,i)&&t.push([i,e[i]]);return t},Y.invert=function(e){var t={};for(var i in e)Y.has(e,i)&&(t[e[i]]=i);return t},Y.functions=Y.methods=function(e){var t=[]
;for(var i in e)Y.isFunction(e[i])&&t.push(i);return t.sort()},Y.extend=function(e){return L(o.call(arguments,1),function(t){if(t)for(var i in t)e[i]=t[i]}),e},Y.pick=function(e){var t={},i=d.apply(n,o.call(arguments,1));return L(i,function(i){i in e&&(t[i]=e[i])}),t},Y.omit=function(e){var t={},i=d.apply(n,o.call(arguments,1));for(var r in e)Y.contains(i,r)||(t[r]=e[r]);return t},Y.defaults=function(e){return L(o.call(arguments,1),function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e},Y.clone=function(e){return Y.isObject(e)?Y.isArray(e)?e.slice():Y.extend({},e):e},Y.tap=function(e,t){return t(e),e};var H=function(e,t,i,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof Y&&(e=e._wrapped),t instanceof Y&&(t=t._wrapped);var r=l.call(e);if(r!=l.call(t))return!1;switch(r){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var s=i.length;s--;)if(i[s]==e)return n[s]==t;var a=e.constructor,o=t.constructor;if(a!==o&&!(Y.isFunction(a)&&a instanceof a&&Y.isFunction(o)&&o instanceof o))return!1;i.push(e),n.push(t);var d=0,c=!0;if("[object Array]"==r){if(d=e.length,c=d==t.length)for(;d--&&(c=H(e[d],t[d],i,n)););}else{for(var u in e)if(Y.has(e,u)&&(d++,!(c=Y.has(t,u)&&H(e[u],t[u],i,n))))break;if(c){for(u in t)if(Y.has(t,u)&&!d--)break;c=!d}}return i.pop(),n.pop(),c};Y.isEqual=function(e,t){return H(e,t,[],[])},Y.isEmpty=function(e){if(null==e)return!0;if(Y.isArray(e)||Y.isString(e))return 0===e.length;for(var t in e)if(Y.has(e,t))return!1;return!0},Y.isElement=function(e){return!(!e||1!==e.nodeType)},Y.isArray=w||function(e){return"[object Array]"==l.call(e)},Y.isObject=function(e){return e===Object(e)},L(["Arguments","Function","String","Number","Date","RegExp"],function(e){Y["is"+e]=function(t){return l.call(t)=="[object "+e+"]"}}),Y.isArguments(arguments)||(Y.isArguments=function(e){return!(!e||!Y.has(e,"callee"))}),"function"!=typeof/./&&(Y.isFunction=function(e){return"function"==typeof e}),Y.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},Y.isNaN=function(e){return Y.isNumber(e)&&e!=+e},Y.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"==l.call(e)},Y.isNull=function(e){return null===e},Y.isUndefined=function(e){return void 0===e},Y.has=function(e,t){return c.call(e,t)},Y.noConflict=function(){return e._=t,this},Y.identity=function(e){return e},Y.times=function(e,t,i){for(var n=Array(Math.max(0,e)),r=0;r<e;r++)n[r]=t.call(i,r);return n},Y.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var j={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};j.unescape=Y.invert(j.escape);var Z={escape:new RegExp("["+Y.keys(j.escape).join("")+"]","g"),unescape:new RegExp("("+Y.keys(j.unescape).join("|")+")","g")};Y.each(["escape","unescape"],function(e){Y[e]=function(t){return null==t?"":(""+t).replace(Z[e],function(t){return j[e][t]})}}),Y.result=function(e,t){if(null!=e){var i=e[t];return Y.isFunction(i)?i.call(e):i}},Y.mixin=function(e){L(Y.functions(e),function(t){var i=Y[t]=e[t];Y.prototype[t]=function(){var e=[this._wrapped];return a.apply(e,arguments),E.call(this,i.apply(Y,e))}})};var P=0;Y.uniqueId=function(e){var t=++P+"";return e?e+t:t},Y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},X=/\\|'|\r|\n|\t|\u2028|\u2029/g;Y.template=function(e,t,i){var n;i=Y.defaults({},i,Y.templateSettings);var r=new RegExp([(i.escape||J).source,(i.interpolate||J).source,(i.evaluate||J).source].join("|")+"|$","g"),s=0,a="__p+='";e.replace(r,function(t,i,n,r,o){return a+=e.slice(s,o).replace(X,function(e){return"\\"+F[e]}),i&&(a+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),n&&(a+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),r&&(a+="';\n"+r+"\n__p+='"),s=o+t.length,t}),a+="';\n",i.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{n=new Function(i.variable||"obj","_",a)}catch(e){throw e.source=a,e}if(t)return n(t,Y);var o=function(e){return n.call(this,e,Y)};return o.source="function("+(i.variable||"obj")+"){\n"+a+"}",o},Y.chain=function(e){return Y(e).chain()};var E=function(e){return this._chain?Y(e).chain():e};Y.mixin(Y),L(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=n[e];Y.prototype[e]=function(){var i=this._wrapped;return t.apply(i,arguments),"shift"!=e&&"splice"!=e||0!==i.length||delete i[0],E.call(this,i)}}),L(["concat","join","slice"],function(e){var t=n[e];Y.prototype[e]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),Y.extend(Y.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscore",function(e){return function(){return e._}}(this)),define("text",["module"],function(e){"use strict";var t,i,n,r,s,a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],o=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,d=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,l="undefined"!=typeof location&&location.href,c=l&&location.protocol&&location.protocol.replace(/\:/,""),u=l&&location.hostname,h=l&&(location.port||void 0),p={},m=e.config&&e.config()||{};return t={version:"2.0.13+",strip:function(e){if(e){e=e.replace(o,"");var t=e.match(d);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:m.createXhr||function(){var e,t,i;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;t<3;t+=1){i=a[t];try{e=new ActiveXObject(i)}catch(e){}if(e){a=[i];break}}return e},parseName:function(e){var t,i,n,r=!1,s=e.lastIndexOf("."),a=0===e.indexOf("./")||0===e.indexOf("../");return-1!==s&&(!a||s>1)?(t=e.substring(0,s),i=e.substring(s+1)):t=e,n=i||t,s=n.indexOf("!"),-1!==s&&(r="strip"===n.substring(s+1),n=n.substring(0,s),i?i=n:t=n),{moduleName:t,ext:i,strip:r}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,i,n,r){var s,a,o,d=t.xdRegExp.exec(e);return!d||(s=d[2],a=d[3],a=a.split(":"),o=a[1],a=a[0],!(s&&s!==i||a&&a.toLowerCase()!==n.toLowerCase()||(o||a)&&o!==r))},finishLoad:function(e,i,n,r){n=i?t.strip(n):n,m.isBuild&&(p[e]=n),r(n)},load:function(e,i,n,r){if(r&&r.isBuild&&!r.inlineText)return void n();m.isBuild=r&&r.isBuild;var s=t.parseName(e),a=s.moduleName+(s.ext?"."+s.ext:""),o=i.toUrl(a),d=m.useXhr||t.useXhr;if(0===o.indexOf("empty:"))return void n();!l||d(o,c,u,h)?t.get(o,function(i){t.finishLoad(e,s.strip,i,n)},function(e){n.error&&n.error(e)}):i([a],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,n)})},write:function(e,i,n,r){if(p.hasOwnProperty(i)){var s=t.jsEscape(p[i]);n.asModule(e+"!"+i,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,i,n,r,s){var a=t.parseName(i),o=a.ext?"."+a.ext:"",d=a.moduleName+o,l=n.toUrl(a.moduleName+o)+".js";t.load(d,n,function(i){var n=function(e){return r(l,e)};n.asModule=function(e,t){return r.asModule(e,l,t)},t.write(e,d,n,s)},s)}},"node"===m.env||!m.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(i=require.nodeRequire("fs"),t.get=function(e,t,n){try{var r=i.readFileSync(e,"utf8");"\ufeff"===r[0]&&(r=r.substring(1)),t(r)}catch(e){n&&n(e)}}):"xhr"===m.env||!m.env&&t.createXhr()?t.get=function(e,i,n,r){var s,a=t.createXhr();if(a.open("GET",e,!0),r)for(s in r)r.hasOwnProperty(s)&&a.setRequestHeader(s.toLowerCase(),r[s]);m.onXhr&&m.onXhr(a,e),a.onreadystatechange=function(t){var r,s;4===a.readyState&&(r=a.status||0,r>399&&r<600?(s=new Error(e+" HTTP status: "+r),s.xhr=a,n&&n(s)):i(a.responseText),m.onXhrComplete&&m.onXhrComplete(a,e))},a.send(null)}:"rhino"===m.env||!m.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var i,n,r=new java.io.File(e),s=java.lang.System.getProperty("line.separator"),a=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),"utf-8")),o="";try{for(i=new java.lang.StringBuffer,n=a.readLine(),n&&n.length()&&65279===n.charAt(0)&&(n=n.substring(1)),null!==n&&i.append(n);null!==(n=a.readLine());)i.append(s),i.append(n);o=String(i.toString())}finally{a.close()}t(o)}:("xpconnect"===m.env||!m.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(n=Components.classes,r=Components.interfaces,Components.utils.import("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in n,t.get=function(e,t){var i,a,o,d={};s&&(e=e.replace(/\//g,"\\")),o=new FileUtils.File(e);try{i=n["@mozilla.org/network/file-input-stream;1"].createInstance(r.nsIFileInputStream),i.init(o,1,0,!1),a=n["@mozilla.org/intl/converter-input-stream;1"].createInstance(r.nsIConverterInputStream),a.init(i,"utf-8",i.available(),r.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(i.available(),d),a.close(),i.close(),t(d.value)}catch(e){throw new Error((o&&o.path||"")+": "+e)}}),t}),define("pinyin-by-unicode",{strChineseFirstPY:"[encoded data, 20902 characters]"}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("moment",t):e.moment=t()}(this,function(){"use strict";function e(){return Jt.apply(null,arguments)}function t(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e){return void 0===e}function r(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function a(e,t){var i,n=[];for(i=0;i<e.length;++i)n.push(t(e[i],i));return n}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){for(var i in t)o(t,i)&&(e[i]=t[i]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,i,n){return ge(e,t,i,n,!0).utc()}function c(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function u(e){if(null==e._isValid){var t=c(e),i=Ft.call(t.parsedDateParts,function(e){return null!=e}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i)
;if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function h(e){var t=l(NaN);return null!=e?d(c(t),e):c(t).userInvalidated=!0,t}function p(e,t){var i,r,s;if(n(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),n(t._i)||(e._i=t._i),n(t._f)||(e._f=t._f),n(t._l)||(e._l=t._l),n(t._strict)||(e._strict=t._strict),n(t._tzm)||(e._tzm=t._tzm),n(t._isUTC)||(e._isUTC=t._isUTC),n(t._offset)||(e._offset=t._offset),n(t._pf)||(e._pf=c(t)),n(t._locale)||(e._locale=t._locale),Xt.length>0)for(i=0;i<Xt.length;i++)n(s=t[r=Xt[i]])||(e[r]=s);return e}function m(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===Et&&(Et=!0,e.updateOffset(this),Et=!1)}function _(e){return e instanceof m||null!=e&&null!=e._isAMomentObject}function f(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=f(t)),i}function v(e,t,i){var n,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<r;n++)(i&&e[n]!==t[n]||!i&&g(e[n])!==g(t[n]))&&a++;return a+s}function y(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function w(t,i){var n=!0;return d(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),n){for(var r,s=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){r+="\n["+a+"] ";for(var o in arguments[0])r+=o+": "+arguments[0][o]+", ";r=r.slice(0,-2)}else r=arguments[a];s.push(r)}y(t+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return i.apply(this,arguments)},i)}function b(t,i){null!=e.deprecationHandler&&e.deprecationHandler(t,i),$t[t]||(y(i),$t[t]=!0)}function M(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function Y(e,t){var n,r=d({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=d({},r[n]));return r}function L(e){null!=e&&this.set(e)}function k(e,t){var i=e.toLowerCase();Nt[i]=Nt[i+"s"]=Nt[t]=e}function T(e){return"string"==typeof e?Nt[e]||Nt[e.toLowerCase()]:void 0}function D(e){var t,i,n={};for(i in e)o(e,i)&&(t=T(i))&&(n[t]=e[i]);return n}function S(e,t){Wt[e]=t}function x(e,t,i){var n=""+Math.abs(e),r=t-n.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function C(e,t,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),e&&(Rt[e]=r),t&&(Rt[t[0]]=function(){return x(r.apply(this,arguments),t[1],t[2])}),i&&(Rt[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function H(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function j(e,t){return e.isValid()?(t=Z(t,e.localeData()),Qt[t]=Qt[t]||function(e){var t,i,n=e.match(At);for(t=0,i=n.length;t<i;t++)Rt[n[t]]?n[t]=Rt[n[t]]:n[t]=H(n[t]);return function(t){var r,s="";for(r=0;r<i;r++)s+=M(n[r])?n[r].call(t,e):n[r];return s}}(t),Qt[t](e)):e.localeData().invalidDate()}function Z(e,t){function i(e){return t.longDateFormat(e)||e}var n=5;for(Bt.lastIndex=0;n>=0&&Bt.test(e);)e=e.replace(Bt,i),Bt.lastIndex=0,n-=1;return e}function P(e,t,i){li[e]=M(t)?t:function(e,n){return e&&i?i:t}}function J(e,t){return o(li,e)?li[e](t._strict,t._locale):new RegExp(function(e){return F(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,r){return t||i||n||r}))}(e))}function F(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(e,t){var i,n=t;for("string"==typeof e&&(e=[e]),r(t)&&(n=function(e,i){i[t]=g(e)}),i=0;i<e.length;i++)ci[e[i]]=n}function E(e,t){X(e,function(e,i,n,r){n._w=n._w||{},t(e,n._w,n,r)})}function $(e,t,i){null!=t&&o(ci,e)&&ci[e](t,i._a,i,e)}function O(e){return N(e)?366:365}function N(e){return e%4==0&&e%100!=0||e%400==0}function W(t,i){return function(n){return null!=n?(B(this,t,n),e.updateOffset(this,i),this):A(this,t)}}function A(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function B(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&N(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),Q(i,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](i))}function Q(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=function(e,t){return(e%12+12)%12}(t);return e+=(t-i)/12,1===i?N(e)?29:28:31-i%7%2}function R(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=g(t);else if(t=e.localeData().monthsParse(t),!r(t))return e;return i=Math.min(e.date(),Q(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function I(t){return null!=t?(R(this,t),e.updateOffset(this,!0),this):A(this,"Month")}function G(){function e(e,t){return t.length-e.length}var t,i,n=[],r=[],s=[];for(t=0;t<12;t++)i=l([2e3,t]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)n[t]=F(n[t]),r[t]=F(r[t]);for(t=0;t<24;t++)s[t]=F(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function K(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function U(e,t,i){var n=7+t-i;return-(7+K(e,0,n).getUTCDay()-t)%7+n-1}function z(e,t,i,n,r){var s,a,o=1+7*(t-1)+(7+i-n)%7+U(e,n,r);return o<=0?a=O(s=e-1)+o:o>O(e)?(s=e+1,a=o-O(e)):(s=e,a=o),{year:s,dayOfYear:a}}function V(e,t,i){var n,r,s=U(e.year(),t,i),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?n=a+q(r=e.year()-1,t,i):a>q(e.year(),t,i)?(n=a-q(e.year(),t,i),r=e.year()+1):(r=e.year(),n=a),{week:n,year:r}}function q(e,t,i){var n=U(e,t,i),r=U(e+1,t,i);return(O(e)-n+r)/7}function ee(){function e(e,t){return t.length-e.length}var t,i,n,r,s,a=[],o=[],d=[],c=[];for(t=0;t<7;t++)i=l([2e3,1]).day(t),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),s=this.weekdays(i,""),a.push(n),o.push(r),d.push(s),c.push(n),c.push(r),c.push(s);for(a.sort(e),o.sort(e),d.sort(e),c.sort(e),t=0;t<7;t++)o[t]=F(o[t]),d[t]=F(d[t]),c[t]=F(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function te(){return this.hours()%12||12}function ie(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ne(e,t){return t._meridiemParse}function re(e){return e?e.toLowerCase().replace("_","-"):e}function se(e){var t=null;if(!Fi[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Zi._abbr,require("./locale/"+e),ae(t)}catch(e){}return Fi[e]}function ae(e,t){var i;return e&&(i=n(t)?de(e):oe(e,t))&&(Zi=i),Zi._abbr}function oe(e,t){if(null!==t){var i=Ji;if(t.abbr=e,null!=Fi[e])b("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Fi[e]._config;else if(null!=t.parentLocale){if(null==Fi[t.parentLocale])return Xi[t.parentLocale]||(Xi[t.parentLocale]=[]),Xi[t.parentLocale].push({name:e,config:t}),null;i=Fi[t.parentLocale]._config}return Fi[e]=new L(Y(i,t)),Xi[e]&&Xi[e].forEach(function(e){oe(e.name,e.config)}),ae(e),Fi[e]}return delete Fi[e],null}function de(e){var i;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Zi;if(!t(e)){if(i=se(e))return i;e=[e]}return function(e){for(var t,i,n,r,s=0;s<e.length;){for(t=(r=re(e[s]).split("-")).length,i=(i=re(e[s+1]))?i.split("-"):null;t>0;){if(n=se(r.slice(0,t).join("-")))return n;if(i&&i.length>=t&&v(r,i,!0)>=t-1)break;t--}s++}return null}(e)}function le(e){var t,i=e._a;return i&&-2===c(e).overflow&&(t=i[hi]<0||i[hi]>11?hi:i[pi]<1||i[pi]>Q(i[ui],i[hi])?pi:i[mi]<0||i[mi]>24||24===i[mi]&&(0!==i[_i]||0!==i[fi]||0!==i[gi])?mi:i[_i]<0||i[_i]>59?_i:i[fi]<0||i[fi]>59?fi:i[gi]<0||i[gi]>999?gi:-1,c(e)._overflowDayOfYear&&(t<ui||t>pi)&&(t=pi),c(e)._overflowWeeks&&-1===t&&(t=vi),c(e)._overflowWeekday&&-1===t&&(t=yi),c(e).overflow=t),e}function ce(e,t,i){return null!=e?e:null!=t?t:i}function ue(t){var i,n,r,s,a,o=[];if(!t._d){for(r=function(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}(t),t._w&&null==t._a[pi]&&null==t._a[hi]&&function(e){var t,i,n,r,s,a,o,d;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)s=1,a=4,i=ce(t.GG,e._a[ui],V(ve(),1,4).year),n=ce(t.W,1),((r=ce(t.E,1))<1||r>7)&&(d=!0);else{s=e._locale._week.dow,a=e._locale._week.doy;var l=V(ve(),s,a);i=ce(t.gg,e._a[ui],l.year),n=ce(t.w,l.week),null!=t.d?((r=t.d)<0||r>6)&&(d=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(d=!0)):r=s}n<1||n>q(i,s,a)?c(e)._overflowWeeks=!0:null!=d?c(e)._overflowWeekday=!0:(o=z(i,n,r,s,a),e._a[ui]=o.year,e._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(a=ce(t._a[ui],r[ui]),(t._dayOfYear>O(a)||0===t._dayOfYear)&&(c(t)._overflowDayOfYear=!0),n=K(a,0,t._dayOfYear),t._a[hi]=n.getUTCMonth(),t._a[pi]=n.getUTCDate()),i=0;i<3&&null==t._a[i];++i)t._a[i]=o[i]=r[i];for(;i<7;i++)t._a[i]=o[i]=null==t._a[i]?2===i?1:0:t._a[i];24===t._a[mi]&&0===t._a[_i]&&0===t._a[fi]&&0===t._a[gi]&&(t._nextDay=!0,t._a[mi]=0),t._d=(t._useUTC?K:function(e,t,i,n,r,s,a){var o=new Date(e,t,i,n,r,s,a);return e<100&&e>=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,o),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[mi]=24),t._w&&void 0!==t._w.d&&t._w.d!==s&&(c(t).weekdayMismatch=!0)}}function he(e){var t,i,n,r,s,a,o=e._i,d=Ei.exec(o)||$i.exec(o);if(d){for(c(e).iso=!0,t=0,i=Ni.length;t<i;t++)if(Ni[t][1].exec(d[1])){r=Ni[t][0],n=!1!==Ni[t][2];break}if(null==r)return void(e._isValid=!1);if(d[3]){for(t=0,i=Wi.length;t<i;t++)if(Wi[t][1].exec(d[3])){s=(d[2]||" ")+Wi[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(d[4]){if(!Oi.exec(d[4]))return void(e._isValid=!1);a="Z"}e._f=r+(s||"")+(a||""),_e(e)}else e._isValid=!1}function pe(e,t,i,n,r,s){var a=[function(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}(e),Li.indexOf(t),parseInt(i,10),parseInt(n,10),parseInt(r,10)];return s&&a.push(parseInt(s,10)),a}function me(e){var t=Bi.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e._i));if(t){var i=pe(t[4],t[3],t[2],t[5],t[6],t[7]);if(!function(e,t,i){return!e||Si.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(c(i).weekdayMismatch=!0,i._isValid=!1,!1)}(t[1],i,e))return;e._a=i,e._tzm=function(e,t,i){if(e)return Qi[e];if(t)return 0;var n=parseInt(i,10),r=n%100;return(n-r)/100*60+r}(t[8],t[9],t[10]),e._d=K.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),c(e).rfc2822=!0}else e._isValid=!1}function _e(t){if(t._f!==e.ISO_8601)if(t._f!==e.RFC_2822){t._a=[],c(t).empty=!0;var i,n,r,s,a,o=""+t._i,d=o.length,l=0;for(r=Z(t._f,t._locale).match(At)||[],i=0;i<r.length;i++)s=r[i],(n=(o.match(J(s,t))||[])[0])&&((a=o.substr(0,o.indexOf(n))).length>0&&c(t).unusedInput.push(a),o=o.slice(o.indexOf(n)+n.length),l+=n.length),Rt[s]?(n?c(t).empty=!1:c(t).unusedTokens.push(s),$(s,n,t)):t._strict&&!n&&c(t).unusedTokens.push(s);c(t).charsLeftOver=d-l,o.length>0&&c(t).unusedInput.push(o),t._a[mi]<=12&&!0===c(t).bigHour&&t._a[mi]>0&&(c(t).bigHour=void 0),c(t).parsedDateParts=t._a.slice(0),c(t).meridiem=t._meridiem,t._a[mi]=function(e,t,i){var n;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?((n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(t._locale,t._a[mi],t._meridiem),ue(t),le(t)}else me(t);else he(t)}function fe(o){var l=o._i,f=o._f;return o._locale=o._locale||de(o._l),null===l||void 0===f&&""===l?h({nullInput:!0}):("string"==typeof l&&(o._i=l=o._locale.preparse(l)),_(l)?new m(le(l)):(s(l)?o._d=l:t(f)?function(e){var t,i,n,r,s;if(0===e._f.length)return c(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],_e(t),u(t)&&(s+=c(t).charsLeftOver,s+=10*c(t).unusedTokens.length,c(t).score=s,(null==n||s<n)&&(n=s,i=t));d(e,i||t)}(o):f?_e(o):function(o){var d=o._i;n(d)?o._d=new Date(e.now()):s(d)?o._d=new Date(d.valueOf()):"string"==typeof d?function(t){var i=Ai.exec(t._i);null===i?(he(t),!1===t._isValid&&(delete t._isValid,me(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t)))):t._d=new Date(+i[1])}(o):t(d)?(o._a=a(d.slice(0),function(e){return parseInt(e,10)}),ue(o)):i(d)?function(e){if(!e._d){var t=D(e._i);e._a=a([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ue(e)}}(o):r(d)?o._d=new Date(d):e.createFromInputFallback(o)}(o),u(o)||(o._d=null),o))}function ge(e,n,r,s,a){var o={};return!0!==r&&!1!==r||(s=r,r=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||t(e)&&0===e.length)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=r,o._i=e,o._f=n,o._strict=s,function(e){var t=new m(le(fe(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(o)}function ve(e,t,i,n){return ge(e,t,i,n,!1)}function ye(e,i){var n,r;if(1===i.length&&t(i[0])&&(i=i[0]),!i.length)return ve();for(n=i[0],r=1;r<i.length;++r)i[r].isValid()&&!i[r][e](n)||(n=i[r]);return n}function we(e){var t=D(e),i=t.year||0,n=t.quarter||0,r=t.month||0,s=t.week||0,a=t.day||0,o=t.hour||0,d=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===wi.call(Gi,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var i=!1,n=0;n<Gi.length;++n)if(e[Gi[n]]){if(i)return!1;parseFloat(e[Gi[n]])!==g(e[Gi[n]])&&(i=!0)}return!0}(t),this._milliseconds=+c+1e3*l+6e4*d+1e3*o*60*60,this._days=+a+7*s,this._months=+r+3*n+12*i,this._data={},this._locale=de(),this._bubble()}function be(e){return e instanceof we}function Me(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ye(e,t){C(e,0,0,function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+x(~~(e/60),2)+t+x(~~e%60,2)})}function Le(e,t){var i=(t||"").match(e);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Ki)||["-",0,0],r=60*n[1]+g(n[2]);return 0===r?0:"+"===n[0]?r:-r}function ke(t,i){var n,r;return i._isUTC?(n=i.clone(),r=(_(t)||s(t)?t.valueOf():ve(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),e.updateOffset(n,!1),n):ve(t).local()}function Te(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function De(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Se(e,t){var i,n,s,a=e,d=null;return be(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:r(e)?(a={},t?a[t]=e:a.milliseconds=e):(d=Ui.exec(e))?(i="-"===d[1]?-1:1,a={y:0,d:g(d[pi])*i,h:g(d[mi])*i,m:g(d[_i])*i,s:g(d[fi])*i,ms:g(Me(1e3*d[gi]))*i}):(d=zi.exec(e))?(i="-"===d[1]?-1:(d[1],1),a={y:xe(d[2],i),M:xe(d[3],i),w:xe(d[4],i),d:xe(d[5],i),h:xe(d[6],i),m:xe(d[7],i),s:xe(d[8],i)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(s=function(e,t){var i;return e.isValid()&&t.isValid()?(t=ke(t,e),e.isBefore(t)?i=Ce(e,t):((i=Ce(t,e)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}(ve(a.from),ve(a.to)),(a={}).ms=s.milliseconds,a.M=s.months),n=new we(a),be(e)&&o(e,"_locale")&&(n._locale=e._locale),n}function xe(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function Ce(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function He(e,t){return function(i,n){var r,s;return null===n||isNaN(+n)||(b(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=n,n=s),i="string"==typeof i?+i:i,r=Se(i,n),je(this,r,e),this}}function je(t,i,n,r){var s=i._milliseconds,a=Me(i._days),o=Me(i._months);t.isValid()&&(r=null==r||r,o&&R(t,A(t,"Month")+o*n),a&&B(t,"Date",A(t,"Date")+a*n),s&&t._d.setTime(t._d.valueOf()+s*n),r&&e.updateOffset(t,a||o))}function Ze(e,t){var i,n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return i=t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r),-(n+i)||0}function Pe(e){var t;return void 0===e?this._locale._abbr:(null!=(t=de(e))&&(this._locale=t),this)}function Je(){return this._locale}function Fe(e,t){C(0,[e,e.length],0,t)}function Xe(e,t,i,n,r){var s;return null==e?V(this,n,r).year:(s=q(e,n,r),t>s&&(t=s),function(e,t,i,n,r){var s=z(e,t,i,n,r),a=K(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,i,n,r))}function Ee(e,t){t[gi]=g(1e3*("0."+e))}function $e(e){return e}function Oe(e,t,i,n){var r=de(),s=l().set(n,t);return r[i](s,e)}function Ne(e,t,i){if(r(e)&&(t=e,e=void 0),e=e||"",null!=t)return Oe(e,t,i,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Oe(e,n,i,"month");return s}function We(e,t,i,n){"boolean"==typeof e?(r(t)&&(i=t,t=void 0),t=t||""):(i=t=e,e=!1,r(t)&&(i=t,t=void 0),t=t||"");var s=de(),a=e?s._week.dow:0;if(null!=i)return Oe(t,(i+a)%7,n,"day");var o,d=[];for(o=0;o<7;o++)d[o]=Oe(t,(o+a)%7,n,"day");return d}function Ae(e,t,i,n){var r=Se(t,i);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}function Be(e){return e<0?Math.floor(e):Math.ceil(e)}function Qe(e){return 4800*e/146097}function Re(e){return 146097*e/4800}function Ie(e){return function(){return this.as(e)}}function Ge(e){return function(){return this.isValid()?this._data[e]:NaN}}function Ke(e){return(e>0)-(e<0)||+e}function Ue(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i=Dn(this._milliseconds)/1e3,n=Dn(this._days),r=Dn(this._months);t=f((e=f(i/60))/60),i%=60,e%=60;var s=f(r/12),a=r%=12,o=n,d=t,l=e,c=i?i.toFixed(3).replace(/\.?0+$/,""):"",u=this.asSeconds();if(!u)return"P0D";var h=u<0?"-":"",p=Ke(this._months)!==Ke(u)?"-":"",m=Ke(this._days)!==Ke(u)?"-":"",_=Ke(this._milliseconds)!==Ke(u)?"-":"";return h+"P"+(s?p+s+"Y":"")+(a?p+a+"M":"")+(o?m+o+"D":"")+(d||l||c?"T":"")+(d?_+d+"H":"")+(l?_+l+"M":"")+(c?_+c+"S":"")}function ze(e,t,i){return"m"===i?t?"хвіліна":"хвіліну":"h"===i?t?"гадзіна":"гадзіну":e+" "+function(e,t){var i=e.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}({ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[i],+e)}function Ve(e,t,i){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[i],e)}function qe(e){return e>9?qe(e%10):e}function et(e,t,i){var n=e+" ";switch(i){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}function tt(e){return e>1&&e<5&&1!=~~(e/10)}function it(e,t,i,n){var r=e+" ";switch(i){case"s":return t||n?"pár sekund":"pár sekundami";case"ss":return t||n?r+(tt(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":n?"minutu":"minutou";case"mm":return t||n?r+(tt(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?r+(tt(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||n?"den":"dnem";case"dd":return t||n?r+(tt(e)?"dny":"dní"):r+"dny";case"M":return t||n?"měsíc":"měsícem";case"MM":return t||n?r+(tt(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||n?"rok":"rokem";case"yy":return t||n?r+(tt(e)?"roky":"let"):r+"lety"}}function nt(e,t,i,n){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}function rt(e,t,i,n){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}function st(e,t,i,n){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}function at(e,t,i,n){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[i][2]?r[i][2]:r[i][1]:n?r[i][0]:r[i][1]}function ot(e,t,i,n){var r="";switch(i){case"s":return n?"muutaman sekunnin":"muutama sekunti";case"ss":return n?"sekunnin":"sekuntia";case"m":return n?"minuutin":"minuutti";case"mm":r=n?"minuutin":"minuuttia";break;case"h":return n?"tunnin":"tunti";case"hh":r=n?"tunnin":"tuntia";break;case"d":return n?"päivän":"päivä";case"dd":r=n?"päivän":"päivää";break;case"M":return n?"kuukauden":"kuukausi";case"MM":r=n?"kuukauden":"kuukautta";break;case"y":return n?"vuoden":"vuosi";case"yy":r=n?"vuoden":"vuotta"}return r=function(e,t){return e<10?t?cr[e]:lr[e]:e}(e,n)+" "+r}function dt(e,t,i,n){var r={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka horan","ek hor"],hh:[e+" horanim",e+" hor"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?r[i][0]:r[i][1]}function lt(e,t,i){var n=e+" ";switch(i){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}function ct(e,t,i,n){var r=e;switch(i){case"s":return n||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(n||t)?" másodperc":" másodperce";case"m":return"egy"+(n||t?" perc":" perce");case"mm":return r+(n||t?" perc":" perce");case"h":return"egy"+(n||t?" óra":" órája");case"hh":return r+(n||t?" óra":" órája");case"d":return"egy"+(n||t?" nap":" napja");case"dd":return r+(n||t?" nap":" napja");case"M":return"egy"+(n||t?" hónap":" hónapja");case"MM":return r+(n||t?" hónap":" hónapja");case"y":return"egy"+(n||t?" év":" éve");case"yy":return r+(n||t?" év":" éve")}return""}function ut(e){return(e?"":"[múlt] ")+"["+gr[this.day()]+"] LT[-kor]"}function ht(e){return e%100==11||e%10!=1}function pt(e,t,i,n){var r=e+" ";switch(i){case"s":return t||n?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return ht(e)?r+(t||n?"sekúndur":"sekúndum"):r+"sekúnda";case"m":return t?"mínúta":"mínútu";case"mm":return ht(e)?r+(t||n?"mínútur":"mínútum"):t?r+"mínúta":r+"mínútu";case"hh":return ht(e)?r+(t||n?"klukkustundir":"klukkustundum"):r+"klukkustund";case"d":return t?"dagur":n?"dag":"degi";case"dd":return ht(e)?t?r+"dagar":r+(n?"daga":"dögum"):t?r+"dagur":r+(n?"dag":"degi");case"M":return t?"mánuður":n?"mánuð":"mánuði";case"MM":return ht(e)?t?r+"mánuðir":r+(n?"mánuði":"mánuðum"):t?r+"mánuður":r+(n?"mánuð":"mánuði");case"y":return t||n?"ár":"ári";case"yy":return ht(e)?r+(t||n?"ár":"árum"):r+(t||n?"ár":"ári")}}function mt(e,t,i,n){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[i][0]:r[i][1]}function _t(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return _t(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return _t(e)}return e/=1e3,_t(e)}function ft(e,t,i,n){return t?vt(i)[0]:n?vt(i)[1]:vt(i)[2]}function gt(e){return e%10==0||e>10&&e<20}function vt(e){return Mr[e].split("_")}function yt(e,t,i,n){var r=e+" ";return 1===e?r+ft(0,t,i[0],n):t?r+(gt(e)?vt(i)[1]:vt(i)[0]):n?r+vt(i)[1]:r+(gt(e)?vt(i)[1]:vt(i)[2])}function wt(e,t,i){return i?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function bt(e,t,i){return e+" "+wt(Yr[i],e,t)}function Mt(e,t,i){return wt(Yr[i],e,t)}function Yt(e,t,i,n){var r="";if(t)switch(i){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे"}else switch(i){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां"}return r.replace(/%d/i,e)}function Lt(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function kt(e,t,i){var n=e+" ";switch(i){case"ss":return n+(Lt(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return n+(Lt(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return n+(Lt(e)?"godziny":"godzin");case"MM":return n+(Lt(e)?"miesiące":"miesięcy");case"yy":return n+(Lt(e)?"lata":"lat")}}function Tt(e,t,i){var n=" ";return(e%100>=20||e>=100&&e%100==0)&&(n=" de "),e+n+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[i]}function Dt(e,t,i){return"m"===i?t?"минута":"минуту":e+" "+function(e,t){var i=e.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}({ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[i],+e)}function St(e){return e>1&&e<5}function xt(e,t,i,n){var r=e+" ";switch(i){case"s":return t||n?"pár sekúnd":"pár sekundami";case"ss":return t||n?r+(St(e)?"sekundy":"sekúnd"):r+"sekundami";case"m":return t?"minúta":n?"minútu":"minútou";case"mm":return t||n?r+(St(e)?"minúty":"minút"):r+"minútami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?r+(St(e)?"hodiny":"hodín"):r+"hodinami";case"d":return t||n?"deň":"dňom";case"dd":return t||n?r+(St(e)?"dni":"dní"):r+"dňami";case"M":return t||n?"mesiac":"mesiacom";case"MM":return t||n?r+(St(e)?"mesiace":"mesiacov"):r+"mesiacmi";case"y":return t||n?"rok":"rokom";case"yy":return t||n?r+(St(e)?"roky":"rokov"):r+"rokmi"}}function Ct(e,t,i,n){var r=e+" ";switch(i){case"s":return t||n?"nekaj sekund":"nekaj sekundami";case"ss":return r+=1===e?t?"sekundo":"sekundi":2===e?t||n?"sekundi":"sekundah":e<5?t||n?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return r+=1===e?t?"minuta":"minuto":2===e?t||n?"minuti":"minutama":e<5?t||n?"minute":"minutami":t||n?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return r+=1===e?t?"ura":"uro":2===e?t||n?"uri":"urama":e<5?t||n?"ure":"urami":t||n?"ur":"urami";case"d":return t||n?"en dan":"enim dnem";case"dd":return r+=1===e?t||n?"dan":"dnem":2===e?t||n?"dni":"dnevoma":t||n?"dni":"dnevi";case"M":return t||n?"en mesec":"enim mesecem";case"MM":return r+=1===e?t||n?"mesec":"mesecem":2===e?t||n?"meseca":"mesecema":e<5?t||n?"mesece":"meseci":t||n?"mesecev":"meseci";case"y":return t||n?"eno leto":"enim letom";case"yy":return r+=1===e?t||n?"leto":"letom":2===e?t||n?"leti":"letoma":e<5?t||n?"leta":"leti":t||n?"let":"leti"}}function Ht(e,t,i,n){var r=function(e){var t=Math.floor(e%1e3/100),i=Math.floor(e%100/10),n=e%10,r="";return t>0&&(r+=Vr[t]+"vatlh"),i>0&&(r+=(""!==r?" ":"")+Vr[i]+"maH"),n>0&&(r+=(""!==r?" ":"")+Vr[n]),""===r?"pagh":r}(e);switch(i){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}function jt(e,t,i,n){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return n?r[i][0]:t?r[i][0]:r[i][1]}function Zt(e,t,i){return"m"===i?t?"хвилина":"хвилину":"h"===i?t?"година":"годину":e+" "+function(e,t){var i=e.split("_");return t%10==1&&t%100!=11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}({ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i],+e)}function Pt(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var Jt,Ft;Ft=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,n=0;n<i;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};var Xt=e.momentProperties=[],Et=!1,$t={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var Ot;Ot=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)o(e,t)&&i.push(t);return i};var Nt={},Wt={},At=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Bt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Qt={},Rt={},It=/\d/,Gt=/\d\d/,Kt=/\d{3}/,Ut=/\d{4}/,zt=/[+-]?\d{6}/,Vt=/\d\d?/,qt=/\d\d\d\d?/,ei=/\d\d\d\d\d\d?/,ti=/\d{1,3}/,ii=/\d{1,4}/,ni=/[+-]?\d{1,6}/,ri=/\d+/,si=/[+-]?\d+/,ai=/Z|[+-]\d\d:?\d\d/gi,oi=/Z|[+-]\d\d(?::?\d\d)?/gi,di=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,li={},ci={},ui=0,hi=1,pi=2,mi=3,_i=4,fi=5,gi=6,vi=7,yi=8;C("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),k("year","y"),S("year",1),P("Y",si),P("YY",Vt,Gt),P("YYYY",ii,Ut),P("YYYYY",ni,zt),P("YYYYYY",ni,zt),X(["YYYYY","YYYYYY"],ui),X("YYYY",function(t,i){i[ui]=2===t.length?e.parseTwoDigitYear(t):g(t)}),X("YY",function(t,i){i[ui]=e.parseTwoDigitYear(t)}),X("Y",function(e,t){t[ui]=parseInt(e,10)}),e.parseTwoDigitYear=function(e){return g(e)+(g(e)>68?1900:2e3)};var wi,bi=W("FullYear",!0)
;wi=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),k("month","M"),S("month",8),P("M",Vt),P("MM",Vt,Gt),P("MMM",function(e,t){return t.monthsShortRegex(e)}),P("MMMM",function(e,t){return t.monthsRegex(e)}),X(["M","MM"],function(e,t){t[hi]=g(e)-1}),X(["MMM","MMMM"],function(e,t,i,n){var r=i._locale.monthsParse(e,n,i._strict);null!=r?t[hi]=r:c(i).invalidMonth=e});var Mi=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Yi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Li="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ki=di,Ti=di;C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),S("week",5),S("isoWeek",5),P("w",Vt),P("ww",Vt,Gt),P("W",Vt),P("WW",Vt,Gt),E(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=g(e)}),C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),S("day",11),S("weekday",11),S("isoWeekday",11),P("d",Vt),P("e",Vt),P("E",Vt),P("dd",function(e,t){return t.weekdaysMinRegex(e)}),P("ddd",function(e,t){return t.weekdaysShortRegex(e)}),P("dddd",function(e,t){return t.weekdaysRegex(e)}),E(["dd","ddd","dddd"],function(e,t,i,n){var r=i._locale.weekdaysParse(e,n,i._strict);null!=r?t.d=r:c(i).invalidWeekday=e}),E(["d","e","E"],function(e,t,i,n){t[n]=g(e)});var Di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Si="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ci=di,Hi=di,ji=di;C("H",["HH",2],0,"hour"),C("h",["hh",2],0,te),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+te.apply(this)+x(this.minutes(),2)}),C("hmmss",0,0,function(){return""+te.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+x(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)}),ie("a",!0),ie("A",!1),k("hour","h"),S("hour",13),P("a",ne),P("A",ne),P("H",Vt),P("h",Vt),P("k",Vt),P("HH",Vt,Gt),P("hh",Vt,Gt),P("kk",Vt,Gt),P("hmm",qt),P("hmmss",ei),P("Hmm",qt),P("Hmmss",ei),X(["H","HH"],mi),X(["k","kk"],function(e,t,i){var n=g(e);t[mi]=24===n?0:n}),X(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),X(["h","hh"],function(e,t,i){t[mi]=g(e),c(i).bigHour=!0}),X("hmm",function(e,t,i){var n=e.length-2;t[mi]=g(e.substr(0,n)),t[_i]=g(e.substr(n)),c(i).bigHour=!0}),X("hmmss",function(e,t,i){var n=e.length-4,r=e.length-2;t[mi]=g(e.substr(0,n)),t[_i]=g(e.substr(n,2)),t[fi]=g(e.substr(r)),c(i).bigHour=!0}),X("Hmm",function(e,t,i){var n=e.length-2;t[mi]=g(e.substr(0,n)),t[_i]=g(e.substr(n))}),X("Hmmss",function(e,t,i){var n=e.length-4,r=e.length-2;t[mi]=g(e.substr(0,n)),t[_i]=g(e.substr(n,2)),t[fi]=g(e.substr(r))});var Zi,Pi=W("Hours",!0),Ji={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Yi,monthsShort:Li,week:{dow:0,doy:6},weekdays:Di,weekdaysMin:xi,weekdaysShort:Si,meridiemParse:/[ap]\.?m?\.?/i},Fi={},Xi={},Ei=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,$i=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oi=/Z|[+-]\d\d(?::?\d\d)?/,Ni=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Wi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ai=/^\/?Date\((\-?\d+)/i,Bi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Qi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};e.createFromInputFallback=w("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var Ri=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ve.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:h()}),Ii=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ve.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:h()}),Gi=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ye("Z",":"),Ye("ZZ",""),P("Z",oi),P("ZZ",oi),X(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=Le(oi,e)});var Ki=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Ui=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,zi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Se.fn=we.prototype,Se.invalid=function(){return Se(NaN)};var Vi=He(1,"add"),qi=He(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fe("gggg","weekYear"),Fe("ggggg","weekYear"),Fe("GGGG","isoWeekYear"),Fe("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),S("weekYear",1),S("isoWeekYear",1),P("G",si),P("g",si),P("GG",Vt,Gt),P("gg",Vt,Gt),P("GGGG",ii,Ut),P("gggg",ii,Ut),P("GGGGG",ni,zt),P("ggggg",ni,zt),E(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,n){t[n.substr(0,2)]=g(e)}),E(["gg","GG"],function(t,i,n,r){i[r]=e.parseTwoDigitYear(t)}),C("Q",0,"Qo","quarter"),k("quarter","Q"),S("quarter",7),P("Q",It),X("Q",function(e,t){t[hi]=3*(g(e)-1)}),C("D",["DD",2],"Do","date"),k("date","D"),S("date",9),P("D",Vt),P("DD",Vt,Gt),P("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),X(["D","DD"],pi),X("Do",function(e,t){t[pi]=g(e.match(Vt)[0])});var tn=W("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),S("dayOfYear",4),P("DDD",ti),P("DDDD",Kt),X(["DDD","DDDD"],function(e,t,i){i._dayOfYear=g(e)}),C("m",["mm",2],0,"minute"),k("minute","m"),S("minute",14),P("m",Vt),P("mm",Vt,Gt),X(["m","mm"],_i);var nn=W("Minutes",!1);C("s",["ss",2],0,"second"),k("second","s"),S("second",15),P("s",Vt),P("ss",Vt,Gt),X(["s","ss"],fi);var rn=W("Seconds",!1);C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),k("millisecond","ms"),S("millisecond",16),P("S",ti,It),P("SS",ti,Gt),P("SSS",ti,Kt);var sn;for(sn="SSSS";sn.length<=9;sn+="S")P(sn,ri);for(sn="S";sn.length<=9;sn+="S")X(sn,Ee);var an=W("Milliseconds",!1);C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var on=m.prototype;on.add=Vi,on.calendar=function(t,i){var n=t||ve(),r=ke(n,this).startOf("day"),s=e.calendarFormat(this,r)||"sameElse",a=i&&(M(i[s])?i[s].call(this,n):i[s]);return this.format(a||this.localeData().calendar(s,this,ve(n)))},on.clone=function(){return new m(this)},on.diff=function(e,t,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=ke(e,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),t=T(t)){case"year":s=Ze(this,n)/12;break;case"month":s=Ze(this,n);break;case"quarter":s=Ze(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-r)/864e5;break;case"week":s=(this-n-r)/6048e5;break;default:s=this-n}return i?s:f(s)},on.endOf=function(e){return void 0===(e=T(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},on.format=function(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var i=j(this,t);return this.localeData().postformat(i)},on.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||ve(e).isValid())?Se({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},on.fromNow=function(e){return this.from(ve(),e)},on.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||ve(e).isValid())?Se({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},on.toNow=function(e){return this.to(ve(),e)},on.get=function(e){return e=T(e),M(this[e])?this[e]():this},on.invalidAt=function(){return c(this).overflow},on.isAfter=function(e,t){var i=_(e)?e:ve(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=T(n(t)?"millisecond":t))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())},on.isBefore=function(e,t){var i=_(e)?e:ve(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=T(n(t)?"millisecond":t))?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())},on.isBetween=function(e,t,i,n){return("("===(n=n||"()")[0]?this.isAfter(e,i):!this.isBefore(e,i))&&(")"===n[1]?this.isBefore(t,i):!this.isAfter(t,i))},on.isSame=function(e,t){var i,n=_(e)?e:ve(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=T(t||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))},on.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},on.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},on.isValid=function(){return u(this)},on.lang=en,on.locale=Pe,on.localeData=Je,on.max=Ii,on.min=Ri,on.parsingFlags=function(){return d({},c(this))},on.set=function(e,t){if("object"==typeof e)for(var i=function(e){var t=[];for(var i in e)t.push({unit:i,priority:Wt[i]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=D(e)),n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit]);else if(e=T(e),M(this[e]))return this[e](t);return this},on.startOf=function(e){switch(e=T(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},on.subtract=qi,on.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},on.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?j(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",j(i,"Z")):j(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var i="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+r)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bi,on.isLeapYear=function(){return N(this.year())},on.weekYear=function(e){return Xe.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(e){return Xe.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},on.month=I,on.daysInMonth=function(){return Q(this.year(),this.month())},on.week=on.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},on.isoWeek=on.isoWeeks=function(e){var t=V(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},on.weeksInYear=function(){var e=this.localeData()._week;return q(this.year(),e.dow,e.doy)},on.isoWeeksInYear=function(){return q(this.year(),1,4)},on.date=tn,on.day=on.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},on.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},on.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},on.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},on.hour=on.hours=Pi,on.minute=on.minutes=nn,on.second=on.seconds=rn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,i,n){var r,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Le(oi,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&i&&(r=Te(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),s!==t&&(!i||this._changeInProgress?je(this,Se(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:Te(this)},on.utc=function(e){return this.utcOffset(0,e)},on.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Te(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Le(ai,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ve(e).utcOffset():0,(this.utcOffset()-e)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=De,on.isUTC=De,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=w("dates accessor is deprecated. Use date instead.",tn),on.months=w("months accessor is deprecated. Use month instead",I),on.years=w("years accessor is deprecated. Use year instead",bi),on.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),on.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!n(this._isDSTShifted))return this._isDSTShifted;var e={};if(p(e,this),(e=fe(e))._a){var t=e._isUTC?l(e._a):ve(e._a);this._isDSTShifted=this.isValid()&&v(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var dn=L.prototype;dn.calendar=function(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return M(n)?n.call(t,i):n},dn.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},dn.invalidDate=function(){return this._invalidDate},dn.ordinal=function(e){return this._ordinal.replace("%d",e)},dn.preparse=$e,dn.postformat=$e,dn.relativeTime=function(e,t,i,n){var r=this._relativeTime[i];return M(r)?r(e,t,i,n):r.replace(/%d/i,e)},dn.pastFuture=function(e,t){var i=this._relativeTime[e>0?"future":"past"];return M(i)?i(t):i.replace(/%s/i,t)},dn.set=function(e){var t,i;for(i in e)M(t=e[i])?this[i]=t:this["_"+i]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},dn.months=function(e,i){return e?t(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Mi).test(i)?"format":"standalone"][e.month()]:t(this._months)?this._months:this._months.standalone},dn.monthsShort=function(e,i){return e?t(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Mi.test(i)?"format":"standalone"][e.month()]:t(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},dn.monthsParse=function(e,t,i){var n,r,s;if(this._monthsParseExact)return function(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=l([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=wi.call(this._shortMonthsParse,a))?r:null:-1!==(r=wi.call(this._longMonthsParse,a))?r:null:"MMM"===t?-1!==(r=wi.call(this._shortMonthsParse,a))?r:-1!==(r=wi.call(this._longMonthsParse,a))?r:null:-1!==(r=wi.call(this._longMonthsParse,a))?r:-1!==(r=wi.call(this._shortMonthsParse,a))?r:null}.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=l([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},dn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||G.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Ti),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},dn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||G.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ki),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},dn.week=function(e){return V(e,this._week.dow,this._week.doy).week},dn.firstDayOfYear=function(){return this._week.doy},dn.firstDayOfWeek=function(){return this._week.dow},dn.weekdays=function(e,i){return e?t(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(i)?"format":"standalone"][e.day()]:t(this._weekdays)?this._weekdays:this._weekdays.standalone},dn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},dn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},dn.weekdaysParse=function(e,t,i){var n,r,s;if(this._weekdaysParseExact)return function(e,t,i){var n,r,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=l([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=wi.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=wi.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=wi.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=wi.call(this._weekdaysParse,a))?r:-1!==(r=wi.call(this._shortWeekdaysParse,a))?r:-1!==(r=wi.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=wi.call(this._shortWeekdaysParse,a))?r:-1!==(r=wi.call(this._weekdaysParse,a))?r:-1!==(r=wi.call(this._minWeekdaysParse,a))?r:null:-1!==(r=wi.call(this._minWeekdaysParse,a))?r:-1!==(r=wi.call(this._weekdaysParse,a))?r:-1!==(r=wi.call(this._shortWeekdaysParse,a))?r:null}.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=l([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}},dn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Ci),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},dn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},dn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||ee.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ji),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},dn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},dn.meridiem=function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},ae("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===g(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=w("moment.lang is deprecated. Use moment.locale instead.",ae),e.langData=w("moment.langData is deprecated. Use moment.localeData instead.",de);var ln=Math.abs,cn=Ie("ms"),un=Ie("s"),hn=Ie("m"),pn=Ie("h"),mn=Ie("d"),_n=Ie("w"),fn=Ie("M"),gn=Ie("y"),vn=Ge("milliseconds"),yn=Ge("seconds"),wn=Ge("minutes"),bn=Ge("hours"),Mn=Ge("days"),Yn=Ge("months"),Ln=Ge("years"),kn=Math.round,Tn={ss:44,s:45,m:45,h:22,d:26,M:11},Dn=Math.abs,Sn=we.prototype;Sn.isValid=function(){return this._isValid},Sn.abs=function(){var e=this._data;return this._milliseconds=ln(this._milliseconds),this._days=ln(this._days),this._months=ln(this._months),e.milliseconds=ln(e.milliseconds),e.seconds=ln(e.seconds),e.minutes=ln(e.minutes),e.hours=ln(e.hours),e.months=ln(e.months),e.years=ln(e.years),this},Sn.add=function(e,t){return Ae(this,e,t,1)},Sn.subtract=function(e,t){return Ae(this,e,t,-1)},Sn.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=T(e))||"year"===e)return t=this._days+n/864e5,i=this._months+Qe(t),"month"===e?i:i/12;switch(t=this._days+Math.round(Re(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Sn.asMilliseconds=cn,Sn.asSeconds=un,Sn.asMinutes=hn,Sn.asHours=pn,Sn.asDays=mn,Sn.asWeeks=_n,Sn.asMonths=fn,Sn.asYears=gn,Sn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12):NaN},Sn._bubble=function(){var e,t,i,n,r,s=this._milliseconds,a=this._days,o=this._months,d=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*Be(Re(o)+a),a=0,o=0),d.milliseconds=s%1e3,e=f(s/1e3),d.seconds=e%60,t=f(e/60),d.minutes=t%60,i=f(t/60),d.hours=i%24,a+=f(i/24),r=f(Qe(a)),o+=r,a-=Be(Re(r)),n=f(o/12),o%=12,d.days=a,d.months=o,d.years=n,this},Sn.clone=function(){return Se(this)},Sn.get=function(e){return e=T(e),this.isValid()?this[e+"s"]():NaN},Sn.milliseconds=vn,Sn.seconds=yn,Sn.minutes=wn,Sn.hours=bn,Sn.days=Mn,Sn.weeks=function(){return f(this.days()/7)},Sn.months=Yn,Sn.years=Ln,Sn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=function(e,t,i){var n=Se(e).abs(),r=kn(n.as("s")),s=kn(n.as("m")),a=kn(n.as("h")),o=kn(n.as("d")),d=kn(n.as("M")),l=kn(n.as("y")),c=r<=Tn.ss&&["s",r]||r<Tn.s&&["ss",r]||s<=1&&["m"]||s<Tn.m&&["mm",s]||a<=1&&["h"]||a<Tn.h&&["hh",a]||o<=1&&["d"]||o<Tn.d&&["dd",o]||d<=1&&["M"]||d<Tn.M&&["MM",d]||l<=1&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=i,function(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}.apply(null,c)}(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)},Sn.toISOString=Ue,Sn.toString=Ue,Sn.toJSON=Ue,Sn.locale=Pe,Sn.localeData=Je,Sn.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ue),Sn.lang=en,C("X",0,0,"unix"),C("x",0,0,"valueOf"),P("x",si),P("X",/[+-]?\d+(\.\d{1,3})?/),X("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),X("x",function(e,t,i){i._d=new Date(g(e))}),e.version="2.20.1",function(e){Jt=e}(ve),e.fn=on,e.min=function(){return ye("isBefore",[].slice.call(arguments,0))},e.max=function(){return ye("isAfter",[].slice.call(arguments,0))},e.now=function(){return Date.now?Date.now():+new Date},e.utc=l,e.unix=function(e){return ve(1e3*e)},e.months=function(e,t){return Ne(e,t,"months")},e.isDate=s,e.locale=ae,e.invalid=h,e.duration=Se,e.isMoment=_,e.weekdays=function(e,t,i){return We(e,t,i,"weekdays")},e.parseZone=function(){return ve.apply(null,arguments).parseZone()},e.localeData=de,e.isDuration=be,e.monthsShort=function(e,t){return Ne(e,t,"monthsShort")},e.weekdaysMin=function(e,t,i){return We(e,t,i,"weekdaysMin")},e.defineLocale=oe,e.updateLocale=function(e,t){if(null!=t){var i,n,r=Ji;null!=(n=se(e))&&(r=n._config),(i=new L(t=Y(r,t))).parentLocale=Fi[e],Fi[e]=i,ae(e)}else null!=Fi[e]&&(null!=Fi[e].parentLocale?Fi[e]=Fi[e].parentLocale:null!=Fi[e]&&delete Fi[e]);return Fi[e]},e.locales=function(){return Ot(Fi)},e.weekdaysShort=function(e,t,i){return We(e,t,i,"weekdaysShort")},e.normalizeUnits=T,e.relativeTimeRounding=function(e){return void 0===e?kn:"function"==typeof e&&(kn=e,!0)},e.relativeTimeThreshold=function(e,t){return void 0!==Tn[e]&&(void 0===t?Tn[e]:(Tn[e]=t,"s"===e&&(Tn.ss=t-1),!0))},e.calendarFormat=function(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},e.prototype=on,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}}),e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}}),e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});var xn={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},Cn=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},Hn={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},jn=function(e){return function(t,i,n,r){var s=Cn(t),a=Hn[e][Cn(t)];return 2===s&&(a=a[i?0:1]),a.replace(/%d/i,t)}},Zn=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:Zn,monthsShort:Zn,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:jn("s"),ss:jn("s"),m:jn("m"),mm:jn("m"),h:jn("h"),hh:jn("h"),d:jn("d"),dd:jn("d"),M:jn("M"),MM:jn("M"),y:jn("y"),yy:jn("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return xn[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});var Pn={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Jn={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Jn[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Pn[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}}),e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});var Fn={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Xn={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},En=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},$n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},On=function(e){return function(t,i,n,r){var s=En(t),a=$n[e][En(t)];return 2===s&&(a=a[i?0:1]),a.replace(/%d/i,t)}},Nn=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:Nn,monthsShort:Nn,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:On("s"),ss:On("s"),m:On("m"),mm:On("m"),h:On("h"),hh:On("h"),d:On("d"),dd:On("d"),M:On("M"),MM:On("M"),y:On("y"),yy:On("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Xn[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Fn[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});var Wn={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,t,i){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10;return e+(Wn[t]||Wn[e%100-t]||Wn[e>=100?100:null])},week:{dow:1,doy:7}}),e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:ze,mm:ze,h:ze,hh:ze,d:"дзень",dd:ze,M:"месяц",MM:ze,y:"год",yy:ze},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}}),e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}}),e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var An={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},Bn={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return Bn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return An[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,i){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});var Qn={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},Rn={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return Rn[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Qn[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,i){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}}),e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:Ve,h:"un eur",hh:"%d eur",d:"un devezh",dd:Ve,M:"ur miz",MM:Ve,y:"ur bloaz",yy:function(e){switch(qe(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}}),e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:et,m:et,mm:et,h:et,hh:et,d:"dan",dd:et,M:"mjesec",MM:et,y:"godinu",yy:et},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var i=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(i="a"),e+i},week:{dow:1,doy:4}});var In="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),Gn="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");e.defineLocale("cs",{months:In,monthsShort:Gn,monthsParse:function(e,t){var i,n=[];for(i=0;i<12;i++)n[i]=new RegExp("^"+e[i]+"$|^"+t[i]+"$","i");return n}(In,Gn),shortMonthsParse:function(e){var t,i=[];for(t=0;t<12;t++)i[t]=new RegExp("^"+e[t]+"$","i");return i}(Gn),longMonthsParse:function(e){var t,i=[];for(t=0;t<12;t++)i[t]=new RegExp("^"+e[t]+"$","i");return i}(In),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:it,ss:it,m:it,mm:it,h:it,hh:it,d:it,dd:it,M:it,MM:it,y:it,yy:it},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"рен":/\u04ab\u0443\u043b$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-мӗш",week:{dow:1,doy:7}}),e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}}),e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:nt,mm:"%d Minuten",h:nt,hh:"%d Stunden",d:nt,dd:nt,M:nt,MM:nt,y:nt,yy:nt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:rt,mm:"%d Minuten",h:rt,hh:"%d Stunden",d:rt,dd:rt,M:rt,MM:rt,y:rt,yy:rt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:st,mm:"%d Minuten",h:st,hh:"%d Stunden",d:st,dd:st,M:st,MM:st,y:st,yy:st},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Kn=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],Un=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:Kn,monthsShort:Kn,weekdays:Un,weekdaysShort:Un,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,i){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}}),e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,i){return e>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var i=this._calendarEl[e],n=t&&t.hours();return M(i)&&(i=i.apply(t)),i.replace("{}",n%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%dη",week:{dow:1,doy:4}}),e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,i){return e>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var zn="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),Vn="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),qn=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],er=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Vn[e.month()]:zn[e.month()]:zn},monthsRegex:er,monthsShortRegex:er,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:qn,longMonthsParse:qn,shortMonthsParse:qn,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}});var tr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),ir="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?ir[e.month()]:tr[e.month()]:tr},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM [de] D [de] YYYY",LLL:"MMMM [de] D [de] YYYY h:mm A",LLLL:"dddd, MMMM [de] D [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:0,doy:6}});var nr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),rr="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),sr=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],ar=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?rr[e.month()]:nr[e.month()]:nr},monthsRegex:ar,monthsShortRegex:ar,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:sr,longMonthsParse:sr,shortMonthsParse:sr,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:at,ss:at,m:at,mm:at,h:at,hh:at,d:at,dd:"%d päeva",M:at,MM:at,y:at,yy:at},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var or={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},dr={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,t,i){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,function(e){return dr[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return or[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%dم",week:{dow:6,doy:12}});var lr="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),cr=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",lr[7],lr[8],lr[9]];e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:ot,ss:ot,m:ot,mm:ot,h:ot,hh:ot,d:ot,dd:ot,M:ot,MM:ot,y:ot,yy:ot},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}}),e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var ur="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),hr="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?hr[e.month()]:ur[e.month()]:ur},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}}),e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:dt,ss:dt,m:dt,mm:dt,h:dt,hh:dt,d:dt,dd:dt,M:dt,MM:dt,y:dt,yy:dt},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});var pr={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},mr={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,function(e){return mr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return pr[e]})},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}}),e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,t,i){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?i?'לפנה"צ':"לפני הצהריים":e<18?i?'אחה"צ':"אחרי הצהריים":"בערב"}});var _r={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},fr={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return fr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return _r[e]})},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}}),e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:
case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:lt,m:lt,mm:lt,h:lt,hh:lt,d:"dan",dd:lt,M:"mjesec",MM:lt,y:"godinu",yy:lt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var gr="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,i){return e<12?!0===i?"de":"DE":!0===i?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return ut.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return ut.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:ct,ss:ct,m:ct,mm:ct,h:ct,hh:ct,d:ct,dd:ct,M:ct,MM:ct,y:ct,yy:ct},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}}),e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:pt,ss:pt,m:pt,mm:pt,h:"klukkustund",hh:pt,d:pt,dd:pt,M:pt,MM:pt,y:pt,yy:pt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 HH:mm dddd",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日 HH:mm dddd"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,i){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10ec\u10d4\u10da\u10d8)/.test(e)?e.replace(/\u10d8$/,"ში"):e+"ში"},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"ის უკან"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"წლის უკან"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});var vr={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(vr[e]||vr[e%10]||vr[e>=100?100:null])},week:{dow:1,doy:7}}),e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}});var yr={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},wr={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,function(e){return wr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return yr[e]})},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}}),e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"오후"===e},meridiem:function(e,t,i){return e<12?"오전":"오후"}});var br={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(br[e]||br[e%10]||br[e>=100?100:null])},week:{dow:1,doy:7}}),e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return _t(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return _t(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:mt,mm:"%d Minutten",h:mt,hh:"%d Stonnen",d:mt,dd:"%d Deeg",M:mt,MM:"%d Méint",y:mt,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,i){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});var Mr={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,i,n){return t?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"},ss:yt,m:ft,mm:yt,h:ft,hh:yt,d:ft,dd:yt,M:ft,MM:yt,y:ft,yy:yt},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var Yr={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:bt,m:Mt,mm:bt,h:Mt,hh:bt,d:Mt,dd:bt,M:Mt,MM:bt,y:Mt,yy:bt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Lr={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,i){var n=Lr.words[i];return 1===i.length?t?n[0]:n[1]:e+" "+Lr.correctGrammaticalCase(e,n)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:Lr.translate,m:Lr.translate,mm:Lr.translate,h:Lr.translate,hh:Lr.translate,d:"dan",dd:Lr.translate,M:"mjesec",MM:Lr.translate,y:"godinu",yy:Lr.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}}),e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,i){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});var kr={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Tr={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:Yt,ss:Yt,m:Yt,mm:Yt,h:Yt,hh:Yt,d:Yt,dd:Yt,M:Yt,MM:Yt,y:Yt,yy:Yt},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Tr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return kr[e]})},meridiemParse:/\u0930\u093e\u0924\u094d\u0930\u0940|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}}),e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",
hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}});var Dr={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},Sr={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,function(e){return Sr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Dr[e]})},week:{dow:1,doy:4}}),e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var xr={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Cr={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,function(e){return Cr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return xr[e]})},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,i){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});var Hr="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),jr="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Zr=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Pr=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?jr[e.month()]:Hr[e.month()]:Hr},monthsRegex:Pr,monthsShortRegex:Pr,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Zr,longMonthsParse:Zr,shortMonthsParse:Zr,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});var Jr="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),Fr="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Xr=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],Er=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Fr[e.month()]:Jr[e.month()]:Jr},monthsRegex:Er,monthsShortRegex:Er,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:Xr,longMonthsParse:Xr,shortMonthsParse:Xr,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}}),e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var $r={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},Or={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,function(e){return Or[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return $r[e]})},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});var Nr="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),Wr="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");e.defineLocale("pl",{months:function(e,t){return e?""===t?"("+Wr[e.month()]+"|"+Nr[e.month()]+")":/D MMMM/.test(t)?Wr[e.month()]:Nr[e.month()]:Nr},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:kt,m:kt,mm:kt,h:kt,hh:kt,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:kt,y:"rok",yy:kt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº"}),e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%dº",week:{dow:1,doy:4}}),e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:Tt,m:"un minut",mm:Tt,h:"o oră",hh:Tt,d:"o zi",dd:Tt,M:"o lună",MM:Tt,y:"un an",yy:Tt},week:{dow:1,doy:7}});var Ar=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:Ar,longMonthsParse:Ar,shortMonthsParse:Ar,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:Dt,m:Dt,mm:Dt,h:"час",hh:Dt,d:"день",dd:Dt,M:"месяц",MM:Dt,y:"год",yy:Dt},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});var Br=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],Qr=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:Br,monthsShort:Br,weekdays:Qr,weekdaysShort:Qr,weekdaysMin:Qr,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" වැනි"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,i){return e>11?i?"ප.ව.":"පස් වරු":i?"පෙ.ව.":"පෙර වරු"}});var Rr="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),Ir="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");e.defineLocale("sk",{months:Rr,monthsShort:Ir,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:xt,ss:xt,m:xt,mm:xt,h:xt,hh:xt,d:xt,dd:xt,M:xt,MM:xt,y:xt,yy:xt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:Ct,ss:Ct,m:Ct,mm:Ct,h:Ct,hh:Ct,d:Ct,dd:Ct,M:Ct,MM:Ct,y:Ct,yy:Ct},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,i){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Gr={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,i){var n=Gr.words[i];return 1===i.length?t?n[0]:n[1]:e+" "+Gr.correctGrammaticalCase(e,n)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:Gr.translate,m:Gr.translate,mm:Gr.translate,h:Gr.translate,hh:Gr.translate,d:"дан",dd:Gr.translate,M:"месец",MM:Gr.translate,y:"годину",yy:Gr.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Kr={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,i){var n=Kr.words[i];return 1===i.length?t?n[0]:n[1]:e+" "+Kr.correctGrammaticalCase(e,n)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:Kr.translate,m:Kr.translate,mm:Kr.translate,h:Kr.translate,hh:Kr.translate,d:"dan",dd:Kr.translate,M:"mesec",MM:Kr.translate,y:"godinu",yy:Kr.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",
LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,i){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}}),e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var Ur={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},zr={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,function(e){return zr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ur[e]})},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,t,i){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}}),e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%dవ",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}}),e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sext_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Sex_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutus %d",h:"horas ida",hh:"horas %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,i){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var Vr="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:Ht,m:"wa’ tup",mm:Ht,h:"wa’ rep",hh:Ht,d:"wa’ jaj",dd:Ht,M:"wa’ jar",MM:Ht,y:"wa’ DIS",yy:Ht},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var qr={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},dayOfMonthOrdinalParse:/\d{1,2}'(inci|nci|\xfcnc\xfc|nc\u0131|uncu|\u0131nc\u0131)/,ordinal:function(e){if(0===e)return e+"'ıncı";var t=e%10;return e+(qr[t]||qr[e%100-t]||qr[e>=100?100:null])},week:{dow:1,doy:7}}),e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,i){return e>11?i?"d'o":"D'O":i?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:jt,ss:jt,m:jt,mm:jt,h:jt,hh:jt,d:jt,dd:jt,M:jt,MM:jt,y:jt,yy:jt},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}}),e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return e?i[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(t)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:i.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:Pt("[Сьогодні "),nextDay:Pt("[Завтра "),lastDay:Pt("[Вчора "),nextWeek:Pt("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return Pt("[Минулої] dddd [").call(this);case 1:case 2:case 4:return Pt("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:Zt,m:Zt,mm:Zt,h:"годину",hh:Zt,d:"день",dd:Zt,M:"місяць",MM:Zt,y:"рік",yy:Zt},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});var es=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],ts=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];return e.defineLocale("ur",{months:es,monthsShort:es,weekdays:ts,weekdaysShort:ts,weekdaysMin:ts,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}}),e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"sa":"SA":i?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}}),e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}}),e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),e.locale("en"),e}),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define("js.cookie",e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var i=window.Cookies,n=window.Cookies=e();n.noConflict=function(){return window.Cookies=i,n}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}function t(i){function n(t,r,s){var a;if("undefined"!=typeof document){if(arguments.length>1){if(s=e({path:"/"},n.defaults,s),"number"==typeof s.expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*s.expires),s.expires=o}s.expires=s.expires?s.expires.toUTCString():"";try{a=JSON.stringify(r),/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=i.write?i.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var d="";for(var l in s)s[l]&&(d+="; "+l,!0!==s[l]&&(d+="="+s[l]));return document.cookie=t+"="+r+d}t||(a={});for(var c=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,h=0;h<c.length;h++){var p=c[h].split("="),m=p.slice(1).join("=");this.json||'"'!==m.charAt(0)||(m=m.slice(1,-1));try{var _=p[0].replace(u,decodeURIComponent);if(m=i.read?i.read(m,_):i(m,_)||m.replace(u,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(e){}if(t===_){a=m;break}t||(a[_]=m)}catch(e){}}return a}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,i){n(t,"",e(i,{expires:-1}))},n.withConverter=t,n}return t(function(){})}),require.config({shim:{underscore:{exports:"_"},backbone:{deps:["underscore","jquery"],exports:"Backbone"},"backbone.paginator":{deps:["backbone"],exports:"BackbonePaginator"}},paths:{jquery:"lib/jquery.min","jquery.ui":"lib/jquery-ui.min","jquery.ui.widget":"lib/jquery.ui.widget.1.11.1",tmpl:"lib/tmpl.min","jquery.iframe-transport":"lib/jquery.iframe-transport","jquery.fileupload":"lib/jquery.fileupload","jquery.fileupload-process":"lib/jquery.fileupload-process","jquery.fileupload-validate":"lib/jquery.fileupload-validate","jquery.fileupload-ui":"lib/jquery.fileupload-ui","jquery.magnific-popup":"lib/jquery.magnific-popup.min","js.cookie":"lib/js.cookie",simplemodal:"lib/jquery.simplemodal",jstree:"lib/jstree.min",select2:"lib/select2-3.5.2",moment:"lib/moment-with-locales.min",marked:"lib/marked.min",underscore:"lib/underscore",backbone:"lib/backbone","backbone.paginator":"lib/backbone.paginator",text:"lib/text"}}),define("common",["jquery","underscore","text","pinyin-by-unicode","moment","js.cookie"],function(e,t,i,n,r,s){return{INFO_TIMEOUT:1e4,SUCCESS_TIMEOUT:3e3,ERROR_TIMEOUT:3e3,strChineseFirstPY:n.strChineseFirstPY,getUrl:function(e){var t=app.config.siteRoot,i=app.config.fileServerRoot;switch(e.name){case"list_lib_dir":return t+"ajax/lib/"+e.repo_id+"/dir/";case"del_dir":return t+"api/v2.1/repos/"+e.repo_id+"/dir/";case"del_file":case"get_file_info":return t+"api/v2.1/repos/"+e.repo_id+"/file/";case"download_dir_zip_url":return i+"zip/"+e.zip_token;case"zip_task":return t+"api/v2.1/repos/"+e.repo_id+"/zip-task/";case"query_zip_progress":return t+"api/v2.1/query-zip-progress/";case"cancel_zip_task":return t+"api/v2.1/cancel-zip-task/";case"copy_move_task":return t+"api/v2.1/copy-move-task/";case"query_copy_move_progress":return t+"api/v2.1/query-copy-move-progress/";case"rename_dir":return t+"api/v2.1/repos/"+e.repo_id+"/dir/";case"rename_file":case"lock_or_unlock_file":return t+"api/v2.1/repos/"+e.repo_id+"/file/";case"new_dir":return t+"api/v2.1/repos/"+e.repo_id+"/dir/";case"new_file":return t+"api/v2.1/repos/"+e.repo_id+"/file/";case"del_dirents":return t+"ajax/repo/"+e.repo_id+"/dirents/delete/";case"mv_dirents":return t+"ajax/repo/"+e.repo_id+"/dirents/move/";case"cp_dirents":return t+"ajax/repo/"+e.repo_id+"/dirents/copy/";case"get_dirents":return t+"ajax/repo/"+e.repo_id+"/dirents/";case"dir-details":return t+"api/v2.1/repos/"+e.repo_id+"/dir/detail/";case"tags":return t+"api/v2.1/repos/"+e.repo_id+"/tags/";case"file-comments":return t+"api2/repos/"+e.repo_id+"/file/comments/";case"repos":return t+"api2/repos/";case"deleted_repos":return t+"api/v2.1/deleted-repos/";case"pub_repos":return t+"api2/repos/public/";case"unenc_rw_repos":return t+"ajax/unenc-rw-repos/";case"api_v2.1_repo_set_password":return t+"api/v2.1/repos/"+e.repo_id+"/set-password/";case"get_history_changes":return t+"ajax/repo/"+e.repo_id+"/history/changes/";case"beshared_repo":
return t+"api2/beshared-repos/"+e.repo_id+"/";case"dir_shared_items":return t+"api2/repos/"+e.repo_id+"/dir/shared_items/";case"shared_repos":return t+"api2/shared-repos/"+e.repo_id+"/";case"repo":return t+"api2/repos/"+e.repo_id+"/";case"repo_v2.1":return t+"api/v2.1/repos/"+e.repo_id+"/";case"repo_owner":return t+"api2/repos/"+e.repo_id+"/owner/";case"repo_history_limit":return t+"api2/repos/"+e.repo_id+"/history-limit/";case"repo_shared_download_links":return t+"api2/repos/"+e.repo_id+"/download-shared-links/";case"repo_shared_download_link":return t+"api2/repos/"+e.repo_id+"/download-shared-links/"+e.token+"/";case"repo_shared_upload_links":return t+"api2/repos/"+e.repo_id+"/upload-shared-links/";case"repo_shared_upload_link":return t+"api2/repos/"+e.repo_id+"/upload-shared-links/"+e.token+"/";case"repo_user_folder_perm":return t+"api2/repos/"+e.repo_id+"/user-folder-perm/";case"repo_group_folder_perm":return t+"api2/repos/"+e.repo_id+"/group-folder-perm/";case"repo_upload_link":return t+"api2/repos/"+e.repo_id+"/upload-link/";case"repo_update_link":return t+"api2/repos/"+e.repo_id+"/update-link/";case"repo_file_uploaded_bytes":return t+"api/v2.1/repos/"+e.repo_id+"/file-uploaded-bytes/";case"repo_labels":return t+"api/v2.1/revision-tags/tagged-items/";case"user_repo_labels":return t+"api/v2.1/revision-tags/tag-names/";case"group-owned-library-user-folder-permission":return t+"api/v2.1/group-owned-libraries/"+e.repo_id+"/user-folder-permission/";case"group-owned-library-group-folder-permission":return t+"api/v2.1/group-owned-libraries/"+e.repo_id+"/group-folder-permission/";case"share_admin_repos":return t+"api/v2.1/shared-repos/";case"share_admin_repo":return t+"api/v2.1/shared-repos/"+e.repo_id+"/";case"share_admin_folders":return t+"api/v2.1/shared-folders/";case"share_admin_share_links":return t+"api/v2.1/share-links/";case"share_admin_share_link":return t+"api/v2.1/share-links/"+e.token+"/";case"share_admin_upload_links":return t+"api/v2.1/upload-links/";case"share_admin_upload_link":return t+"api/v2.1/upload-links/"+e.token+"/";case"send_shared_download_link":return t+"share/link/send/";case"send_shared_upload_link":return t+"share/upload_link/send/";case"smart_link":return t+"api/v2.1/smart-link/";case"groups":return t+"api/v2.1/groups/";case"all_groups":return t+"api/v2.1/all-groups/";case"shareable_groups":return t+"api/v2.1/shareable-groups/";case"search_group":return t+"api/v2.1/search-group/";case"group":return t+"api/v2.1/groups/"+e.group_id+"/";case"group_members":return t+"api/v2.1/groups/"+e.group_id+"/members/";case"group_member":return t+"api/v2.1/groups/"+e.group_id+"/members/"+e.email+"/";case"group_member_bulk":return t+"api/v2.1/groups/"+e.group_id+"/members/bulk/";case"group_import_members":return t+"ajax/group/"+e.group_id+"/members/import/";case"group_repos":return t+"api2/groups/"+e.group_id+"/repos/";case"group_owned_repos":return t+"api/v2.1/groups/"+e.group_id+"/group-owned-libraries/";case"group_owned_repo":return t+"api/v2.1/groups/"+e.group_id+"/group-owned-libraries/"+e.repo_id+"/";case"group_owned_repo_user_share":return t+"api/v2.1/group-owned-libraries/"+e.repo_id+"/user-share/";case"group_owned_repo_group_share":return t+"api/v2.1/group-owned-libraries/"+e.repo_id+"/group-share/";case"address_book_sub_groups":return t+"api/v2.1/address-book/groups/"+e.group_id+"/sub-groups/";case"address_book_group_search_members":return t+"api/v2.1/address-book/groups/"+e.group_id+"/search-member/";case"group_discussions":return t+"api2/groups/"+e.group_id+"/discussions/";case"group_discussion":return t+"api2/groups/"+e.group_id+"/discussions/"+e.discussion_id+"/";case"thumbnail_create":return t+"thumbnail/"+e.repo_id+"/create/";case"thumbnail_get":return t+"thumbnail/"+e.repo_id+"/"+e.size+e.path;case"view_raw_file":return t+"repo/"+e.repo_id+"/raw"+e.path;case"get_popup_notices":return t+"ajax/get_popup_notices/";case"notifications":return t+"api/v2.1/notifications/";case"notification":return t+"api/v2.1/notification/";case"user_enabled_modules":return t+"api/v2.1/user-enabled-modules/";case"starred_files":return t+"api2/starredfiles/";case"events":return t+"api2/events/";case"devices":return t+"api2/devices/";case"invitations":return t+"api/v2.1/invitations/";case"invitations_batch":return t+"api/v2.1/invitations/batch/";case"invitation":return t+"api/v2.1/invitations/"+e.token+"/";case"search_user":return t+"api2/search-user/";case"user_profile":return t+"profile/"+e.username+"/";case"space_and_traffic":return t+"ajax/space_and_traffic/";case"sysinfo":return t+"api/v2.1/admin/sysinfo/";case"admin-devices":return t+"api/v2.1/admin/devices/";case"admin-device-errors":return t+"api/v2.1/admin/device-errors/";case"admin-device-trusted-ip":return t+"api/v2.1/admin/device-trusted-ip/";case"admin-libraries":return t+"api/v2.1/admin/libraries/";case"admin-library":return t+"api/v2.1/admin/libraries/"+e.repo_id+"/";case"admin-library-history-limit":return t+"api/v2.1/admin/libraries/"+e.repo_id+"/history-limit/";case"admin-library-dirents":return t+"api/v2.1/admin/libraries/"+e.repo_id+"/dirents/";case"admin-groups":return t+"api/v2.1/admin/groups/";case"admin-group":return t+"api/v2.1/admin/groups/"+e.group_id+"/";case"admin-group-libraries":return t+"api/v2.1/admin/groups/"+e.group_id+"/libraries/";case"admin-group-library":return t+"api/v2.1/admin/groups/"+e.group_id+"/libraries/"+e.repo_id+"/";case"admin-group-owned-libraries":return t+"api/v2.1/admin/groups/"+e.group_id+"/group-owned-libraries/";case"admin-group-owned-library":return t+"api/v2.1/admin/groups/"+e.group_id+"/group-owned-libraries/"+e.repo_id+"/";case"admin-group-members":return t+"api/v2.1/admin/groups/"+e.group_id+"/members/";case"admin-group-member":return t+"api/v2.1/admin/groups/"+e.group_id+"/members/"+encodeURIComponent(e.email)+"/";case"admin-system-library":return t+"api/v2.1/admin/system-library/";case"admin-system-library-upload-link":return t+"api/v2.1/admin/system-library/upload-link/";case"admin-trash-libraries":return t+"api/v2.1/admin/trash-libraries/";case"admin-trash-library":return t+"api/v2.1/admin/trash-libraries/"+e.repo_id+"/";case"admin_shares":return t+"api/v2.1/admin/shares/";case"sys_group_admin_export_excel":return t+"sys/groupadmin/export-excel/";case"admin-operation-logs":return t+"api/v2.1/admin/admin-logs/";case"admin-login-logs":return t+"api/v2.1/admin/admin-login-logs/";case"admin-address-book-groups":return t+"api/v2.1/admin/address-book/groups/";case"admin-address-book-group":return t+"api/v2.1/admin/address-book/groups/"+e.group_id+"/";case"org-admin-address-book-groups":return t+"api/v2.1/org/"+e.org_id+"/admin/address-book/groups/";case"org-admin-address-book-group":return t+"api/v2.1/org/"+e.org_id+"/admin/address-book/groups/"+e.group_id+"/";case"org-admin-group":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/";case"org-admin-group-members":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/members/";case"org-admin-group-member":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/members/"+encodeURIComponent(e.email)+"/";case"org-admin-group-libraries":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/libraries/";case"org-admin-group-owned-libraries":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/group-owned-libraries/";case"org-admin-group-owned-library":return t+"api/v2.1/org/"+e.org_id+"/admin/groups/"+e.group_id+"/group-owned-libraries/"+e.repo_id+"/";case"license":return t+"api/v2.1/admin/license/"}},FILEEXT_ICON_MAP:{md:"txt.png",txt:"txt.png",pdf:"pdf.png",doc:"word.png",docx:"word.png",odt:"word.png",fodt:"word.png",ppt:"ppt.png",pptx:"ppt.png",odp:"ppt.png",fodp:"ppt.png",xls:"excel.png",xlsx:"excel.png",ods:"excel.png",fods:"excel.png",mp4:"video.png",ogv:"video.png",webm:"video.png",mov:"video.png",flv:"video.png",wmv:"video.png",rmvb:"video.png",mp3:"music.png",oga:"music.png",ogg:"music.png",flac:"music.png",aac:"music.png",ac3:"music.png",wma:"music.png",jpg:"pic.png",jpeg:"pic.png",png:"pic.png",svg:"pic.png",gif:"pic.png",bmp:"pic.png",ico:"pic.png",default:"file.png"},getFileIconUrl:function(e,i){i=i>24?192:24;var n;return-1==e.lastIndexOf(".")?app.config.mediaUrl+"img/file/"+i+"/"+this.FILEEXT_ICON_MAP.default:(n=e.substr(e.lastIndexOf(".")+1).toLowerCase(),t.has(this.FILEEXT_ICON_MAP,n)?app.config.mediaUrl+"img/file/"+i+"/"+this.FILEEXT_ICON_MAP[n]:app.config.mediaUrl+"img/file/"+i+"/"+this.FILEEXT_ICON_MAP.default)},getDirIconUrl:function(e,t){return t>24?e?app.config.mediaUrl+"img/folder-read-only-192.png":app.config.mediaUrl+"img/folder-192.png":e?app.config.mediaUrl+"img/folder-read-only-24.png":app.config.mediaUrl+"img/folder-24.png"},getLibIconUrl:function(e,t,i){var n="lib.png";e&&(n="lib-encrypted.png"),t&&(n="lib-readonly.png");var r=i||256;return app.config.mediaUrl+"img/lib/"+r+"/"+n},getLibIconTitle:function(e,t){return e?gettext("Encrypted library"):t?gettext("Read-Only library"):gettext("Read-Write library")},isHiDPI:function(){return(window.devicePixelRatio?window.devicePixelRatio:1)>1},showConfirm:function(t,i,n){var r=e("#confirm-popup"),s=e("#confirm-con"),a=e("#confirm-yes");s.html("<h3>"+t+"</h3><p>"+i+"</p>"),r.modal(),e("#simplemodal-container").css({height:"auto"}),a.on("click",n)},showConfirmWithExtraOption:function(i,n,r,s){var a=e("#confirm-popup"),o=e("#confirm-con"),d=e("#confirm-yes"),l=t.template(e("#confirm-dialog-with-extra-option-tmpl").html()),c=l({is_pro:app.pageOptions.is_pro,title:i,content:n,extraOption:r});o.html(c),a.modal(),e("#simplemodal-container").css({height:"auto"}),d.on("click",function(){var t="on"===e("#confirm-extra-option:checked").val();s(t)})},closeModal:function(){e.modal.close()},feedback:function(t,i,n){var r,s,a,o=this,n=n||5e3,d="";"string"==typeof t?a=e('<li class="'+i+'">'+this.HTMLescape(t)+"</li>"):(e(t).each(function(e,t){d+='<li class="'+t.type+'">'+o.HTMLescape(t.msg)+"</li>"}),a=e(d)),e(".messages").length>0?r=e(".messages").html(a):(r=e('<ul class="messages"></ul>').html(a),e("#main").append(r)),s="-"+(r.outerHeight()+parseInt("15px"))+"px",r.css({left:(e(window).width()-r.width())/2,top:s}),setTimeout(function(){r.css({top:"15px"})},10),setTimeout(function(){r.css({top:s})},n)},showFormError:function(t,i){e("#"+t+" .error").html(i).removeClass("hide"),e("#simplemodal-container").css({height:"auto"})},prepareAjaxErrorMsg:function(e){var t;if(e.responseText){var i=JSON.parse(e.responseText);t=this.HTMLescape(i.error||i.error_msg||i.detail)}else t=gettext("Failed. Please check the network.");return t},ajaxErrorHandler:function(e,t,i){var n=this.prepareAjaxErrorMsg(e);this.feedback(n,"error")},prepareCollectionFetchErrorMsg:function(e,t,i){var n;return t.responseText?401==t.status?n=gettext("Permission error"):403==t.status?(n=gettext("Permission error"),location.href=app.config.loginUrl+"?next="+encodeURIComponent(location.pathname+location.hash)):n=this.HTMLescape(JSON.parse(t.responseText).error_msg):n=gettext("Please check the network."),n},enableButton:function(e){e.prop("disabled",!1).removeClass("btn-disabled")},disableButton:function(e){e.prop("disabled",!0).addClass("btn-disabled")},setCaretPos:function(e,t){var i;return document.selection?(i=e.createTextRange(),i.move("character",t),i.select()):e.setSelectionRange(t,t)},prepareApiCsrf:function(){Backbone._sync=Backbone.sync,Backbone.sync=function(e,t,i){if("create"==e||"update"==e||"delete"==e){var n=app.pageOptions.csrfToken;i.beforeSend=function(e){e.setRequestHeader("X-CSRFToken",n)}}return Backbone._sync(e,t,i)}},prepareCSRFToken:function(e,t){/^http:.*/.test(t.url)||/^https:.*/.test(t.url)||e.setRequestHeader("X-CSRFToken",function(e){var t=null;if(document.cookie&&""!=document.cookie)for(var i=document.cookie.split(";"),n=0;n<i.length;n++){var r=jQuery.trim(i[n]);if(r.substring(0,e.length+1)==e+"="){t=decodeURIComponent(r.substring(e.length+1));break}}return t}(app.config.csrfCookieName))},ajaxPost:function(t){var i,n=this,r=t.form,s=t.form_id,a=t.post_url,o=t.post_data,d=t.after_op_success,l=r.children('[type="submit"]');this.disableButton(l),i=t.after_op_error?t.after_op_error:function(e,t,i){var r=n.prepareAjaxErrorMsg(e);n.showFormError(s,r),n.enableButton(l)},e.ajax({url:a,type:"POST",dataType:"json",beforeSend:this.prepareCSRFToken,data:o,success:d,error:i})},ajaxGet:function(t){var i,n=t.get_url,r=t.data,s=t.after_op_success;i=t.after_op_error?t.after_op_error:function(e,t,i){},e.ajax({url:n,cache:!1,dataType:"json",data:r,success:s,error:i})},HTMLescape:function(e){return document.createElement("div").appendChild(document.createTextNode(e)).parentNode.innerHTML},pathJoin:function(e){for(var t=e[0],i=1;i<e.length;i++)"/"==t[t.length-1]||"/"==e[i][0]?t+=e[i]:t+="/"+e[i];return t},encodePath:function(e){for(var t=e.split("/"),i=[],n=0,r=t.length;n<r;n++)i.push(encodeURIComponent(t[n]));return i.join("/")},initLocale:function(){var e;e="en"==app.pageOptions.language_code?"en-gb":"es-ar"==app.pageOptions.language_code||"es-mx"==app.pageOptions.language_code?"es":app.pageOptions.language_code,r.locale(e)},getRelativeTimeStr:function(e){return e-new Date>0?gettext("Just now"):e.fromNow()},closeTopNoticeBar:function(){if(!app.pageOptions.cur_note)return!1;var t=app.pageOptions.cur_note.id;if(e("#info-bar").addClass("hide"),navigator.cookieEnabled){var i=new Date,n=document.cookie.split("; "),r=!1;i.setTime(i.getTime()+12096e5),t+="; expires="+i.toGMTString()+"; path="+app.config.siteRoot;for(var s=0,a=n.length;s<a;s++)if("info_id"==n[s].split("=")[0]){r=!0,document.cookie="info_id="+n[s].split("=")[1]+t;break}r||(document.cookie="info_id="+t)}},contactInputOptionsForSelect2:function(t){var i,n=this;return i=t&&t.url?t.url:n.getUrl({name:"search_user"}),{placeholder:gettext("Search users or enter emails and press Enter"),tags:[],minimumInputLength:1,formatInputTooShort:gettext("Please enter 1 or more character"),formatNoMatches:gettext("No matches"),formatSearching:gettext("Searching..."),formatAjaxError:gettext("Loading failed"),ajax:{url:i,dataType:"json",delay:250,cache:!0,data:function(e){return{q:e}},results:function(e){for(var t=[],i=e.users||e,n=0,r=i.length;n<r;n++)t.push({id:i[n].email,text:i[n].name+" "+i[n].contact_email,avatar_url:i[n].avatar_url,contact_email:i[n].contact_email,name:i[n].name});return{results:t}}},formatResult:function(e){return e.avatar_url?'<img src="'+e.avatar_url+'" width="32" height="32" class="avatar"><span class="text ellipsis">'+n.HTMLescape(e.name)+"<br />"+n.HTMLescape(e.contact_email)+"</span>":void 0},formatSelection:function(e){return n.HTMLescape(e.name||e.id)},createSearchChoice:function(t){return{id:e.trim(t)}},escapeMarkup:function(e){return e}}},groupInputOptionsForSelect2:function(){var e=this;return{placeholder:gettext("Search groups"),tags:[],minimumInputLength:1,formatInputTooShort:gettext("Please enter 1 or more character"),formatNoMatches:gettext("No matches"),formatSearching:gettext("Searching..."),formatAjaxError:gettext("Loading failed"),ajax:{url:e.getUrl({name:"search_group"}),dataType:"json",delay:250,cache:!0,data:function(e){return{q:e}},results:function(e){for(var t=[],i=e,n=0,r=i.length;n<r;n++)t.push({id:i[n].id,text:i[n].name,name:i[n].name});return{results:t}}},formatResult:function(t){return t.name?'<span class="text ellipsis">'+e.HTMLescape(t.name)+"</span>":void 0},formatSelection:function(t){return e.HTMLescape(t.name)},escapeMarkup:function(e){return e}}},imageCheck:function(e){return-1!=e.lastIndexOf(".")&&-1!=["gif","jpeg","jpg","png","ico","bmp"].indexOf(e.substr(e.lastIndexOf(".")+1).toLowerCase())},videoCheck:function(e){return-1!=e.lastIndexOf(".")&&-1!=["mp4","ogv","webm","mov"].indexOf(e.substr(e.lastIndexOf(".")+1).toLowerCase())},compareTwoWord:function(e,t){var i,n,r=e.charCodeAt(0),s=t.charCodeAt(0),a=this.strChineseFirstPY;return 19968<r&&r<40869&&19968<s&&s<40869?(i=a.charAt(r-19968).toLowerCase(),n=a.charAt(s-19968).toLowerCase(),i>=n?1:-1):19968<r&&r<40869&&!(19968<s&&s<40869)?1:!(19968<r&&r<40869)&&19968<s&&s<40869?-1:(i=e.toLowerCase(),n=t.toLowerCase(),this.compareStrWithNumbersIn(i,n))},compareStrWithNumbersIn:function(e,t){var i,n,r,s=/\d+|\D+/g,a=/\d/,o=e.match(s),d=t.match(s),l=Math.min(o.length,d.length);if(o&&d&&(i=a.test(o[0]))==a.test(d[0]))for(var c=0;c<l;c++){if(n=o[c],r=d[c],i&&(n=parseInt(n,10),r=parseInt(r,10)),n!=r)return n<r?-1:1;i=!i}return(e>=t)-(e<=t)},toggleSortByNameMode:function(){"name_up"==app.pageOptions.sort_mode?(s.set("sort_mode","name_down"),app.pageOptions.sort_mode="name_down"):(s.set("sort_mode","name_up"),app.pageOptions.sort_mode="name_up")},toggleSortByTimeMode:function(){"time_down"==app.pageOptions.sort_mode?(s.set("sort_mode","time_up"),app.pageOptions.sort_mode="time_up"):(s.set("sort_mode","time_down"),app.pageOptions.sort_mode="time_down")},updateSortIconByMode:function(t){var i=app.pageOptions.sort_mode,n=t.context,r=e(".by-name .sort-icon",n),s=e(".by-time .sort-icon",n);switch(r.hide(),s.hide(),i){case"name_down":r.removeClass("icon-caret-up").addClass("icon-caret-down").show();break;case"name_up":r.removeClass("icon-caret-down").addClass("icon-caret-up").show();break;case"time_down":s.removeClass("icon-caret-up").addClass("icon-caret-down").show();break;case"time_up":s.removeClass("icon-caret-down").addClass("icon-caret-up").show();break;default:r.removeClass("icon-caret-down").addClass("icon-caret-up").show()}},sortLibs:function(e){var t=this,i=app.pageOptions.sort_mode,n=e.libs;switch(i){case"name_up":n.comparator=function(e,i){return e.get("name")?i.get("name")?t.compareTwoWord(e.get("name"),i.get("name")):-1:1};break;case"name_down":n.comparator=function(e,i){return e.get("name")?i.get("name")?-t.compareTwoWord(e.get("name"),i.get("name")):1:-1};break;case"time_up":n.comparator=function(e,t){return e.get("mtime")<t.get("mtime")?-1:1};break;case"time_down":n.comparator=function(e,t){return e.get("mtime")<t.get("mtime")?1:-1}}n.sort()},fileSizeFormat:function(e,t){var t=t||0;return e>=0&&e<1024?e+" B":e>=1024&&e<1048576?(e/1024).toFixed(t)+" KB":e>=1048576&&e<1073741824?(e/1048576).toFixed(t)+" MB":e>=1073741824&&e<1099511627776?(e/1073741824).toFixed(t)+" GB":e>=1099511627776?(e/1099511627776).toFixed(t)+" TB":e+" B"},quotaSizeFormat:function(e,t){var t=t||0;return e>=0&&e<1e3?e+" B":e>=1e3&&e<1e6?(e/1e3).toFixed(t)+" KB":e>=1e6&&e<1e9?(e/1e6).toFixed(t)+" MB":e>=1e9&&e<1e12?(e/1e9).toFixed(t)+" GB":e>=1e12?(e/1e12).toFixed(t)+" TB":e+" B"},groupId2Name:function(e){for(var t,i=app.pageOptions.groups,n=0,r=i.length;n<r;n++)if(e==i[n].id){t=i[n].name;break}return t},setCaretPosition:function(e,t){var i;return document.selection?(i=e.createTextRange(),i.move("character",t),i.select()):e.setSelectionRange(t,t)},zipDownload:function(t,i,n){var r,s,a=this,o=gettext("Packaging..."),d=e("<p></p>"),l=function(){e.ajax({url:a.getUrl({name:"query_zip_progress"})+"?token="+s,dataType:"json",cache:!1,success:function(t){var i=0==t.total?"100%":(t.zipped/t.total*100).toFixed(0)+"%";d.html(o+" "+i),t.total==t.zipped&&(setTimeout(function(){e.modal.close()},500),clearInterval(r),location.href=a.getUrl({name:"download_dir_zip_url",zip_token:s}))},error:function(e){a.ajaxErrorHandler(e),clearInterval(r)}})},c=function(){e.ajax({url:a.getUrl({name:"cancel_zip_task"}),type:"POST",dataType:"json",data:{token:s},beforeSend:a.prepareCSRFToken,success:function(){},error:function(e){}})};e.ajax({url:a.getUrl({name:"zip_task",repo_id:t}),data:{parent_dir:i,dirents:n},traditional:!0,dataType:"json",success:function(t){s=t.zip_token,d.html(o).modal({onClose:function(){clearInterval(r),c(),e.modal.close()}}),e("#simplemodal-container").css({width:"auto"}),l(),r=setInterval(l,1e3)},error:function(e){a.ajaxErrorHandler(e)}})}}}),function(e,t){if("function"==typeof define&&define.amd)define("backbone",["underscore","jquery","exports"],function(i,n,r){e.Backbone=t(e,r,i,n)});else if("undefined"!=typeof exports){var i=require("underscore");t(e,exports,i)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,i,n){var r=e.Backbone,s=[],a=s.slice;t.VERSION="1.1.2",t.$=n,t.noConflict=function(){return e.Backbone=r,this},t.emulateHTTP=!1,t.emulateJSON=!1;var o=t.Events={on:function(e,t,i){return l(this,"on",e,[t,i])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:i,ctx:i||this}),this):this},once:function(e,t,n){if(!l(this,"once",e,[t,n])||!t)return this;var r=this,s=i.once(function(){r.off(e,s),t.apply(this,arguments)});return s._callback=t,this.on(e,s,n)},off:function(e,t,n){var r,s,a,o,d,c,u,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this;for(o=e?[e]:i.keys(this._events),d=0,c=o.length;d<c;d++)if(e=o[d],a=this._events[e]){if(this._events[e]=r=[],t||n)for(u=0,h=a.length;u<h;u++)s=a[u],(t&&t!==s.callback&&t!==s.callback._callback||n&&n!==s.context)&&r.push(s);r.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=a.call(arguments,1);if(!l(this,"trigger",e,t))return this;var i=this._events[e],n=this._events.all;return i&&c(i,t),n&&c(n,arguments),this},stopListening:function(e,t,n){var r=this._listeningTo;if(!r)return this;var s=!t&&!n;n||"object"!=typeof t||(n=this),e&&((r={})[e._listenId]=e);for(var a in r)e=r[a],e.off(t,n,this),(s||i.isEmpty(e._events))&&delete this._listeningTo[a];return this}},d=/\s+/,l=function(e,t,i,n){if(!i)return!0;if("object"==typeof i){for(var r in i)e[t].apply(e,[r,i[r]].concat(n));return!1}if(d.test(i)){for(var s=i.split(d),a=0,o=s.length;a<o;a++)e[t].apply(e,[s[a]].concat(n));return!1}return!0},c=function(e,t){var i,n=-1,r=e.length,s=t[0],a=t[1],o=t[2];switch(t.length){case 0:for(;++n<r;)(i=e[n]).callback.call(i.ctx);return;case 1:for(;++n<r;)(i=e[n]).callback.call(i.ctx,s);return;case 2:for(;++n<r;)(i=e[n]).callback.call(i.ctx,s,a);return;case 3:for(;++n<r;)(i=e[n]).callback.call(i.ctx,s,a,o);return;default:for(;++n<r;)(i=e[n]).callback.apply(i.ctx,t);return}},u={listenTo:"on",listenToOnce:"once"};i.each(u,function(e,t){o[t]=function(t,n,r){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=i.uniqueId("l"))]=t,r||"object"!=typeof n||(r=this),t[e](n,r,this),this}}),o.bind=o.on,o.unbind=o.off,i.extend(t,o);var h=t.Model=function(e,t){var n=e||{};t||(t={}),this.cid=i.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(n=this.parse(n,t)||{}),n=i.defaults({},n,i.result(this,"defaults")),this.set(n,t),this.changed={},this.initialize.apply(this,arguments)};i.extend(h.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return i.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return i.escape(this.get(e))},has:function(e){return null!=this.get(e)},set:function(e,t,n){var r,s,a,o,d,l,c,u;if(null==e)return this;if("object"==typeof e?(s=e,n=t):(s={})[e]=t,n||(n={}),!this._validate(s,n))return!1;a=n.unset,d=n.silent,o=[],l=this._changing,this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={}),u=this.attributes,c=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(r in s)t=s[r],i.isEqual(u[r],t)||o.push(r),i.isEqual(c[r],t)?delete this.changed[r]:this.changed[r]=t,a?delete u[r]:u[r]=t;if(!d){o.length&&(this._pending=n);for(var h=0,p=o.length;h<p;h++)this.trigger("change:"+o[h],this,u[o[h]],n)}if(l)return this;if(!d)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,i.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,i.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!i.isEmpty(this.changed):i.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&i.clone(this.changed);var t,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var s in e)i.isEqual(r[s],t=e[s])||((n||(n={}))[s]=t);return n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(e){e=e?i.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;return e.success=function(i){if(!t.set(t.parse(i,e),e))return!1;n&&n(t,i,e),t.trigger("sync",t,i,e)},X(this,e),this.sync("read",this,e)},save:function(e,t,n){var r,s,a,o=this.attributes;if(null==e||"object"==typeof e?(r=e,n=t):(r={})[e]=t,n=i.extend({validate:!0},n),r&&!n.wait){if(!this.set(r,n))return!1}else if(!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=i.extend({},o,r)),void 0===n.parse&&(n.parse=!0);var d=this,l=n.success;return n.success=function(e){d.attributes=o;var t=d.parse(e,n);if(n.wait&&(t=i.extend(r||{},t)),i.isObject(t)&&!d.set(t,n))return!1;l&&l(d,e,n),d.trigger("sync",d,e,n)},X(this,n),s=this.isNew()?"create":n.patch?"patch":"update","patch"===s&&(n.attrs=r),a=this.sync(s,this,n),r&&n.wait&&(this.attributes=o),a},destroy:function(e){e=e?i.clone(e):{};var t=this,n=e.success,r=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(i){(e.wait||t.isNew())&&r(),n&&n(t,i,e),t.isNew()||t.trigger("sync",t,i,e)},this.isNew())return e.success(),!1;X(this,e);var s=this.sync("delete",this,e);return e.wait||r(),s},url:function(){var e=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},i.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=i.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return!n||(this.trigger("invalid",this,n,i.extend(t,{validationError:n})),!1)}});var p=["keys","values","pairs","invert","pick","omit"];i.each(p,function(e){h.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.attributes),i[e].apply(i,t)}});var m=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,i.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},f={add:!0,remove:!1};i.extend(m.prototype,o,{model:h,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,i.extend({merge:!1},t,f))},remove:function(e,t){var n=!i.isArray(e);e=n?[e]:i.clone(e),t||(t={});var r,s,a,o;for(r=0,s=e.length;r<s;r++)(o=e[r]=this.get(e[r]))&&(delete this._byId[o.id],delete this._byId[o.cid],a=this.indexOf(o),this.models.splice(a,1),this.length--,t.silent||(t.index=a,o.trigger("remove",o,this,t)),this._removeReference(o,t));return n?e[0]:e},set:function(e,t){t=i.defaults({},t,_),t.parse&&(e=this.parse(e,t));var n=!i.isArray(e);e=n?e?[e]:[]:i.clone(e);var r,s,a,o,d,l,c,u=t.at,p=this.model,m=this.comparator&&null==u&&!1!==t.sort,f=i.isString(this.comparator)?this.comparator:null,g=[],v=[],y={},w=t.add,b=t.merge,M=t.remove,Y=!(m||!w||!M)&&[];for(r=0,s=e.length;r<s;r++){if(d=e[r]||{},a=d instanceof h?o=d:d[p.prototype.idAttribute||"id"],l=this.get(a))M&&(y[l.cid]=!0),b&&(d=d===o?o.attributes:d,t.parse&&(d=l.parse(d,t)),l.set(d,t),m&&!c&&l.hasChanged(f)&&(c=!0)),e[r]=l;else if(w){if(!(o=e[r]=this._prepareModel(d,t)))continue;g.push(o),this._addReference(o,t)}o=l||o,!Y||!o.isNew()&&y[o.id]||Y.push(o),y[o.id]=!0}if(M){for(r=0,s=this.length;r<s;++r)y[(o=this.models[r]).cid]||v.push(o);v.length&&this.remove(v,t)}if(g.length||Y&&Y.length)if(m&&(c=!0),this.length+=g.length,null!=u)for(r=0,s=g.length;r<s;r++)this.models.splice(u+r,0,g[r]);else{Y&&(this.models.length=0);var L=Y||g;for(r=0,s=L.length;r<s;r++)this.models.push(L[r])}if(c&&this.sort({silent:!0}),!t.silent){for(r=0,s=g.length;r<s;r++)(o=g[r]).trigger("add",o,this,t);(c||Y&&Y.length)&&this.trigger("sort",this,t)}return n?e[0]:e},reset:function(e,t){t||(t={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n],t);return t.previousModels=this.models,this._reset(),e=this.add(e,i.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,i.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,i.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return a.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return i.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var i in e)if(e[i]!==t.get(i))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),i.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(i.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return i.invoke(this.models,"get",e)},fetch:function(e){e=e?i.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,n=this;return e.success=function(i){var r=e.reset?"reset":"set";n[r](i,e),t&&t(n,i,e),n.trigger("sync",n,i,e)},X(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?i.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var n=this,r=t.success;return t.success=function(e,i){t.wait&&n.add(e,t),r&&r(e,i,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof h)return e;t=t?i.clone(t):{},t.collection=this;var n=new this.model(e,t);return n.validationError?(this.trigger("invalid",this,n.validationError,t),!1):n},_addReference:function(e,t){this._byId[e.cid]=e,null!=e.id&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,i,n){("add"!==e&&"remove"!==e||i===this)&&("destroy"===e&&this.remove(t,n),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var g=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(g,function(e){m.prototype[e]=function(){var t=a.call(arguments);return t.unshift(this.models),i[e].apply(i,t)}});var v=["groupBy","countBy","sortBy","indexBy"];i.each(v,function(e){m.prototype[e]=function(t,n){var r=i.isFunction(t)?t:function(e){return e.get(t)};return i[e](this.models,r,n)}});var y=t.View=function(e){this.cid=i.uniqueId("view"),e||(e={}),i.extend(this,i.pick(e,b)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,b=["model","collection","el","id","attributes","className","tagName","events"];i.extend(y.prototype,o,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},
setElement:function(e,i){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],!1!==i&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=i.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var n=e[t];if(i.isFunction(n)||(n=this[e[t]]),n){var r=t.match(w),s=r[1],a=r[2];n=i.bind(n,this),s+=".delegateEvents"+this.cid,""===a?this.$el.on(s,n):this.$el.on(s,a,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"),!1);else{var e=i.extend({},i.result(this,"attributes"));this.id&&(e.id=i.result(this,"id")),this.className&&(e.class=i.result(this,"className"));var n=t.$("<"+i.result(this,"tagName")+">").attr(e);this.setElement(n,!1)}}}),t.sync=function(e,n,r){var s=Y[e];i.defaults(r||(r={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:s,dataType:"json"};if(r.url||(a.url=i.result(n,"url")||F()),null!=r.data||!n||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(r.attrs||n.toJSON(r))),r.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){a.type="POST",r.emulateJSON&&(a.data._method=s);var o=r.beforeSend;r.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",s),o)return o.apply(this,arguments)}}"GET"===a.type||r.emulateJSON||(a.processData=!1),"PATCH"===a.type&&M&&(a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var d=r.xhr=t.ajax(i.extend(a,r));return n.trigger("request",n,d,r),d};var M=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),Y={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var L=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,T=/(\(\?)?:\w+/g,D=/\*\w+/g,S=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(L.prototype,o,{initialize:function(){},route:function(e,n,r){i.isRegExp(e)||(e=this._routeToRegExp(e)),i.isFunction(n)&&(r=n,n=""),r||(r=this[n]);var s=this;return t.history.route(e,function(i){var a=s._extractParameters(e,i);s.execute(r,a),s.trigger.apply(s,["route:"+n].concat(a)),s.trigger("route",n,a),t.history.trigger("route",s,n,a)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,i){return t.history.navigate(e,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var e,t=i.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(S,"\\$&").replace(k,"(?:$1)?").replace(T,function(e,t){return t?e:"([^/?]+)"}).replace(D,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return i.map(n,function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null})}});var x=t.History=function(){this.handlers=[],i.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},C=/^[#\/]|\s+$/g,H=/^\/+|\/+$/g,j=/msie [\w.]+/,Z=/\/$/,P=/#.*$/;x.started=!1,i.extend(x.prototype,o,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(Z,"");e.indexOf(i)||(e=e.slice(i.length))}else e=this.getHash();return e.replace(C,"")},start:function(e){if(x.started)throw new Error("Backbone.history has already been started");x.started=!0,this.options=i.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),r=document.documentMode,s=j.exec(navigator.userAgent.toLowerCase())&&(!r||r<=7);if(this.root=("/"+this.root+"/").replace(H,"/"),s&&this._wantsHashChange){var a=t.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow,this.navigate(n)}this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=n;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&o.hash&&(this.fragment=this.getHash().replace(C,""),this.history.replaceState({},document.title,this.root+this.fragment))}if(!this.options.silent)return this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),x.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return e=this.fragment=this.getFragment(e),i.any(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})},navigate:function(e,t){if(!x.started)return!1;t&&!0!==t||(t={trigger:!!t});var i=this.root+(e=this.getFragment(e||""));if(e=e.replace(P,""),this.fragment!==e){if(this.fragment=e,""===e&&"/"!==i&&(i=i.slice(0,-1)),this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,i){if(i){var n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}}),t.history=new x;var J=function(e,t){var n,r=this;n=e&&i.has(e,"constructor")?e.constructor:function(){return r.apply(this,arguments)},i.extend(n,r,t);var s=function(){this.constructor=n};return s.prototype=r.prototype,n.prototype=new s,e&&i.extend(n.prototype,e),n.__super__=r.prototype,n};h.extend=m.extend=L.extend=y.extend=x.extend=J;var F=function(){throw new Error('A "url" property or function must be specified')},X=function(e,t){var i=t.error;t.error=function(n){i&&i(e,n,t),e.trigger("error",e,n,t)}};return t}),define("app/views/side-nav",["jquery","underscore","backbone","common","js.cookie"],function(e,t,i,n,r){"use strict";return i.View.extend({el:".side-panel",template:t.template(e("#side-nav-tmpl").html()),enableModTemplate:t.template(e("#myhome-mods-enable-form-tmpl").html()),initialize:function(){this.default_cur_tab="mine",this.group_expanded=!1,r.get("group_expanded")&&"true"==r.get("group_expanded")&&(this.group_expanded=!0),this.data={cur_tab:this.default_cur_tab,show_group_list:this.group_expanded,groups:app.pageOptions.groups,mods_enabled:app.pageOptions.user_mods_enabled,show_share_admin:!1,can_add_repo:app.pageOptions.can_add_repo,can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link};var t=this;e("#js-toggle-side-nav").on("click",function(){return t.show(),!1}),e(window).on("resize",function(){e(window).width()>=768&&t.show()})},render:function(){return this.$("#side-nav").html(this.template(this.data)),this},events:{"click #group-nav a:first":"toggleGroupList","click #share-admin-nav a:first":"toggleShareAdminList","click #enable-mods":"enableMods","click .js-close":"close","click #side-nav li > a":"visitLink","click .js-about":"showAbout","touchstart .side-nav-con":"conTouchStart"},conTouchStart:function(){this.$(".side-nav-con").css({overflow:"auto"})},toggleGroupList:function(){var t=e("#group-nav .toggle-icon");return t.toggleClass("icon-caret-left icon-caret-down"),e("#group-nav .grp-list").slideToggle(),t.hasClass("icon-caret-down")?(r.set("group_expanded","true"),this.data.show_group_list=!0):(r.set("group_expanded","false"),this.data.show_group_list=!1),!1},toggleShareAdminList:function(){var t=e("#share-admin-nav");return e(".toggle-icon",t).toggleClass("icon-caret-left icon-caret-down"),e("ul",t).slideToggle(250),!1},enableMods:function(){var t=app.pageOptions.user_mods_enabled,i=e(this.enableModTemplate({mods_available:app.pageOptions.user_mods_available,mods_enabled:t}));i.modal({focus:!1}),e("#simplemodal-container").css("height","auto");var r=e('[name="personal_wiki"]'),s=r.prop("checked"),a=this;return i.on("submit",function(){var o=r.prop("checked");if(o==s)return!1;var d=i.children('[type="submit"]');return n.disableButton(d),e.ajax({url:n.getUrl({name:"user_enabled_modules"}),type:o?"POST":"DELETE",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){if(o)t.push("personal wiki");else{var i=t.indexOf("personal wiki");i>-1&&t.splice(i,1)}e.modal.close(),a.render()},error:function(e){n.ajaxErrorHandler(e)}}),!1}),!1},setCurTab:function(t,i){if(this.data.cur_tab=t||this.default_cur_tab,i&&e.extend(this.data,i),this.$clickedTab)this.$(".tab-cur").removeClass("tab-cur"),this.$clickedTab.addClass("tab-cur"),this.$clickedTab=null;else{this.render();var n=this.$(".tab-cur").offset().top,r=e(window).height()-this.$(".side-nav-footer").outerHeight(!0);n>r&&this.$(".side-nav-con").css({overflow:"auto"}).scrollTop(n-r+this.$(".tab-cur").outerHeight(!0)+10).removeAttr("style")}},updateGroups:function(){var t=this;e.ajax({url:n.getUrl({name:"groups"}),type:"GET",dataType:"json",cache:!1,success:function(e){for(var i=[],r=0,s=e.length;r<s;r++)i.push({id:e[r].id,name:e[r].name});i.sort(function(e,t){return n.compareTwoWord(e.name,t.name)}),app.pageOptions.groups=i,t.data.groups=i,t.render()},error:function(){}})},show:function(){this.$el.css({left:"0px"})},hide:function(){this.$el.css({left:"-300px"})},close:function(){return this.hide(),!1},visitLink:function(t){return"#"!==e(t.target).attr("href")&&(this.$clickedTab=e(t.target).parent()),e(window).width()<768&&"#"!==e(t.target).attr("href")&&this.hide(),!0},showAbout:function(){return this.$(".about-content").modal(),!1}})}),define("app/models/repo",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({defaults:{id:null,name:"",desc:"",mtime:0,mtime_relative:"",encrypted:!1,owner:"-",owner_nickname:"-",storage_name:"-",permission:"rw"},parse:function(t){var i=e.clone(t);return i.id=t.id||t.repo_id,i.storage_name=t.storage_name,i.name=t.name||t.repo_name,i.desc=t.desc||t.repo_desc,i.size_formatted=t.size_formatted||t.repo_size_formatted,i},validate:function(e,t){if(!e.name)return gettext("Name is required");if(-1!=e.name.indexOf("/"))return gettext("Name should not include '/'.");if(e.encrypted){if(!e.passwd1)return gettext("Please enter password");if(!e.passwd2)return gettext("Please enter the password again");if(e.passwd1.length<app.pageOptions.repo_password_min_length)return gettext("Password is too short");if(e.passwd1!=e.passwd2)return gettext("Passwords don't match")}},getIconUrl:function(e){var t=this.get("encrypted"),n="r"==this.get("permission");return i.getLibIconUrl(t,n,e)},getIconTitle:function(){return this.get("encrypted")?gettext("Encrypted library"):"rw"==this.get("permission")?gettext("Read-Write library"):gettext("Read-Only library")}})}),define("app/collections/repos",["underscore","backbone","common","app/models/repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,type:"mine",url:function(){return i.getUrl({name:"repos"})},initialize:function(e){e&&(this.type=e.type?e.type:"mine")},fetch:function(i){return i=i?e.clone(i):{},i.url=this.url()+"?type="+this.type,t.Collection.prototype.fetch.call(this,i)},create:function(i,n){return n=n?e.clone(n):{},n.url=this.url()+"?from=web",t.Collection.prototype.create.call(this,i,n)}})}),function(e){"function"==typeof define&&define.amd?define("jquery.ui",["jquery"],e):e(jQuery)}(function(e){function t(e){for(var t,i;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,r)}function r(){e.datepicker._isDisabledDatepicker(d.inline?d.dpDiv.parent()[0]:d.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function s(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.ui=e.ui||{},e.ui.version="1.12.1";var a=0,o=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,r,s;for(s=0;null!=(r=i[s]);s++)try{(n=e._data(r,"events"))&&n.remove&&e(r).triggerHandler("remove")}catch(e){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var r,s,a,o={},d=t.split(".")[0];t=t.split(".")[1];var l=d+"-"+t;return n||(n=i,i=e.Widget),e.isArray(n)&&(n=e.extend.apply(null,[{}].concat(n))),e.expr[":"][l.toLowerCase()]=function(t){return!!e.data(t,l)},e[d]=e[d]||{},r=e[d][t],s=e[d][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){return e.isFunction(n)?void(o[t]=function(){function e(){return i.prototype[t].apply(this,arguments)}function r(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,s=this._superApply;return this._super=e,this._superApply=r,t=n.apply(this,arguments),this._super=i,this._superApply=s,t}}()):void(o[t]=n)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix||t:t},o,{constructor:s,namespace:d,widgetName:t,widgetFullName:l}),r?(e.each(r._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete r._childConstructors):i._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var i,n,r=o.call(arguments,1),s=0,a=r.length;a>s;s++)for(i in r[s])n=r[s][i],r[s].hasOwnProperty(i)&&void 0!==n&&(t[i]=e.isPlainObject(n)?e.isPlainObject(t[i])?e.widget.extend({},t[i],n):e.widget.extend({},n):n);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(r){var s="string"==typeof r,a=o.call(arguments,1),d=this;return s?this.length||"instance"!==r?this.each(function(){var i,s=e.data(this,n);return"instance"===r?(d=s,!1):s?e.isFunction(s[r])&&"_"!==r.charAt(0)?(i=s[r].apply(s,a),i!==s&&void 0!==i?(d=i&&i.jquery?d.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")}):d=void 0:(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each(function(){var t=e.data(this,n);t?(t.option(r||{}),t._init&&t._init()):e.data(this,n,new i(r,this))})),d}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,i){t._removeClass(i,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,r,s,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},n=t.split("."),t=n.shift(),n.length){for(r=a[t]=e.widget.extend({},this.options[t]),s=0;n.length-1>s;s++)r[n[s]]=r[n[s]]||{},r=r[n[s]];if(t=n.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=i}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,n,r;for(i in t)r=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&r&&r.length&&(n=e(r.get()),this._removeClass(r,i),n.addClass(this._classes({element:n,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function i(i,s){var a,o;for(o=0;i.length>o;o++)a=r.classesElementLookup[i[o]]||e(),a=e(t.add?e.unique(a.get().concat(t.element.get())):a.not(t.element).get()),r.classesElementLookup[i[o]]=a,n.push(i[o]),s&&t.classes[i[o]]&&n.push(t.classes[i[o]])}var n=[],r=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&i(t.keys.match(/\S+/g)||[],!0),t.extra&&i(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,function(n,r){-1!==e.inArray(t.target,r)&&(i.classesElementLookup[n]=e(r.not(t.target).get()))})},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,n){n="boolean"==typeof n?n:i;var r="string"==typeof e||null===e,s={extra:r?t:i,keys:r?e:t,element:r?this.element:e,add:n};return s.element.toggleClass(this._classes(s),n),this},_on:function(t,i,n){var r,s=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=r=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),e.each(n,function(n,a){function o(){return t||!0!==s.options.disabled&&!e(this).hasClass("ui-state-disabled")?("string"==typeof a?s[a]:a).apply(s,arguments):void 0}"string"!=typeof a&&(o.guid=a.guid=a.guid||o.guid||e.guid++);var d=n.match(/^([\w:-]*)\s*(.*)$/),l=d[1]+s.eventNamespace,c=d[2];c?r.on(l,c,o):i.on(l,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i).off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,n){var r,s,a=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(r in s)r in i||(i[r]=s[r]);return this.element.trigger(i,n),!(e.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,r,s){"string"==typeof r&&(r={effect:r});var a,o=r?!0===r||"number"==typeof r?i:r.effect||i:t;r=r||{},"number"==typeof r&&(r={duration:r}),a=!e.isEmptyObject(r),r.complete=s,r.delay&&n.delay(r.delay),a&&e.effects&&e.effects.effect[o]?n[t](r):o!==t&&n[o]?n[o](r.duration,r.easing,s):n.queue(function(i){e(this)[t](),s&&s.call(n[0]),i()})}}),e.widget,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.ui,{datepicker:{version:"1.12.1"}});var d;e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,r,s;n=t.nodeName.toLowerCase(),r="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),s=this._newInst(e(t),r),s.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,s):r&&this._inlineDatepicker(t,s)},_newInst:function(t,i){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,r,s,a=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=e("<span class='"+this._appendClass+"'>"+a+"</span>"),t[o?"before":"after"](i.append)),t.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.on("focus",this._showDatepicker),("button"===n||"both"===n)&&(r=this._get(i,"buttonText"),s=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:s,alt:r,title:r}):e("<button type='button'></button>").addClass(this._triggerClass).html(s?e("<img/>").attr({src:s,alt:r,title:r}):r)),t[o?"before":"after"](i.trigger),i.trigger.on("click",function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,r,s=new Date(2009,11,20),a=this._get(e,"dateFormat");a.match(/[DM]/)&&(t=function(e){for(i=0,n=0,r=0;e.length>r;r++)e[r].length>i&&(i=e[r].length,n=r);return n},s.setMonth(t(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(t(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),e.input.attr("size",this._formatDate(e,s).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,r,a){var o,d,l,c,u,h=this._dialogInst;return h||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),e("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},e.data(this._dialogInput[0],"datepicker",h)),s(h.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(h,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(d=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[d/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(t){var i,n=e(t),r=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty(),d===r&&(d=null))},_enableDatepicker:function(t){var i,n,r=e(t),s=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=r.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,r=e(t),s=e.data(t,"datepicker");r.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=r.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,n){var r,a,o,d,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(r=i||{},"string"==typeof i&&(r={},r[i]=n),void(l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),d=this._getMinMaxDate(l,"max"),s(l.settings,r),null!==o&&void 0!==r.dateFormat&&void 0===r.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==d&&void 0!==r.dateFormat&&void 0===r.maxDate&&(l.settings.maxDate=this._formatDate(l,d)),"disabled"in r&&(r.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,r,s=e.datepicker._getInst(t.target),a=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),a=!1;break;case 13:return r=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",s.dpDiv),r[0]&&e.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,r[0]),i=e.datepicker._get(s,"onSelect"),i?(n=e.datepicker._formatDate(s),i.apply(s.input?s.input[0]:null,[n,s])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(s,"stepBigMonths"):-e.datepicker._get(s,"stepMonths"),"M")
;break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(s,"stepBigMonths"):+e.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(s,"stepBigMonths"):-e.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(s,"stepBigMonths"):+e.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,r=e.datepicker._getInst(t.target);return e.datepicker._get(r,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i=e.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{e.datepicker.parseDate(e.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,e.datepicker._getFormatConfig(i))&&(e.datepicker._setDateFromField(i),e.datepicker._updateAlternate(i),e.datepicker._updateDatepicker(i))}catch(e){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=e("input",i.parentNode)[0]),!e.datepicker._isDisabledDatepicker(i)&&e.datepicker._lastInput!==i){var n,r,a,o,d,l,c;n=e.datepicker._getInst(i),e.datepicker._curInst&&e.datepicker._curInst!==n&&(e.datepicker._curInst.dpDiv.stop(!0,!0),n&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),r=e.datepicker._get(n,"beforeShow"),!1!==(a=r?r.apply(i,[i,n]):{})&&(s(n.settings,a),n.lastVal=null,e.datepicker._lastInput=i,e.datepicker._setDateFromField(n),e.datepicker._inDialog&&(i.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(i),e.datepicker._pos[1]+=i.offsetHeight),o=!1,e(i).parents().each(function(){return!(o|="fixed"===e(this).css("position"))}),d={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(n),d=e.datepicker._checkOffset(n,d,o),n.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:d.left+"px",top:d.top+"px"}),n.inline||(l=e.datepicker._get(n,"showAnim"),c=e.datepicker._get(n,"duration"),n.dpDiv.css("z-index",t(e(i))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?n.dpDiv.show(l,e.datepicker._get(n,"showOptions"),c):n.dpDiv[l||"show"](l?c:null),e.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),e.datepicker._curInst=n))}},_updateDatepicker:function(t){this.maxRows=4,d=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,n=this._getNumberOfMonths(t),s=n[1],a=t.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&r.apply(a.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var r=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,d=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?r-a:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+r>d&&d>r?Math.abs(i.left+r-d):0),i.top-=Math.min(i.top,i.top+s>l&&l>s?Math.abs(s+o):0),i},_findPos:function(t){for(var i,n=this._getInst(t),r=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[r?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,r,s,a=this._curInst;!a||t&&a!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),r=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,r):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,r),i||r(),this._datepickerShowing=!1,s=this._get(a,"onClose"),s&&s.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var r=e(t),s=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(s,i+("M"===n?this._get(s,"showCurrentAtPos"):0),n),this._updateDatepicker(s))},_gotoToday:function(t){var i,n=e(t),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(i=new Date,r.selectedDay=i.getDate(),r.drawMonth=r.selectedMonth=i.getMonth(),r.drawYear=r.selectedYear=i.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var r=e(t),s=this._getInst(r[0]);s["selected"+("M"===n?"Month":"Year")]=s["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(r)},_selectDay:function(t,i,n,r){var s,a=e(t);e(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(s=this._getInst(a[0]),s.selectedDay=s.currentDay=e("a",r).html(),s.selectedMonth=s.currentMonth=i,s.selectedYear=s.currentYear=n,this._selectDate(t,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,r=e(t),s=this._getInst(r[0]);i=null!=i?i:this._formatDate(s),s.input&&s.input.val(i),this._updateAlternate(s),n=this._get(s,"onSelect"),n?n.apply(s.input?s.input[0]:null,[i,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var i,n,r,s=this._get(t,"altField");s&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),r=this.formatDate(i,n,this._getFormatConfig(t)),e(s).val(r))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?""+i:i+""))return null;var r,s,a,o,d=0,l=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,_=-1,f=-1,g=-1,v=-1,y=!1,w=function(e){var i=t.length>r+1&&t.charAt(r+1)===e;return i&&r++,i},b=function(e){var t=w(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,r="y"===e?n:1,s=RegExp("^\\d{"+r+","+n+"}"),a=i.substring(d).match(s);if(!a)throw"Missing number at position "+d;return d+=a[0].length,parseInt(a[0],10)},M=function(t,n,r){var s=-1,a=e.map(w(t)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(a,function(e,t){var n=t[1];return i.substr(d,n.length).toLowerCase()===n.toLowerCase()?(s=t[0],d+=n.length,!1):void 0}),-1!==s)return s+1;throw"Unknown name at position "+d},Y=function(){if(i.charAt(d)!==t.charAt(r))throw"Unexpected literal at position "+d;d++};for(r=0;t.length>r;r++)if(y)"'"!==t.charAt(r)||w("'")?Y():y=!1;else switch(t.charAt(r)){case"d":g=b("d");break;case"D":M("D",u,h);break;case"o":v=b("o");break;case"m":f=b("m");break;case"M":f=M("M",p,m);break;case"y":_=b("y");break;case"@":o=new Date(b("@")),_=o.getFullYear(),f=o.getMonth()+1,g=o.getDate();break;case"!":o=new Date((b("!")-this._ticksTo1970)/1e4),_=o.getFullYear(),f=o.getMonth()+1,g=o.getDate();break;case"'":w("'")?Y():y=!0;break;default:Y()}if(i.length>d&&(a=i.substr(d),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===_?_=(new Date).getFullYear():100>_&&(_+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=_?0:-100)),v>-1)for(f=1,g=v;!((s=this._getDaysInMonth(_,f-1))>=g);)f++,g-=s;if(o=this._daylightSavingAdjust(new Date(_,f-1,g)),o.getFullYear()!==_||o.getMonth()+1!==f||o.getDate()!==g)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,d=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},l=function(e,t,i){var n=""+t;if(d(e))for(;i>n.length;)n="0"+n;return n},c=function(e,t,i,n){return d(e)?n[t]:i[t]},u="",h=!1;if(t)for(n=0;e.length>n;n++)if(h)"'"!==e.charAt(n)||d("'")?u+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":u+=l("d",t.getDate(),2);break;case"D":u+=c("D",t.getDay(),r,s);break;case"o":u+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",t.getMonth()+1,2);break;case"M":u+=c("M",t.getMonth(),a,o);break;case"y":u+=d("y")?t.getFullYear():(10>t.getFullYear()%100?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":d("'")?u+="'":h=!0;break;default:u+=e.charAt(n)}return u},_possibleChars:function(e){var t,i="",n=!1,r=function(i){var n=e.length>t+1&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;e.length>t;t++)if(n)"'"!==e.charAt(t)||r("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":r("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,r=this._getDefaultDate(e),s=r,a=this._getFormatConfig(e);try{s=this.parseDate(i,n,a)||r}catch(e){n=t?"":n}e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),e.currentDay=n?s.getDate():0,e.currentMonth=n?s.getMonth():0,e.currentYear=n?s.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var r=null==i||""===i?n:"string"==typeof i?function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(e){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=n.getFullYear(),s=n.getMonth(),a=n.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,d=o.exec(i);d;){switch(d[2]||"d"){case"d":case"D":a+=parseInt(d[1],10);break;case"w":case"W":a+=7*parseInt(d[1],10);break;case"m":case"M":s+=parseInt(d[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s));break;case"y":case"Y":r+=parseInt(d[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s))}d=o.exec(i)}return new Date(r,s,a)}(i):"number"==typeof i?isNaN(i)?n:function(e){var t=new Date;return t.setDate(t.getDate()+e),t}(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?n:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,r=e.selectedMonth,s=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),r===e.selectedMonth&&s===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,r,s,a,o,d,l,c,u,h,p,m,_,f,g,v,y,w,b,M,Y,L,k,T,D,S,x,C,H,j,Z,P,J,F,X,E,$,O=new Date,N=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),W=this._get(e,"isRTL"),A=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),Q=this._get(e,"navigationAsDateFormat"),R=this._getNumberOfMonths(e),I=this._get(e,"showCurrentAtPos"),G=this._get(e,"stepMonths"),K=1!==R[0]||1!==R[1],U=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),z=this._getMinMaxDate(e,"min"),V=this._getMinMaxDate(e,"max"),q=e.drawMonth-I,ee=e.drawYear;if(0>q&&(q+=12,ee--),V)for(t=this._daylightSavingAdjust(new Date(V.getFullYear(),V.getMonth()-R[0]*R[1]+1,V.getDate())),t=z&&z>t?z:t;this._daylightSavingAdjust(new Date(ee,q,1))>t;)0>--q&&(q=11,ee--);for(e.drawMonth=q,e.drawYear=ee,i=this._get(e,"prevText"),i=Q?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,q-G,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,q)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+i+"</span></a>",r=this._get(e,"nextText"),r=Q?this.formatDate(r,this._daylightSavingAdjust(new Date(ee,q+G,1)),this._getFormatConfig(e)):r,s=this._canAdjustMonth(e,1,ee,q)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+r+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+r+"</span></a>",a=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?U:N,a=Q?this.formatDate(a,o,this._getFormatConfig(e)):a,d=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=A?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(W?d:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(W?"":d)+"</div>":"",c=parseInt(this._get(e,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),m=this._get(e,"monthNames"),_=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),g=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),y=this._getDefaultDate(e),w="",M=0;R[0]>M;M++){for(Y="",this.maxRows=4,L=0;R[1]>L;L++){if(k=this._daylightSavingAdjust(new Date(ee,q,e.selectedDay)),T=" ui-corner-all",D="",K){if(D+="<div class='ui-datepicker-group",R[1]>1)switch(L){case 0:D+=" ui-datepicker-group-first",T=" ui-corner-"+(W?"right":"left");break;case R[1]-1:D+=" ui-datepicker-group-last",T=" ui-corner-"+(W?"left":"right");break;default:D+=" ui-datepicker-group-middle",T=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===M?W?s:n:"")+(/all|right/.test(T)&&0===M?W?n:s:"")+this._generateMonthYearHeader(e,q,ee,z,V,M>0||L>0,m,_)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)x=(b+c)%7,S+="<th scope='col'"+((b+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[x]+"'>"+p[x]+"</span></th>";for(D+=S+"</tr></thead><tbody>",C=this._getDaysInMonth(ee,q),ee===e.selectedYear&&q===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,C)),H=(this._getFirstDayOfMonth(ee,q)-c+7)%7,j=Math.ceil((H+C)/7),Z=K&&this.maxRows>j?this.maxRows:j,this.maxRows=Z,P=this._daylightSavingAdjust(new Date(ee,q,1-H)),J=0;Z>J;J++){for(D+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(P)+"</td>":"",b=0;7>b;b++)X=f?f.apply(e.input?e.input[0]:null,[P]):[!0,""],E=P.getMonth()!==q,$=E&&!v||!X[0]||z&&z>P||V&&P>V,F+="<td class='"+((b+c+6)%7>=5?" ui-datepicker-week-end":"")+(E?" ui-datepicker-other-month":"")+(P.getTime()===k.getTime()&&q===e.selectedMonth&&e._keyEvent||y.getTime()===P.getTime()&&y.getTime()===k.getTime()?" "+this._dayOverClass:"")+($?" "+this._unselectableClass+" ui-state-disabled":"")+(E&&!g?"":" "+X[1]+(P.getTime()===U.getTime()?" "+this._currentClass:"")+(P.getTime()===N.getTime()?" ui-datepicker-today":""))+"'"+(E&&!g||!X[2]?"":" title='"+X[2].replace(/'/g,"&#39;")+"'")+($?"":" data-handler='selectDay' data-event='click' data-month='"+P.getMonth()+"' data-year='"+P.getFullYear()+"'")+">"+(E&&!g?"&#xa0;":$?"<span class='ui-state-default'>"+P.getDate()+"</span>":"<a class='ui-state-default"+(P.getTime()===N.getTime()?" ui-state-highlight":"")+(P.getTime()===U.getTime()?" ui-state-active":"")+(E?" ui-priority-secondary":"")+"' href='#'>"+P.getDate()+"</a>")+"</td>",P.setDate(P.getDate()+1),P=this._daylightSavingAdjust(P);D+=F+"</tr>"}q++,q>11&&(q=0,ee++),D+="</tbody></table>"+(K?"</div>"+(R[0]>0&&L===R[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),Y+=D}w+=Y}return w+=l,e._keyEvent=!1,w},_generateMonthYearHeader:function(e,t,i,n,r,s,a,o){var d,l,c,u,h,p,m,_,f=this._get(e,"changeMonth"),g=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",w="";if(s||!f)w+="<span class='ui-datepicker-month'>"+a[t]+"</span>";else{for(d=n&&n.getFullYear()===i,l=r&&r.getFullYear()===i,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!d||c>=n.getMonth())&&(!l||r.getMonth()>=c)&&(w+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+o[c]+"</option>");w+="</select>"}if(v||(y+=w+(!s&&f&&g?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",s||!g)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},m=p(u[0]),_=Math.max(m,p(u[1]||"")),m=n?Math.max(m,n.getFullYear()):m,_=r?Math.min(_,r.getFullYear()):_,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";_>=m;m++)e.yearshtml+="<option value='"+m+"'"+(m===i?" selected='selected'":"")+">"+m+"</option>";e.yearshtml+="</select>",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,"yearSuffix"),v&&(y+=(!s&&f&&g?"":"&#xa0;")+w),y+="</div>"},_adjustInstDate:function(e,t,i){var n=e.selectedYear+("Y"===i?t:0),r=e.selectedMonth+("M"===i?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(n,r))+("D"===i?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,r,s)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=i&&i>t?i:t;return n&&r>n?n:r},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var r=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(i,n+(0>t?t:r[0]*r[1]),1));return 0>t&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var i,n,r=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),a=null,o=null,d=this._get(e,"yearRange");return d&&(i=d.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(o+=n)),(!r||t.getTime()>=r.getTime())&&(!s||t.getTime()<=s.getTime())&&(!a||t.getFullYear()>=a)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var r=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),r,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).on("mousedown",e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.12.1",e.datepicker,e.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=e("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.ui.escapeSelector=function(){var e=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(t){return t.replace(e,"\\$1")}}(),e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(i){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t},e.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,n;i=t.href.replace(e,""),n=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return t.hash.length>1&&i===n}}(),_create:function(){var t=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,r){return e(r).attr("aria-controls")===n?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=!!this.tabs.length&&0)),!1!==t&&-1===(t=this.tabs.index(this.tabs.eq(t)))&&(t=!i&&0),!i&&!1===t&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(e.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),r=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:r=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){for(var n=this.tabs.length-1;-1!==e.inArray(function(){return t>n&&(t=0),0>t&&(t=n),t}(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){return"active"===e?void this._activate(t):(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({
"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,n=this.anchors,r=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=e(),this.anchors.each(function(i,n){var r,s,a,o=e(n).uniqueId().attr("id"),d=e(n).closest("li"),l=d.attr("aria-controls");t._isLocal(n)?(r=n.hash,a=r.substring(1),s=t.element.find(t._sanitizeSelector(r))):(a=d.attr("aria-controls")||e({}).uniqueId()[0].id,r="#"+a,s=t.element.find(r),s.length||(s=t._createPanel(a),s.insertAfter(t.panels[i-1]||t.tablist)),s.attr("aria-live","polite")),s.length&&(t.panels=t.panels.add(s)),l&&d.data("ui-tabs-aria-controls",l),d.attr({"aria-controls":a,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var i,n,r;for(e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),r=0;n=this.tabs[r];r++)i=e(n),!0===t||-1!==e.inArray(r,t)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,r=e(t.currentTarget),s=r.closest("li"),a=s[0]===n[0],o=a&&i.collapsible,d=o?e():this._getPanelForTab(s),l=n.length?this._getPanelForTab(n):e(),c={oldTab:n,oldPanel:l,newTab:o?e():s,newPanel:d};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||!1===this._trigger("beforeActivate",t,c)||(i.active=!o&&this.tabs.index(s),this.active=a?e():s,this.xhr&&this.xhr.abort(),l.length||d.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),d.length&&this.load(this.tabs.index(s),t),this._toggle(t,c))},_toggle:function(t,i){function n(){s.running=!1,s._trigger("activate",t,i)}function r(){s._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&s.options.show?s._show(a,s.options.show,n):(a.show(),n())}var s=this,a=i.newPanel,o=i.oldPanel;this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){s._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o.hide(),r()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&o.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return!1===t?e():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+e.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;!1!==i&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setOptionDisabled(i))},disable:function(t){var i=this.options.disabled;if(!0!==i){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setOptionDisabled(i)}},load:function(t,i){t=this._getIndex(t);var n=this,r=this.tabs.eq(t),s=r.find(".ui-tabs-anchor"),a=this._getPanelForTab(r),o={tab:r,panel:a},d=function(e,t){"abort"===t&&n.panels.stop(!1,!0),n._removeClass(r,"ui-tabs-loading"),a.removeAttr("aria-busy"),e===n.xhr&&delete n.xhr};this._isLocal(s[0])||(this.xhr=e.ajax(this._ajaxSettings(s,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(r,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(e,t,r){setTimeout(function(){a.html(e),n._trigger("load",i,o),d(r,t)},1)}).fail(function(e,t){setTimeout(function(){d(e,t)},1)})))},_ajaxSettings:function(t,i,n){var r=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,s){return r._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:s},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==e.uiBackCompat&&e.widget("ui.tabs",e.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),e.ui.tabs}),define("app/views/folder-share-item",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",template:t.template(e("#folder-perm-item-tmpl").html()),initialize:function(t){void 0===t.item_data.show_folder_path&&e.extend(t.item_data,{show_folder_path:!1}),this.item_data=t.item_data,this.repo_id=t.repo_id,this.path=t.path,this.show_admin=!1,app.pageOptions.is_pro&&"/"==this.path&&!this.item_data.is_group_owned_repo&&(this.show_admin=!0),this.render()},render:function(){return this.$el.html(this.template(e.extend({},this.item_data,{show_admin:this.show_admin}))),this},events:{mouseenter:"showOpIcons",mouseleave:"hideOpIcons","click .perm-edit-icon":"editIconClick","change .perm-toggle-select":"editPerm","click .delete-icon":"del"},showOpIcons:function(){this.$el.find(".op-icon").removeClass("vh")},hideOpIcons:function(){this.$el.find(".op-icon").addClass("vh")},editIconClick:function(t){return e(t.currentTarget).closest("td").find(".perm").addClass("hide").end().find(".perm-toggle-select").removeClass("hide"),!1},editPerm:function(t){var i,r,s,a=this,o=e(t.currentTarget).val(),d=this.item_data;d.is_group_owned_repo?(d.for_user?(i=n.getUrl({name:"group_owned_repo_user_share",repo_id:this.repo_id}),s={username:d.user_email,permission:o,path:this.path}):(i=n.getUrl({name:"group_owned_repo_group_share",repo_id:this.repo_id}),s={group_id:d.group_id,permission:o,path:this.path}),r="PUT"):(i=n.getUrl({name:"dir_shared_items",repo_id:this.repo_id})+"?p="+encodeURIComponent(this.path),d.for_user?i+="&share_type=user&username="+encodeURIComponent(d.user_email):i+="&share_type=group&group_id="+encodeURIComponent(d.group_id),s={permission:o},r="POST"),e.ajax({url:i,dataType:"json",method:r,beforeSend:n.prepareCSRFToken,data:s,success:function(){"admin"==o?(d.is_admin=!0,d.permission="rw"):(d.permission=o,d.is_admin=!1),a.render()},error:function(t){var i;i=t.responseText?gettext("Edit failed"):gettext("Failed. Please check the network."),d.for_user?e("#dir-user-share .error").html(i).removeClass("hide"):e("#dir-group-share .error").html(i).removeClass("hide")}})},del:function(){var t,i=this,r=this.item_data,s={};return r.is_group_owned_repo?r.for_user?(t=n.getUrl({name:"group_owned_repo_user_share",repo_id:this.repo_id}),s={username:r.user_email,path:this.path}):(t=n.getUrl({name:"group_owned_repo_group_share",repo_id:this.repo_id}),s={group_id:r.group_id,path:this.path}):(t=n.getUrl({name:"dir_shared_items",repo_id:this.repo_id})+"?p="+encodeURIComponent(this.path),r.for_user?t+="&share_type=user&username="+encodeURIComponent(r.user_email):t+="&share_type=group&group_id="+encodeURIComponent(r.group_id)),e.ajax({url:t,dataType:"json",method:"DELETE",beforeSend:n.prepareCSRFToken,data:s,success:function(){i.remove()},error:function(t){var i;i=t.responseText?gettext("Delete failed"):gettext("Failed. Please check the network."),r.for_user?e("#dir-user-share .error").html(i).removeClass("hide"):e("#dir-group-share .error").html(i).removeClass("hide")}}),!1}})}),define("app/views/share",["jquery","jquery.ui","underscore","backbone","common","app/views/folder-share-item"],function(e,t,i,n,r,s){"use strict";return n.View.extend({tagName:"div",id:"share-popup",template:i.template(e("#share-popup-tmpl").html()),initialize:function(t){this.is_repo_owner=t.is_repo_owner,this.is_admin=t.is_admin,this.is_address_book_group_admin=t.is_address_book_group_admin,this.is_group_owned_repo=t.is_group_owned_repo,this.is_virtual=t.is_virtual,this.user_perm=t.user_perm,this.repo_id=t.repo_id,this.repo_encrypted=t.repo_encrypted,this.dirent_path=t.dirent_path,this.obj_name=t.obj_name,this.is_dir=t.is_dir;var i=!1;if(!this.is_virtual&&(this.is_repo_owner||this.is_admin||this.is_address_book_group_admin)&&(i=!0),this.enable_dir_private_share=i,this.render(),e(window).width()>=768?(this.$el.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"})):this.$el.css({width:e(window).width()-50,height:e(window).height()-50,overflow:"auto"}).modal({focus:!1}),this.$("#share-tabs").tabs(),!this.repo_encrypted&&app.pageOptions.can_generate_share_link&&this.downloadLinkPanelInit(),this.is_dir&&("rw"==this.user_perm&&!this.repo_encrypted&&app.pageOptions.can_generate_upload_link&&this.uploadLinkPanelInit(),this.enable_dir_private_share)){this.dirUserSharePanelInit(),this.dirGroupSharePanelInit();var n=this;e(document).on("click",function(e){var t=e.target||event.srcElement;n.$(".perm-edit-icon, .perm-toggle-select").is(t)||(n.$(".perm").removeClass("hide"),n.$(".perm-toggle-select").addClass("hide"))})}},render:function(){var e=!1;return app.pageOptions.is_pro&&"/"==this.dirent_path&&!this.is_group_owned_repo&&(e=!0),this.$el.html(this.template({title:gettext("Share {placeholder}").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+r.HTMLescape(this.obj_name)+'">'+r.HTMLescape(this.obj_name)+"</span>"),is_dir:this.is_dir,enable_dir_private_share:this.enable_dir_private_share,show_admin_perm_option:e,user_perm:this.user_perm,repo_id:this.repo_id,repo_encrypted:this.repo_encrypted,can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link})),this},events:{'click [type="checkbox"]':"clickCheckbox","click .link-expiration-checkbox":"clickExpirationCheckbox","click .shared-link":"clickToSelect","submit #generate-download-link-form":"generateDownloadLink","click #send-download-link":"showDownloadLinkSendForm","submit #send-download-link-form":"sendDownloadLink","click #cancel-share-download-link":"cancelShareDownloadLink","click #delete-download-link":"deleteDownloadLink","click #generate-download-link-form .generate-random-password":"generateRandomDownloadPassword","keydown #generate-download-link-form .generate-random-password":"generateRandomDownloadPassword","click #generate-download-link-form .show-or-hide-password":"showOrHideDownloadPassword","keydown #generate-download-link-form .show-or-hide-password":"showOrHideDownloadPassword","click .shared-link-copy-icon":"copySharedLink","click #dir-upload-link-tab":"clickUploadLinkTab","submit #generate-upload-link-form":"generateUploadLink","click #send-upload-link":"showUploadLinkSendForm","submit #send-upload-link-form":"sendUploadLink","click #cancel-share-upload-link":"cancelShareUploadLink","click #delete-upload-link":"deleteUploadLink","click #generate-upload-link-form .generate-random-password":"generateRandomUploadPassword","keydown #generate-upload-link-form .generate-random-password":"generateRandomUploadPassword","click #generate-upload-link-form .show-or-hide-password":"showOrHideUploadPassword","keydown #generate-upload-link-form .show-or-hide-password":"showOrHideUploadPassword","click .invite-link-in-popup":"closePopup","click #add-dir-user-share-item .submit":"dirUserShare","click #add-dir-group-share-item .submit":"dirGroupShare"},clickCheckbox:function(t){e(t.currentTarget).closest(".checkbox-label").next(".link-option-content").toggleClass("hide")},clickExpirationCheckbox:function(t){var i=e(t.currentTarget),n=i.closest(".checkbox-label").find('[name="expire_days"]');i.prop("checked")?n.prop("disabled",!1).removeClass("input-disabled"):n.prop("disabled",!0).addClass("input-disabled")},clickToSelect:function(t){e(t.currentTarget).trigger("select")},renderDownloadLink:function(t){var i=t.link,n=i+"?dl=1",r=this.$("#download-link"),s=this.$("#direct-dl-link"),a=e(".link-placeholder",r),o=e("input",r),d=e(".link-placeholder",s),l=e("input",s);this.download_link=i,this.download_link_token=t.token,a.html(i),t.permissions.can_download?(s.show().prev("dt").show(),d.html(n)):s.hide().prev("dt").hide(),t.is_expired&&(this.$("#send-download-link").addClass("hide"),this.$("#download-link-operations .shared-link-copy-icon").addClass("hide"),this.$("#download-link, #direct-dl-link").append(' <span class="error">('+gettext("Expired")+")</span>")),this.$("#download-link-operations").removeClass("hide"),o.val(i).css({width:a.width()+2}).show(),a.hide(),l.val(n).css({width:d.width()+2}).show(),d.hide()},renderUploadLink:function(t){var i=t.link;this.upload_link=i,this.upload_link_token=t.token;var n=this.$("#upload-link"),r=e(".link-placeholder",n),s=e("input",n);r.html(i),this.$("#upload-link-operations").removeClass("hide"),s.val(i).css({width:r.width()+2}).show(),r.hide()},clickUploadLinkTab:function(){var t=this.$("#upload-link"),i=e(".link-placeholder",t);e("input",t).css({width:i.show().width()+2}).show(),i.hide()},downloadLinkPanelInit:function(){var t=e("#download-link-share"),i=this.$(".loading-tip"),n=this;e.ajax({url:r.getUrl({name:"share_admin_share_links"}),data:{repo_id:this.repo_id,path:this.dirent_path},cache:!1,dataType:"json",success:function(e){if(1==e.length){var t=e[0];n.renderDownloadLink(t)}else n.$("#generate-download-link-form").removeClass("hide")},error:function(i,n,s){var a=r.prepareAjaxErrorMsg(i);e(".error",t).html(a).show()},complete:function(){i.hide()}}),this.is_dir||e.ajax({url:r.getUrl({name:"get_file_info",repo_id:this.repo_id}),data:{p:this.dirent_path},cache:!1,dataType:"json",success:function(e){e.can_preview&&n.$("#file-share-link-preview-only-radio").removeClass("hide");var t="";-1!=n.obj_name.lastIndexOf(".")&&(t=n.obj_name.substr(n.obj_name.lastIndexOf(".")+1).toLowerCase()),"docx"!=t&&"xlsx"!=t&&"pptx"!=t||!e.can_edit||n.$("#file-share-link-edit-download-radio").removeClass("hide")}})},generateRandomPassword:function(t,i){if("keydown"!=t.type||32==t.which){for(var n=app.pageOptions.share_link_password_min_length,r="",s="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789",a=0;a<n;a++)r+=s.charAt(Math.floor(Math.random()*s.length));e("input[name=password], input[name=password_again]",i).attr("type","text").val(r),e(".show-or-hide-password",i).attr("title",gettext("Hide")).attr("aria-label",gettext("Hide")).removeClass("icon-eye").addClass("icon-eye-slash")}},generateRandomDownloadPassword:function(t){this.generateRandomPassword(t,e("#generate-download-link-form"))},showOrHidePassword:function(t,i){if("keydown"!=t.type||32==t.which){var n=e(".show-or-hide-password",i),r=e("input[name=password], input[name=password_again]",i);n.toggleClass("icon-eye icon-eye-slash"),n.hasClass("icon-eye")?(n.attr("title",gettext("Show")),n.attr("aria-label",gettext("Show")),r.attr("type","password")):(n.attr("title",gettext("Hide")),n.attr("aria-label",gettext("Hide")),r.attr("type","text"))}},showOrHideDownloadPassword:function(t){this.showOrHidePassword(t,e("#generate-download-link-form"))},generateLink:function(t){var i=t.link_type,n=t.form,s=n.attr("id"),a=e('[name="use_passwd"]',n),o=a.prop("checked"),d={};if(o){var l=e('[name="password"]',n),c=e('[name="password_again"]',n),u=e.trim(l.val()),h=e.trim(c.val());if(!u)return r.showFormError(s,gettext("Please enter password")),!1;if(u.length<app.pageOptions.share_link_password_min_length)return r.showFormError(s,gettext("Password is too short")),!1;if(!h)return r.showFormError(s,gettext("Please enter the password again")),!1;if(u!=h)return r.showFormError(s,gettext("Passwords don't match")),!1;d.password=u}if("download"==i){var p=e('[name="set_expiration"]',n),m=p.prop("checked");if(m){var _=e('[name="expire_days"]',n),f=e.trim(_.val());if(!f)return r.showFormError(s,gettext("Please enter days.")),!1;if(Math.floor(f)!=f||!e.isNumeric(f))return r.showFormError(s,gettext("Please enter valid days")),!1;d.expire_days=f}if(app.pageOptions.is_pro){var g,v=e('[name="permission"]:checked',n).val();switch(v){case"preview_only":g={can_edit:!1,can_download:!1};break;case"preview_download":g={can_edit:!1,can_download:!0};break;case"edit_download":g={can_edit:!0,can_download:!0}}d.permissions=JSON.stringify(g)}}e(".error",n).addClass("hide").html("");var y=e('[type="submit"]',n);r.disableButton(y),e.extend(d,{repo_id:this.repo_id,path:this.dirent_path});var w=this,b=function(t){n.addClass("hide"),r.enableButton(y),o&&(a.prop("checked",!1).parent().removeClass("checkbox-checked").end().closest(".checkbox-label").next().addClass("hide"),l.val(""),c.val("")),"download"==i?(m&&(app.pageOptions.share_link_expire_days_min>0||app.pageOptions.share_link_expire_days_max>0||(p.prop("checked",!1),_.prop("disabled",!0).addClass("input-disabled")),_.val("")),e('[name="permission"]:eq(0)',n).prop("checked",!0),w.renderDownloadLink(t)):w.renderUploadLink(t)};r.ajaxPost({form:n,post_url:t.post_url,post_data:d,after_op_success:b,form_id:s})},generateDownloadLink:function(){return this.generateLink({link_type:"download",form:this.$("#generate-download-link-form"),post_url:r.getUrl({name:"share_admin_share_links"})}),!1},copySharedLink:function(t){e(t.currentTarget).prev(".shared-link").select(),document.execCommand("copy"),e.modal.close(),r.feedback(gettext("Share link is copied to the clipboard."),"success")},showDownloadLinkSendForm:function(){this.$("#send-download-link, #delete-download-link").addClass("hide"),this.$("#send-download-link-form").removeClass("hide")},sendLink:function(t){var i=t.form,n=i.attr("id"),s=e.trim(e('[name="email"]',i).val()),a=e('textarea[name="extra_msg"]',i).val();if(!s)return r.showFormError(n,gettext("Please input at least an email.")),!1;var o=e('[type="submit"]',i),d=e(".sending-tip",i);r.disableButton(o),d.removeClass("hide");var l={email:s,extra_msg:a};e.extend(l,t.other_post_data);var c=function(t){e.modal.close();var i=gettext("Successfully sent to {placeholder}").replace("{placeholder}",t.send_success.join(", "));r.feedback(i,"success"),t.send_failed.length>0&&(i+="<br />"+gettext("Failed to send to {placeholder}").replace("{placeholder}",t.send_failed.join(", ")),r.feedback(i,"info"))},u=function(e){d.addClass("hide"),r.enableButton(o);var t=r.prepareAjaxErrorMsg(e);r.showFormError(n,t)};r.ajaxPost({form:i,post_url:t.post_url,post_data:l,after_op_success:c,after_op_error:u,form_id:n})},sendDownloadLink:function(){return this.sendLink({form:this.$("#send-download-link-form"),other_post_data:{file_shared_link:this.download_link,file_shared_name:this.obj_name,file_shared_type:this.is_dir?"d":"f"},post_url:r.getUrl({name:"send_shared_download_link"})}),!1},cancelShareDownloadLink:function(){this.$("#send-download-link, #delete-download-link").removeClass("hide"),this.$("#send-download-link-form").addClass("hide")},deleteDownloadLink:function(){var t=this;e.ajax({url:r.getUrl({name:"share_admin_share_link",token:this.download_link_token}),type:"DELETE",cache:!1,beforeSend:r.prepareCSRFToken,dataType:"json",success:function(e){t.$("#generate-download-link-form").removeClass("hide"),t.$("#download-link-operations").addClass("hide")}})},uploadLinkPanelInit:function(){var t=e("#dir-upload-link-share"),i=this.$(".loading-tip").show(),n=this;e.ajax({url:r.getUrl({name:"share_admin_upload_links"}),data:{repo_id:this.repo_id,path:this.dirent_path},cache:!1,dataType:"json",success:function(i){if(1==i.length){var r=i[0];n.renderUploadLink(r)}else n.$("#generate-upload-link-form").removeClass("hide");e(".tip",t).show()},error:function(i,n,s){var a=r.prepareAjaxErrorMsg(i);e(".error",t).html(a).show()},complete:function(){i.hide()}})},generateRandomUploadPassword:function(t){this.generateRandomPassword(t,e("#generate-upload-link-form"))},showOrHideUploadPassword:function(t){this.showOrHidePassword(t,e("#generate-upload-link-form"))},generateUploadLink:function(){return this.generateLink({link_type:"upload",form:this.$("#generate-upload-link-form"),post_url:r.getUrl({name:"share_admin_upload_links"})}),!1},showUploadLinkSendForm:function(){this.$("#send-upload-link, #delete-upload-link").addClass("hide"),this.$("#send-upload-link-form").removeClass("hide")},sendUploadLink:function(){return this.sendLink({form:this.$("#send-upload-link-form"),other_post_data:{shared_upload_link:this.upload_link},post_url:r.getUrl({name:"send_shared_upload_link"})}),!1},cancelShareUploadLink:function(){this.$("#send-upload-link, #delete-upload-link").removeClass("hide"),this.$("#send-upload-link-form").addClass("hide")},deleteUploadLink:function(){var t=this;e.ajax({url:r.getUrl({name:"share_admin_upload_link",token:this.upload_link_token}),type:"DELETE",cache:!1,beforeSend:r.prepareCSRFToken,dataType:"json",success:function(e){t.$("#generate-upload-link-form").removeClass("hide"),t.$("#upload-link-operations").addClass("hide")}})},prepareUserItemData:function(t){var i={for_user:!0};return this.is_group_owned_repo?e.extend(i,{user_email:t.user_email,user_name:t.user_name,permission:t.permission,is_group_owned_repo:this.is_group_owned_repo}):e.extend(i,{user_email:t.user_info.name,user_name:t.user_info.nickname,permission:t.permission,is_admin:t.is_admin}),i},dirUserSharePanelInit:function(){var t,i,n=this,a=this.$(".loading-tip").show(),o=this.$("#dir-user-share"),d=e("table",o),l=e("#add-dir-user-share-item"),c=this.repo_id,u=this.dirent_path;this.is_group_owned_repo?(t=r.getUrl({name:"group_owned_repo_user_share",repo_id:c}),i={path:u}):(t=r.getUrl({name:"dir_shared_items",repo_id:c}),i={p:u,share_type:"user"}),e.ajax({url:t,data:i,cache:!1,dataType:"json",success:function(t){e(t).each(function(e,t){var i=new s({repo_id:c,path:u,item_data:n.prepareUserItemData(t)});l.after(i.el)}),e('[name="emails"]',l).select2(e.extend({},r.contactInputOptionsForSelect2())),d.removeClass("hide")},error:function(t,i,n){var s=r.prepareAjaxErrorMsg(t);e(".error",o).html(s).show()},complete:function(){a.hide()}})},prepareGroupItemData:function(t){var i={for_user:!1};return this.is_group_owned_repo?e.extend(i,{group_id:t.group_id,group_name:t.group_name,permission:t.permission,is_group_owned_repo:this.is_group_owned_repo}):e.extend(i,{group_id:t.group_info.id,group_name:t.group_info.name,permission:t.permission,is_admin:t.is_admin}),i},prepareAvailableGroups:function(t){var i=[];e.ajax({url:r.getUrl({name:"shareable_groups"}),type:"GET",dataType:"json",cache:!1,success:function(e){for(var t=0,n=e.length;t<n;t++)i.push({id:e[t].id,name:e[t].name});i.sort(function(e,t){return r.compareTwoWord(e.name,t.name)})},error:function(e,t,i){},complete:function(){t.callback(i)}})},dirGroupSharePanelInit:function(){var t,i,n=this,a=this.$(".loading-tip").show(),o=this.$("#dir-group-share"),d=e("table",o),l=e("#add-dir-group-share-item"),c=this.repo_id,u=this.dirent_path;this.is_group_owned_repo?(t=r.getUrl({name:"group_owned_repo_group_share",repo_id:c}),i={path:u}):(t=r.getUrl({name:"dir_shared_items",repo_id:c}),i={p:u,share_type:"group"}),e.ajax({url:t,data:i,cache:!1,dataType:"json",success:function(t){e(t).each(function(e,t){var i=new s({repo_id:c,path:u,item_data:n.prepareGroupItemData(t)});l.after(i.el)});var i=function(t){for(var i="",n=0,r=t.length;n<r;n++)i+='<option value="'+t[n].id+'" data-index="'+n+'">'+t[n].name+"</option>";e('[name="groups"]',l).html(i).select2({placeholder:gettext("Select groups"),escapeMarkup:function(e){return e}}),d.removeClass("hide")};n.prepareAvailableGroups({callback:i})},error:function(t,i,n){var s=r.prepareAjaxErrorMsg(t);e(".error",o).html(s).show()},complete:function(){a.hide()}})},closePopup:function(){e.modal.close()},dirUserShare:function(){var t=this,i=e("#dir-user-share"),n=this.$("#add-dir-user-share-item"),a=e('[name="emails"]',n),o=a.val();if(!o)return!1;var d,l,c,u=e("#add-dir-user-share-item"),h=this.repo_id,p=this.dirent_path,m=e('[name="permission"]',n),_=m.val(),f=e(".error",i),g=e('[type="submit"]',n);this.is_group_owned_repo?(d=r.getUrl({name:"group_owned_repo_user_share",repo_id:h}),l="POST",c={permission:_,path:p,username:o.split(",")}):(d=r.getUrl({name:"dir_shared_items",repo_id:h})+"?p="+encodeURIComponent(p),l="PUT",c={share_type:"user",username:o.split(","),permission:_}),r.disableButton(g),e.ajax({url:d,dataType:"json",method:l,beforeSend:r.prepareCSRFToken,traditional:!0,data:c,success:function(i){if(i.success.length>0&&(e(i.success).each(function(e,i){var n=new s({repo_id:h,path:p,item_data:t.prepareUserItemData(i)});u.after(n.el)}),a.select2("val",""),e("option",m).prop("selected",!1),e('[value="rw"]',m).prop("selected",!0),f.addClass("hide")),i.failed.length>0){var n="";e(i.failed).each(function(e,t){n+=r.HTMLescape(t.email)+": "+t.error_msg+"<br />"}),f.html(n).removeClass("hide")}},error:function(e){var t=r.prepareAjaxErrorMsg(e);f.html(t).removeClass("hide")},complete:function(){r.enableButton(g)}})},dirGroupShare:function(){var t=this,i=e("#dir-group-share"),n=this.$("#add-dir-group-share-item"),a=e('[name="groups"]',n),o=a.val();if(!o)return!1;var d,l,c,u=e("#add-dir-group-share-item"),h=this.repo_id,p=this.dirent_path,m=e('[name="permission"]',n),_=m.val(),f=e(".error",i),g=e('[type="submit"]',n);this.is_group_owned_repo?(d=r.getUrl({name:"group_owned_repo_group_share",repo_id:h}),l="POST",c={path:p,group_id:o,permission:_}):(d=r.getUrl({name:"dir_shared_items",repo_id:h})+"?p="+encodeURIComponent(p),l="PUT",c={share_type:"group",group_id:o,permission:_}),r.disableButton(g),e.ajax({url:d,dataType:"json",method:l,beforeSend:r.prepareCSRFToken,traditional:!0,data:c,success:function(i){if(i.success.length>0&&(e(i.success).each(function(e,i){var n=new s({repo_id:h,path:p,item_data:t.prepareGroupItemData(i)});u.after(n.el)}),a.select2("val",""),e("option",m).prop("selected",!1),e('[value="rw"]',m).prop("selected",!0),f.addClass("hide")),i.failed.length>0){var n="";e(i.failed).each(function(e,t){n+=r.HTMLescape(t.group_name)+": "+t.error_msg+"<br />"}),f.html(n).removeClass("hide")}},error:function(e){var t=r.prepareAjaxErrorMsg(e);f.html(t).removeClass("hide")},complete:function(){r.enableButton(g)}})}})}),define("app/views/dialogs/repo-change-password",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({template:t.template(e("#repo-change-password-form-tmpl").html()),initialize:function(t){this.repo_name=t.repo_name,this.repo_id=t.repo_id,this.render(),this.$(".op-target").css({"max-width":280}),this.$el.modal(),e("#simplemodal-container").css({height:"auto"})},render:function(){var e=this.repo_name;return this.$el.html(this.template({title:gettext("Change Password of Library {placeholder}").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(e)+'">'+n.HTMLescape(e)+"</span>")})),this},events:{"submit form":"formSubmit"},formSubmit:function(){var t=this.$("form"),i=this.$(".error"),r=e.trim(e('input[name="old_passwd"]',t).val()),s=e.trim(e('input[name="new_passwd"]',t).val()),a=e.trim(e('input[name="new_passwd_again"]',t).val());if(!r)return i.html(gettext("Please enter the old password")).removeClass("hide"),!1;if(!s)return i.html(gettext("Please enter a new password")).removeClass("hide"),!1;if(s.length<app.pageOptions.repo_password_min_length)return i.html(gettext("New password is too short")).removeClass("hide"),!1;if(!a)return i.html(gettext("Please enter the new password again")).removeClass("hide"),!1;if(s!=a)return i.html(gettext("New passwords don't match")).removeClass("hide"),!1;var o=this.$('[type="submit"]');return n.disableButton(o),e.ajax({url:n.getUrl({name:"api_v2.1_repo_set_password",repo_id:this.repo_id}),type:"PUT",dataType:"json",beforeSend:n.prepareCSRFToken,data:{old_password:r,new_password:s},success:function(){e.modal.close(),n.feedback(gettext("Successfully changed library password."),"success")},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.html(t).show(),n.enableButton(o)}}),!1}})}),define("app/views/dialogs/repo-history-settings",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({template:t.template(e("#history-settings-dialog-tmpl").html()),initialize:function(t){this.repo_name=t.repo_name,this.repo_id=t.repo_id,this.url_name=t.url_name,this.render(),this.$(".op-target").css({"max-width":280}),this.$el.modal(),e("#simplemodal-container").css({height:"auto"}),this.$loadingTip=this.$(".loading-tip"),this.$error=this.$(".error"),this.$form=this.$("form"),this.$radios=this.$("input:radio[name=history]"),this.$days_input=this.$("input:text[name=days]"),this.$submit=this.$("[type=submit]"),this.renderHistorySettings()},render:function(){var e=this.repo_name;return this.$el.html(this.template({title:gettext("{placeholder} History Setting").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(e)+'">'+n.HTMLescape(e)+"</span>"),default_history_limit:30})),this},renderHistorySettings:function(){var t=this;e.ajax({url:n.getUrl({name:this.url_name,repo_id:this.repo_id}),type:"get",dataType:"json",success:function(e){t.$loadingTip.hide(),
e.keep_days<=-1?t.$radios.filter("[value=full_history]").prop("checked",!0):0==e.keep_days?t.$radios.filter("[value=no_history]").prop("checked",!0):(t.$radios.filter("[value=partial_history]").prop("checked",!0),t.$days_input.prop("disabled",!1).removeClass("input-disabled"),t.$days_input.val(e.keep_days)),t.$radios.filter(":checked").trigger("focus"),app.pageOptions.enable_repo_history_setting||(t.$(".history-settings-notice").removeClass("hide"),t.$radios.prop("disabled",!0),t.$days_input.prop("disabled",!0).addClass("input-disabled"),t.$submit.prop("disabled",!0).addClass("btn-disabled"))},error:function(e){var i=n.prepareAjaxErrorMsg(e);t.$error.html(i).show()}})},events:{'change [name="history"]':"changeHistorySetting","submit form":"formSubmit"},changeHistorySetting:function(t){var i=e(t.currentTarget).val(),n=this.$days_input;"full_history"==i||"no_history"==i?n.prop("disabled",!0).addClass("input-disabled"):n.prop("disabled",!1).removeClass("input-disabled")},formSubmit:function(){var t,i=this.$radios.filter(":checked").val(),r=this;return t="partial_history"==i?this.$days_input.val():"full_history"==i?-1:0,this.$submit.prop("disabled",!0),e.ajax({url:n.getUrl({name:this.url_name,repo_id:this.repo_id}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{keep_days:t},success:function(){e.modal.close(),n.feedback(gettext("Successfully set library history."),"success")},error:function(e){var t=n.prepareAjaxErrorMsg(e);r.$error.html(t).show(),n.enableButton(r.$submit)}}),!1}})}),define("app/collections/repo-shared-download-links",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({initialize:function(e){this.repo_id=e.repo_id},url:function(){return i.getUrl({name:"repo_shared_download_links",repo_id:this.repo_id})}})}),define("app/collections/repo-shared-upload-links",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({initialize:function(e){this.repo_id=e.repo_id},url:function(){return i.getUrl({name:"repo_shared_upload_links",repo_id:this.repo_id})}})}),define("app/views/repo-shared-link",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",template:t.template(e("#repo-shared-link-tmpl").html()),events:{mouseenter:"highlight",mouseleave:"rmHighlight","click .rm-link":"removeLink"},initialize:function(t){this.data={},e.extend(this.data,t)},render:function(){var t={},i=this.model.get("path"),r=i,s="";e.extend(t,this.model.attributes),"upload"==this.data.link_type&&e.extend(t,{share_type:"d"});var a,o=n.isHiDPI()?48:24;return"d"==t.share_type?(r=i.substring(0,i.length-1),a=n.getDirIconUrl(!1,o)):(s=n.fileSizeFormat(this.model.get("size"),1),a=n.getFileIconUrl(this.model.get("name"),o)),e.extend(t,{repo_id:this.data.repo_id,icon_url:a,formattedSize:s,encoded_path:n.encodePath(r)}),this.$el.html(this.template(t)),this},highlight:function(){this.$el.addClass("hl").find(".op-icon").removeClass("vh")},rmHighlight:function(){this.$el.removeClass("hl").find(".op-icon").addClass("vh")},removeLink:function(){var t=n.getUrl({name:"download"==this.data.link_type?"repo_shared_download_link":"repo_shared_upload_link",repo_id:this.data.repo_id,token:this.model.get("token")}),i=this;return e.ajax({url:t,type:"delete",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){i.remove()},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.data.$error.html(t).show()}}),!1}})}),define("app/views/dialogs/repo-share-link-admin",["jquery","underscore","backbone","common","jquery.ui","app/collections/repo-shared-download-links","app/collections/repo-shared-upload-links","app/views/repo-shared-link"],function(e,t,i,n,r,s,a,o){"use strict";return i.View.extend({tagName:"div",id:"repo-share-link-admin-dialog",template:t.template(e("#repo-shared-links-admin-dialog-tmpl").html()),initialize:function(t){this.repo_name=t.repo_name,this.repo_id=t.repo_id,this.render(),this.$(".op-target").css({"max-width":280}),e(window).width()>=768?(this.$el.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"})):this.$el.css({width:e(window).width()-50,height:e(window).height()-50,overflow:"auto"}).modal({focus:!1}),this.$(".js-tabs").tabs();var i=new s({repo_id:this.repo_id});i.link_type="download",this.$downloadLinksPanel=this.$("#js-download-links");var n=new a({repo_id:this.repo_id});n.link_type="upload",this.$uploadLinksPanel=this.$("#js-upload-links"),app.pageOptions.can_generate_share_link&&this.renderLinksPanel({links:i,$panel:this.$downloadLinksPanel}),app.pageOptions.can_generate_upload_link&&this.renderLinksPanel({links:n,$panel:this.$uploadLinksPanel})},render:function(){return this.$el.html(this.template({can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link,title:gettext("{placeholder} Share Links").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(this.repo_name)+'">'+n.HTMLescape(this.repo_name)+"</span>")})),this},renderLinksPanel:function(t){var i=t.links,r=t.$panel,s=e(".loading-tip",r),a=e(".error",r);this.listenTo(i,"add",this.addLink),i.fetch({cache:!1,success:function(e,t,i){s.hide()},error:function(e,t,i){var r=n.prepareCollectionFetchErrorMsg(e,t,i);a.html(r).show(),s.hide()}})},addLink:function(t,i,n){var r=i.link_type,s="download"==r?this.$downloadLinksPanel:this.$uploadLinksPanel,a=new o({model:t,repo_id:this.repo_id,link_type:r,$error:e(".error",s)});e("tbody",s).append(a.render().el)}})}),function(e){"use strict";"function"==typeof define&&define.amd?define("jstree",["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){"use strict";if(!e.jstree){var i=0,n=!1,r=!1,s=!1,a=[],o=e("script:last").attr("src"),d=window.document;e.jstree={version:"3.3.5",defaults:{plugins:[]},plugins:{},path:o&&-1!==o.indexOf("/")?o.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},e.jstree.create=function(t,n){var r=new e.jstree.core(++i),s=n;return n=e.extend(!0,{},e.jstree.defaults,n),s&&s.plugins&&(n.plugins=s.plugins),e.each(n.plugins,function(e,t){"core"!==e&&(r=r.plugin(t,n[t]))}),e(t).data("jstree",r),r.init(t,n),r},e.jstree.destroy=function(){e(".jstree:jstree").jstree("destroy"),e(d).off(".jstree")},e.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},e.jstree.reference=function(t){var i=null,n=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!n||!n.length)try{n=e(t)}catch(e){}if(!n||!n.length)try{n=e("#"+t.replace(e.jstree.idregex,"\\$&"))}catch(e){}return n&&n.length&&(n=n.closest(".jstree")).length&&(n=n.data("jstree"))?i=n:e(".jstree").each(function(){var n=e(this).data("jstree");return n&&n._model.data[t]?(i=n,!1):void 0}),i},e.fn.jstree=function(i){var n="string"==typeof i,r=Array.prototype.slice.call(arguments,1),s=null;return!(!0===i&&!this.length)&&(this.each(function(){var a=e.jstree.reference(this),o=n&&a?a[i]:null;return s=n&&o?o.apply(a,r):null,a||n||i!==t&&!e.isPlainObject(i)||e.jstree.create(this,i),(a&&!n||!0===i)&&(s=a||!1),(null===s||s===t)&&void 0}),null!==s&&s!==t?s:this)},e.expr.pseudos.jstree=e.expr.createPseudo(function(i){return function(i){return e(i).hasClass("jstree")&&e(i).data("jstree")!==t}}),e.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:e.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(t){t.type="click",e(t.currentTarget).trigger(t)},enter:function(t){t.type="click",e(t.currentTarget).trigger(t)},left:function(t){if(t.preventDefault(),this.is_open(t.currentTarget))this.close_node(t.currentTarget);else{var i=this.get_parent(t.currentTarget);i&&i.id!==e.jstree.root&&this.get_node(i,!0).children(".jstree-anchor").focus()}},up:function(e){e.preventDefault();var t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},right:function(t){if(t.preventDefault(),this.is_closed(t.currentTarget))this.open_node(t.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").focus()});else if(this.is_open(t.currentTarget)){var i=this.get_node(t.currentTarget,!0).children(".jstree-children")[0];i&&e(this._firstChild(i)).children(".jstree-anchor").focus()}},down:function(e){e.preventDefault();var t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},"*":function(e){this.open_all()},home:function(t){t.preventDefault();var i=this._firstChild(this.get_container_ul()[0]);i&&e(i).children(".jstree-anchor").filter(":visible").focus()},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},e.jstree.core.prototype={plugin:function(t,i){var n=e.jstree.plugins[t];return n?(this._data[t]={},n.prototype=this,new n(i,this)):this},init:function(t,i){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=e(t).addClass("jstree jstree-"+this._id),this.settings=i,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(e.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,i=d.createElement("LI");return i.setAttribute("role","treeitem"),e=d.createElement("I"),e.className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),i.appendChild(e),e=d.createElement("A"),e.className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),t=d.createElement("I"),t.className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),i.appendChild(e),e=t=null,i},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},i=[];e.ctrlKey&&i.push("ctrl"),e.altKey&&i.push("alt"),e.shiftKey&&i.push("shift"),i.push(t[e.which]||e.which),i=i.sort().join("-").toLowerCase();var n,r,s=this.settings.core.keyboard;for(n in s)if(s.hasOwnProperty(n)&&(r=n,"-"!==r&&"+"!==r&&(r=r.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),r=r.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),r===i))return s[n];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var t="",i=null,n=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(d.selection&&d.selection.empty)d.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on("mousedown.jstree",e.proxy(function(e){e.target===this.element[0]&&(e.preventDefault(),n=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",e.proxy(function(e){this.toggle_node(e.target)},this)).on("dblclick.jstree",".jstree-anchor",e.proxy(function(e){return!(!e.target.tagName||"input"!==e.target.tagName.toLowerCase())||void(this.settings.core.dblclick_toggle&&this.toggle_node(e.target))},this)).on("click.jstree",".jstree-anchor",e.proxy(function(t){t.preventDefault(),t.currentTarget!==d.activeElement&&e(t.currentTarget).focus(),this.activate_node(t.currentTarget,t)},this)).on("keydown.jstree",".jstree-anchor",e.proxy(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var i=t.call(this,e);if(!1===i||!0===i)return i}},this)).on("load_node.jstree",e.proxy(function(t,i){i.status&&(i.node.id!==e.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(e.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var t,i,n=[];for(t=0,i=this._data.core.selected.length;i>t;t++)n=n.concat(this._model.data[this._data.core.selected[t]].parents);for(n=e.vakata.array_unique(n),t=0,i=n.length;i>t;t++)this.open_node(n[t],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",e.proxy(function(n){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!0;i&&clearTimeout(i),i=setTimeout(function(){t=""},500);var r=String.fromCharCode(n.which).toLowerCase(),s=this.element.find(".jstree-anchor").filter(":visible"),a=s.index(d.activeElement)||0,o=!1;if(t+=r,t.length>1){if(s.slice(a).each(e.proxy(function(i,n){return 0===e(n).text().toLowerCase().indexOf(t)?(e(n).focus(),o=!0,!1):void 0},this)),o)return;if(s.slice(0,a).each(e.proxy(function(i,n){return 0===e(n).text().toLowerCase().indexOf(t)?(e(n).focus(),o=!0,!1):void 0},this)),o)return}if(new RegExp("^"+r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(t)){if(s.slice(a+1).each(e.proxy(function(t,i){return e(i).text().toLowerCase().charAt(0)===r?(e(i).focus(),o=!0,!1):void 0},this)),o)return;if(s.slice(0,a+1).each(e.proxy(function(t,i){return e(i).text().toLowerCase().charAt(0)===r?(e(i).focus(),o=!0,!1):void 0},this)),o)return}},this)).on("init.jstree",e.proxy(function(){var e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)},this)).on("loading.jstree",e.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",e.proxy(function(t){this._data.core.focused=null,e(t.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",e.proxy(function(t){var i=this.get_node(t.currentTarget);i&&i.id&&(this._data.core.focused=i.id),this.element.find(".jstree-hovered").not(t.currentTarget).mouseleave(),e(t.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",e.proxy(function(){if(+new Date-n>500&&!this._data.core.focused&&this.settings.core.restore_focus){n=0;var e=this.get_node(this.element.attr("aria-activedescendant"),!0);e&&e.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",e.proxy(function(e){this.hover_node(e.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),e(d).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),t.instance=this,this.element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(t){var i=this.settings.core.strings;return e.isFunction(i)?i.call(this,t):i&&i[t]?i[t]:t},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return e},get_node:function(t,i){t&&t.id&&(t=t.id);var n;try{if(this._model.data[t])t=this._model.data[t];else if("string"==typeof t&&this._model.data[t.replace(/^#/,"")])t=this._model.data[t.replace(/^#/,"")];else if("string"==typeof t&&(n=e("#"+t.replace(e.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])t=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=e(t,this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])t=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=e(t,this.element)).length||!n.hasClass("jstree"))return!1;t=this._model.data[e.jstree.root]}return i&&(t=t.id===e.jstree.root?this.element:e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)),t}catch(e){return!1}},get_path:function(t,i,n){if(!(t=t.parents?t:this.get_node(t))||t.id===e.jstree.root||!t.parents)return!1;var r,s,a=[];for(a.push(n?t.id:t.text),r=0,s=t.parents.length;s>r;r++)a.push(n?t.parents[r]:this.get_text(t.parents[r]));return a=a.reverse().slice(1),i?a.join(i):a},get_next_dom:function(t,i){var n;if(t=this.get_node(t,!0),t[0]===this.element[0]){for(n=this._firstChild(this.get_container_ul()[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);return!!n&&e(n)}if(!t||!t.length)return!1;if(i){n=t[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return!!n&&e(n)}if(t.hasClass("jstree-open")){for(n=this._firstChild(t.children(".jstree-children")[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);if(null!==n)return e(n)}n=t[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return null!==n?e(n):t.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(t,i){var n;if(t=this.get_node(t,!0),t[0]===this.element[0]){for(n=this.get_container_ul()[0].lastChild;n&&0===n.offsetHeight;)n=this._previousSibling(n);return!!n&&e(n)}if(!t||!t.length)return!1;if(i){n=t[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);return!!n&&e(n)}n=t[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);if(null!==n){for(t=e(n);t.hasClass("jstree-open");)t=t.children(".jstree-children").first().children(".jstree-node:visible:last");return t}return!(!(n=t[0].parentNode.parentNode)||!n.className||-1===n.className.indexOf("jstree-node"))&&e(n)},get_parent:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.parent},get_children_dom:function(e){return e=this.get_node(e,!0),e[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||e.children.length>0)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(t,i){var n,r,s,a,o;if(e.isArray(t))return this._load_nodes(t.slice(),i),!0;if(!(t=this.get_node(t)))return i&&i.call(this,t,!1),!1;if(t.state.loaded){for(t.state.loaded=!1,s=0,a=t.parents.length;a>s;s++)this._model.data[t.parents[s]].children_d=e.vakata.array_filter(this._model.data[t.parents[s]].children_d,function(i){return-1===e.inArray(i,t.children_d)});for(n=0,r=t.children_d.length;r>n;n++)this._model.data[t.children_d[n]].state.selected&&(o=!0),delete this._model.data[t.children_d[n]];o&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,function(i){return-1===e.inArray(i,t.children_d)})),t.children=[],t.children_d=[],o&&this.trigger("changed",{action:"load_node",node:t,selected:this._data.core.selected})}return t.state.failed=!1,t.state.loading=!0,this.get_node(t,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(t,e.proxy(function(e){t=this._model.data[t.id],t.state.loading=!1,t.state.loaded=e,t.state.failed=!t.state.loaded;var n=this.get_node(t,!0),r=0,s=0,a=this._model.data,o=!1;for(r=0,s=t.children.length;s>r;r++)if(a[t.children[r]]&&!a[t.children[r]].state.hidden){o=!0;break}t.state.loaded&&n&&n.length&&(n.removeClass("jstree-closed jstree-open jstree-leaf"),o?"#"!==t.id&&n.addClass(t.state.opened?"jstree-open":"jstree-closed"):n.addClass("jstree-leaf")),n.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:t,status:e}),i&&i.call(this,t,e)},this)),!0},_load_nodes:function(e,t,i,n){var r,s,a=!0,o=function(){this._load_nodes(e,t,!0)},d=this._model.data,l=[];for(r=0,s=e.length;s>r;r++)d[e[r]]&&(!d[e[r]].state.loaded&&!d[e[r]].state.failed||!i&&n)&&(this.is_loading(e[r])||this.load_node(e[r],o),a=!1);if(a){for(r=0,s=e.length;s>r;r++)d[e[r]]&&d[e[r]].state.loaded&&l.push(e[r]);t&&!t.done&&(t.call(this,l),t.done=!0)}},load_all:function(t,i){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var n,r,s=[],a=this._model.data,o=a[t.id].children_d;for(t.state&&!t.state.loaded&&s.push(t.id),n=0,r=o.length;r>n;n++)a[o[n]]&&a[o[n]].state&&!a[o[n]].state.loaded&&s.push(o[n]);s.length?this._load_nodes(s,function(){this.load_all(t,i)}):(i&&i.call(this,t),this.trigger("load_all",{node:t}))},_load_node:function(t,i){var n,r=this.settings.core.data,s=function(){return 3!==this.nodeType&&8!==this.nodeType};return r?e.isFunction(r)?r.call(this,t,e.proxy(function(n){!1===n?i.call(this,!1):this["string"==typeof n?"_append_html_data":"_append_json_data"](t,"string"==typeof n?e(e.parseHTML(n)).filter(s):n,function(e){i.call(this,e)})},this)):"object"==typeof r?r.url?(r=e.extend(!0,{},r),e.isFunction(r.url)&&(r.url=r.url.call(this,t)),e.isFunction(r.data)&&(r.data=r.data.call(this,t)),e.ajax(r).done(e.proxy(function(n,r,a){var o=a.getResponseHeader("Content-Type");return o&&-1!==o.indexOf("json")||"object"==typeof n?this._append_json_data(t,n,function(e){i.call(this,e)}):o&&-1!==o.indexOf("html")||"string"==typeof n?this._append_html_data(t,e(e.parseHTML(n)).filter(s),function(e){i.call(this,e)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:t.id,xhr:a})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))},this)).fail(e.proxy(function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:t.id,xhr:e})},i.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(n=e.isArray(r)?e.extend(!0,[],r):e.isPlainObject(r)?e.extend(!0,{},r):r,t.id===e.jstree.root?this._append_json_data(t,n,function(e){i.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))):"string"==typeof r?t.id===e.jstree.root?this._append_html_data(t,e(e.parseHTML(r)).filter(s),function(e){i.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1)):i.call(this,!1):t.id===e.jstree.root?this._append_html_data(t,this._data.core.original_container_html.clone(!0),function(e){i.call(this,e)}):i.call(this,!1)},_node_changed:function(t){(t=this.get_node(t))&&-1===e.inArray(t.id,this._model.changed)&&this._model.changed.push(t.id)},_append_html_data:function(t,i,n){t=this.get_node(t),t.children=[],t.children_d=[];var r,s,a,o=i.is("ul")?i.children():i,d=t.id,l=[],c=[],u=this._model.data,h=u[d],p=this._data.core.selected.length;for(o.each(e.proxy(function(t,i){(r=this._parse_model_from_html(e(i),d,h.parents.concat()))&&(l.push(r),c.push(r),u[r].children_d.length&&(c=c.concat(u[r].children_d)))},this)),h.children=l,h.children_d=c,s=0,a=h.parents.length;a>s;s++)u[h.parents[s]].children_d=u[h.parents[s]].children_d.concat(c);this.trigger("model",{nodes:c,parent:d}),d!==e.jstree.root?(this._node_changed(d),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)},_append_json_data:function(t,i,n,r){if(null!==this.element){t=this.get_node(t),t.children=[],t.children_d=[],i.d&&"string"==typeof(i=i.d)&&(i=JSON.parse(i)),e.isArray(i)||(i=[i]);var s=null,a={df:this._model.default_state,dat:i,par:t.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},o=function(e,t){e.data&&(e=e.data);var i,n,r,s,a=e.dat,o=e.par,d=[],l=[],c=[],u=e.df,h=e.t_id,p=e.t_cnt,m=e.m,_=m[o],f=e.sel,g=function(e,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,s,a,o,d=e.id.toString(),l={id:d,text:e.text||"",icon:e.icon===t||e.icon,parent:i,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in u)u.hasOwnProperty(r)&&(l.state[r]=u[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),(l.icon===t||null===l.icon||""===l.icon)&&(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(l.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(l.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=e.li_attr[r]);if(l.li_attr.id||(l.li_attr.id=d),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),m[l.id]=l,r=0,s=l.children.length;s>r;r++)a=g(m[l.children[r]],l.id,n),o=m[a],l.children_d.push(a),o.children_d.length&&(l.children_d=l.children_d.concat(o.children_d));return delete e.data,delete e.children,m[l.id].original=e,l.state.selected&&c.push(l.id),l.id},v=function(e,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,s,a,o,d,l=!1;do{l="j"+h+"_"+ ++p}while(m[l]);d={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===t||e.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in u)u.hasOwnProperty(r)&&(d.state[r]=u[r]);if(e&&e.id&&(d.id=e.id.toString()),e&&e.text&&(d.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(d.icon=e.data.jstree.icon),(d.icon===t||null===d.icon||""===d.icon)&&(d.icon=!0),e&&e.data&&(d.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(d.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(d.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(d.li_attr[r]=e.li_attr[r]);if(d.li_attr.id&&!d.id&&(d.id=d.li_attr.id.toString()),d.id||(d.id=l),d.li_attr.id||(d.li_attr.id=d.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(d.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,s=e.children.length;s>r;r++)a=v(e.children[r],d.id,n),o=m[a],d.children.push(a),o.children_d.length&&(d.children_d=d.children_d.concat(o.children_d));d.children_d=d.children_d.concat(d.children)}return e&&e.children&&!0===e.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),delete e.data,delete e.children,d.original=e,m[d.id]=d,d.state.selected&&c.push(d.id),d.id};if(a.length&&a[0].id!==t&&a[0].parent!==t){for(n=0,r=a.length;r>n;n++)a[n].children||(a[n].children=[]),a[n].state||(a[n].state={}),m[a[n].id.toString()]=a[n];for(n=0,r=a.length;r>n;n++)m[a[n].parent.toString()]?(m[a[n].parent.toString()].children.push(a[n].id.toString()),_.children_d.push(a[n].id.toString())):(this._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:a[n].id.toString(),parent:a[n].parent.toString()})},this.settings.core.error.call(this,this._data.core.last_error));for(n=0,r=_.children.length;r>n;n++)i=g(m[_.children[n]],o,_.parents.concat()),l.push(i),m[i].children_d.length&&(l=l.concat(m[i].children_d));for(n=0,r=_.parents.length;r>n;n++)m[_.parents[n]].children_d=m[_.parents[n]].children_d.concat(l);s={cnt:p,mod:m,sel:f,par:o,dpc:l,add:c}}else{for(n=0,r=a.length;r>n;n++)(i=v(a[n],o,_.parents.concat()))&&(d.push(i),l.push(i),m[i].children_d.length&&(l=l.concat(m[i].children_d)));for(_.children=d,_.children_d=l,n=0,r=_.parents.length;r>n;n++)m[_.parents[n]].children_d=m[_.parents[n]].children_d.concat(l);s={cnt:p,mod:m,sel:f,par:o,dpc:l,add:c}}return"undefined"!=typeof window&&void 0!==window.document?s:void postMessage(s)},d=function(t,i){if(null!==this.element){this._cnt=t.cnt;var r,s=this._model.data;for(r in s)s.hasOwnProperty(r)&&s[r].state&&s[r].state.loading&&t.mod[r]&&(t.mod[r].state.loading=!0);if(this._model.data=t.mod,i){var a,o=t.add,d=t.sel,l=this._data.core.selected.slice();if(s=this._model.data,d.length!==l.length||e.vakata.array_unique(d.concat(l)).length!==d.length){for(r=0,a=d.length;a>r;r++)-1===e.inArray(d[r],o)&&-1===e.inArray(d[r],l)&&(s[d[r]].state.selected=!1);for(r=0,a=l.length;a>r;r++)-1===e.inArray(l[r],d)&&(s[l[r]].state.selected=!0)}}t.add.length&&(this._data.core.selected=this._data.core.selected.concat(t.add)),this.trigger("model",{nodes:t.dpc,parent:t.par}),t.par!==e.jstree.root?(this._node_changed(t.par),this.redraw()):this.redraw(!0),
t.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+o.toString()],{type:"text/javascript"}))),!this._data.core.working||r?(this._data.core.working=!0,s=new window.Worker(this._wrk),s.onmessage=e.proxy(function(e){d.call(this,e.data,!0);try{s.terminate(),s=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),a.par?s.postMessage(a):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([t,i,n,!0])}catch(e){d.call(this,o(a),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else d.call(this,o(a),!1)}},_parse_model_from_html:function(i,n,r){r=r?[].concat(r):[],n&&r.unshift(n);var s,a,o,d,l,c=this._model.data,u={id:!1,text:!1,icon:!0,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(o in this._model.default_state)this._model.default_state.hasOwnProperty(o)&&(u.state[o]=this._model.default_state[o]);if(d=e.vakata.attributes(i,!0),e.each(d,function(t,i){return i=e.trim(i),!i.length||(u.li_attr[t]=i,void("id"===t&&(u.id=i.toString())))}),d=i.children("a").first(),d.length&&(d=e.vakata.attributes(d,!0),e.each(d,function(t,i){i=e.trim(i),i.length&&(u.a_attr[t]=i)})),d=i.children("a").first().length?i.children("a").first().clone():i.clone(),d.children("ins, i, ul").remove(),d=d.html(),d=e("<div />").html(d),u.text=this.settings.core.force_text?d.text():d.html(),d=i.data(),u.data=d?e.extend(!0,{},d):null,u.state.opened=i.hasClass("jstree-open"),u.state.selected=i.children("a").hasClass("jstree-clicked"),u.state.disabled=i.children("a").hasClass("jstree-disabled"),u.data&&u.data.jstree)for(o in u.data.jstree)u.data.jstree.hasOwnProperty(o)&&(u.state[o]=u.data.jstree[o]);d=i.children("a").children(".jstree-themeicon"),d.length&&(u.icon=!d.hasClass("jstree-themeicon-hidden")&&d.attr("rel")),u.state.icon!==t&&(u.icon=u.state.icon),(u.icon===t||null===u.icon||""===u.icon)&&(u.icon=!0),d=i.children("ul").children("li");do{l="j"+this._id+"_"+ ++this._cnt}while(c[l]);return u.id=u.li_attr.id?u.li_attr.id.toString():l,d.length?(d.each(e.proxy(function(t,i){s=this._parse_model_from_html(e(i),u.id,r),a=this._model.data[s],u.children.push(s),a.children_d.length&&(u.children_d=u.children_d.concat(a.children_d))},this)),u.children_d=u.children_d.concat(u.children)):i.hasClass("jstree-closed")&&(u.state.loaded=!1),u.li_attr.class&&(u.li_attr.class=u.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),u.a_attr.class&&(u.a_attr.class=u.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),c[u.id]=u,u.state.selected&&this._data.core.selected.push(u.id),u.id},_parse_model_from_flat_json:function(e,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,s,a,o,d=e.id.toString(),l=this._model.data,c=this._model.default_state,u={id:d,text:e.text||"",icon:e.icon===t||e.icon,parent:i,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in c)c.hasOwnProperty(r)&&(u.state[r]=c[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(u.icon=e.data.jstree.icon),(u.icon===t||null===u.icon||""===u.icon)&&(u.icon=!0),e&&e.data&&(u.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(u.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(u.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(u.li_attr[r]=e.li_attr[r]);if(u.li_attr.id||(u.li_attr.id=d),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(u.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),l[u.id]=u,r=0,s=u.children.length;s>r;r++)a=this._parse_model_from_flat_json(l[u.children[r]],u.id,n),o=l[a],u.children_d.push(a),o.children_d.length&&(u.children_d=u.children_d.concat(o.children_d));return delete e.data,delete e.children,l[u.id].original=e,u.state.selected&&this._data.core.selected.push(u.id),u.id},_parse_model_from_json:function(e,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,s,a,o,d,l=!1,c=this._model.data,u=this._model.default_state;do{l="j"+this._id+"_"+ ++this._cnt}while(c[l]);d={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===t||e.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in u)u.hasOwnProperty(r)&&(d.state[r]=u[r]);if(e&&e.id&&(d.id=e.id.toString()),e&&e.text&&(d.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(d.icon=e.data.jstree.icon),(d.icon===t||null===d.icon||""===d.icon)&&(d.icon=!0),e&&e.data&&(d.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(d.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(d.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(d.li_attr[r]=e.li_attr[r]);if(d.li_attr.id&&!d.id&&(d.id=d.li_attr.id.toString()),d.id||(d.id=l),d.li_attr.id||(d.li_attr.id=d.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(d.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,s=e.children.length;s>r;r++)a=this._parse_model_from_json(e.children[r],d.id,n),o=c[a],d.children.push(a),o.children_d.length&&(d.children_d=d.children_d.concat(o.children_d));d.children_d=d.children_d.concat(d.children)}return e&&e.children&&!0===e.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),delete e.data,delete e.children,d.original=e,c[d.id]=d,d.state.selected&&this._data.core.selected.push(d.id),d.id},_redraw:function(){var t,i,n,r=this._model.force_full_redraw?this._model.data[e.jstree.root].children.concat([]):this._model.changed.concat([]),s=d.createElement("UL"),a=this._data.core.focused;for(i=0,n=r.length;n>i;i++)(t=this.redraw_node(r[i],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&s.appendChild(t);this._model.force_full_redraw&&(s.className=this.get_container_ul()[0].className,s.setAttribute("role","group"),this.element.empty().append(s)),null!==a&&(t=this.get_node(a,!0),t&&t.length&&t.children(".jstree-anchor")[0]!==d.activeElement?t.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:r})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(t){var i=this.get_node(t),n=!1,r=!1,s=!1,a=d;if(!i)return!1;if(i.id===e.jstree.root)return this.redraw(!0);if(!(t=this.get_node(t,!0))||!t.length)return!1;if(t.children(".jstree-children").remove(),t=t[0],i.children.length&&i.state.loaded){for(s=a.createElement("UL"),s.setAttribute("role","group"),s.className="jstree-children",n=0,r=i.children.length;r>n;n++)s.appendChild(this.redraw_node(i.children[n],!0,!0));t.appendChild(s)}},redraw_node:function(t,i,n,r){var s=this.get_node(t),a=!1,o=!1,l=!1,c=!1,u=!1,h=!1,p="",m=d,_=this._model.data,f=!1,g=null,v=0,y=0,w=!1,b=!1;if(!s)return!1;if(s.id===e.jstree.root)return this.redraw(!0);if(i=i||0===s.children.length,t=d.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(s.id[0])?"\\3"+s.id[0]+" "+s.id.substr(1).replace(e.jstree.idregex,"\\$&"):s.id.replace(e.jstree.idregex,"\\$&"))):d.getElementById(s.id))t=e(t),n||(a=t.parent().parent()[0],a===this.element[0]&&(a=null),o=t.index()),i||!s.children.length||t.children(".jstree-children").length||(i=!0),i||(l=t.children(".jstree-children")[0]),f=t.children(".jstree-anchor")[0]===d.activeElement,t.remove();else if(i=!0,!n){if(!(null===(a=s.parent!==e.jstree.root?e("#"+s.parent.replace(e.jstree.idregex,"\\$&"),this.element)[0]:null)||a&&_[s.parent].state.opened))return!1;o=e.inArray(s.id,null===a?_[e.jstree.root].children:_[s.parent].children)}t=this._data.core.node.cloneNode(!0),p="jstree-node ";for(c in s.li_attr)if(s.li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"!==c?t.setAttribute(c,s.li_attr[c]):p+=s.li_attr[c]}for(s.a_attr.id||(s.a_attr.id=s.id+"_anchor"),t.setAttribute("aria-selected",!!s.state.selected),t.setAttribute("aria-level",s.parents.length),t.setAttribute("aria-labelledby",s.a_attr.id),s.state.disabled&&t.setAttribute("aria-disabled",!0),c=0,u=s.children.length;u>c;c++)if(!_[s.children[c]].state.hidden){w=!0;break}if(null!==s.parent&&_[s.parent]&&!s.state.hidden&&(c=e.inArray(s.id,_[s.parent].children),b=s.id,-1!==c))for(c++,u=_[s.parent].children.length;u>c&&(_[_[s.parent].children[c]].state.hidden||(b=_[s.parent].children[c]),b===s.id);c++);s.state.hidden&&(p+=" jstree-hidden"),s.state.loading&&(p+=" jstree-loading"),s.state.loaded&&!w?p+=" jstree-leaf":(p+=s.state.opened&&s.state.loaded?" jstree-open":" jstree-closed",t.setAttribute("aria-expanded",s.state.opened&&s.state.loaded)),b===s.id&&(p+=" jstree-last"),t.id=s.id,t.className=p,p=(s.state.selected?" jstree-clicked":"")+(s.state.disabled?" jstree-disabled":"");for(u in s.a_attr)if(s.a_attr.hasOwnProperty(u)){if("href"===u&&"#"===s.a_attr[u])continue;"class"!==u?t.childNodes[1].setAttribute(u,s.a_attr[u]):p+=" "+s.a_attr[u]}if(p.length&&(t.childNodes[1].className="jstree-anchor "+p),(s.icon&&!0!==s.icon||!1===s.icon)&&(!1===s.icon?t.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===s.icon.indexOf("/")&&-1===s.icon.indexOf(".")?t.childNodes[1].childNodes[0].className+=" "+s.icon+" jstree-themeicon-custom":(t.childNodes[1].childNodes[0].style.backgroundImage='url("'+s.icon+'")',t.childNodes[1].childNodes[0].style.backgroundPosition="center center",t.childNodes[1].childNodes[0].style.backgroundSize="auto",t.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?t.childNodes[1].appendChild(m.createTextNode(s.text)):t.childNodes[1].innerHTML+=s.text,i&&s.children.length&&(s.state.opened||r)&&s.state.loaded){for(h=m.createElement("UL"),h.setAttribute("role","group"),h.className="jstree-children",c=0,u=s.children.length;u>c;c++)h.appendChild(this.redraw_node(s.children[c],i,!0));t.appendChild(h)}if(l&&t.appendChild(l),!n){for(a||(a=this.element[0]),c=0,u=a.childNodes.length;u>c;c++)if(a.childNodes[c]&&a.childNodes[c].className&&-1!==a.childNodes[c].className.indexOf("jstree-children")){g=a.childNodes[c];break}g||(g=m.createElement("UL"),g.setAttribute("role","group"),g.className="jstree-children",a.appendChild(g)),a=g,o<a.childNodes.length?a.insertBefore(t,a.childNodes[o]):a.appendChild(t),f&&(v=this.element[0].scrollTop,y=this.element[0].scrollLeft,t.childNodes[1].focus(),this.element[0].scrollTop=v,this.element[0].scrollLeft=y)}return s.state.opened&&!s.state.loaded&&(s.state.opened=!1,setTimeout(e.proxy(function(){this.open_node(s.id,!1,0)},this),0)),t},open_node:function(i,n,r){var s,a,o,d;if(e.isArray(i)){for(i=i.slice(),s=0,a=i.length;a>s;s++)this.open_node(i[s],n,r);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(r=r===t?this.settings.core.animation:r,this.is_closed(i)?this.is_loaded(i)?(o=this.get_node(i,!0),d=this,o.length&&(r&&o.children(".jstree-children").length&&o.children(".jstree-children").stop(!0,!0),i.children.length&&!this._firstChild(o.children(".jstree-children")[0])&&this.draw_children(i),r?(this.trigger("before_open",{node:i}),o.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",d.element&&d.trigger("after_open",{node:i})})):(this.trigger("before_open",{node:i}),o[0].className=o[0].className.replace("jstree-closed","jstree-open"),o[0].setAttribute("aria-expanded",!0))),i.state.opened=!0,n&&n.call(this,i,!0),o.length||this.trigger("before_open",{node:i}),this.trigger("open_node",{node:i}),r&&o.length||this.trigger("after_open",{node:i}),!0):this.is_loading(i)?setTimeout(e.proxy(function(){this.open_node(i,n,r)},this),500):void this.load_node(i,function(e,t){return t?this.open_node(e,n,r):!!n&&n.call(this,e,!1)}):(n&&n.call(this,i,!1),!1))},_open_to:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var i,n,r=t.parents;for(i=0,n=r.length;n>i;i+=1)i!==e.jstree.root&&this.open_node(r[i],!1,0);return e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)},close_node:function(i,n){var r,s,a,o;if(e.isArray(i)){for(i=i.slice(),r=0,s=i.length;s>r;r++)this.close_node(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(!this.is_closed(i)&&(n=n===t?this.settings.core.animation:n,a=this,o=this.get_node(i,!0),i.state.opened=!1,this.trigger("close_node",{node:i}),void(o.length?n?o.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(n,function(){this.style.display="",o.children(".jstree-children").remove(),a.element&&a.trigger("after_close",{node:i})}):(o[0].className=o[0].className.replace("jstree-open","jstree-closed"),o.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:i})):this.trigger("after_close",{node:i}))))},toggle_node:function(t){var i,n;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.toggle_node(t[i]);return!0}return this.is_closed(t)?this.open_node(t):this.is_open(t)?this.close_node(t):void 0},open_all:function(t,i,n){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var r,s,a,o=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0);if(!o.length){for(r=0,s=t.children_d.length;s>r;r++)this.is_closed(this._model.data[t.children_d[r]])&&(this._model.data[t.children_d[r]].state.opened=!0);return this.trigger("open_all",{node:t})}n=n||o,a=this,o=this.is_closed(t)?o.find(".jstree-closed").addBack():o.find(".jstree-closed"),o.each(function(){a.open_node(this,function(e,t){t&&this.is_parent(e)&&this.open_all(e,i,n)},i||0)}),0===n.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(n)})},close_all:function(t,i){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var n,r,s=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0),a=this;for(s.length&&(s=this.is_open(t)?s.find(".jstree-open").addBack():s.find(".jstree-open"),e(s.get().reverse()).each(function(){a.close_node(this,i||0)})),n=0,r=t.children_d.length;r>n;n++)this._model.data[t.children_d[n]].state.opened=!1;this.trigger("close_all",{node:t})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(t){var i,n;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.enable_node(t[i]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.state.disabled=!1,this.get_node(t,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:t}))},disable_node:function(t){var i,n;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.disable_node(t[i]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.state.disabled=!0,this.get_node(t,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:t}))},is_hidden:function(e){return e=this.get_node(e),!0===e.state.hidden},hide_node:function(t,i){var n,r;if(e.isArray(t)){for(t=t.slice(),n=0,r=t.length;r>n;n++)this.hide_node(t[n],!0);return i||this.redraw(),!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&void(t.state.hidden||(t.state.hidden=!0,this._node_changed(t.parent),i||this.redraw(),this.trigger("hide_node",{node:t})))},show_node:function(t,i){var n,r;if(e.isArray(t)){for(t=t.slice(),n=0,r=t.length;r>n;n++)this.show_node(t[n],!0);return i||this.redraw(),!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&void(t.state.hidden&&(t.state.hidden=!1,this._node_changed(t.parent),i||this.redraw(),this.trigger("show_node",{node:t})))},hide_all:function(t){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==e.jstree.root&&!n[i].state.hidden&&(n[i].state.hidden=!0,r.push(i));return this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(t){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==e.jstree.root&&n[i].state.hidden&&(n[i].state.hidden=!1,r.push(i));return this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(e,i){if(this.is_disabled(e))return!1;if(i&&"object"==typeof i||(i={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==t?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&(!i.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(i.shiftKey){var n,r,s=this.get_node(e).id,a=this._data.core.last_clicked.id,o=this.get_node(this._data.core.last_clicked.parent).children,d=!1;for(n=0,r=o.length;r>n;n+=1)o[n]===s&&(d=!d),o[n]===a&&(d=!d),this.is_disabled(o[n])||!d&&o[n]!==s&&o[n]!==a?this.deselect_node(o[n],!0,i):this.is_hidden(o[n])||this.select_node(o[n],!0,!1,i);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:i})}else this.is_selected(e)?this.deselect_node(e,!1,i):this.select_node(e,!1,!1,i);else!this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,i):(this.deselect_all(!0),this.select_node(e,!1,!1,i),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:i})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var t=this.element.find(".jstree-hovered"),i=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout(function(){i.attr("aria-activedescendant",e[0].id)},0)},dehover_node:function(e){return!!((e=this.get_node(e,!0))&&e.length&&e.children(".jstree-hovered").length)&&(e.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(e)}))},select_node:function(t,i,n,r){var s,a,o;if(e.isArray(t)){for(t=t.slice(),a=0,o=t.length;o>a;a++)this.select_node(t[a],i,n,r);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(s=this.get_node(t,!0),void(t.state.selected||(t.state.selected=!0,this._data.core.selected.push(t.id),n||(s=this._open_to(t)),s&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:t,selected:this._data.core.selected,event:r}),i||this.trigger("changed",{action:"select_node",node:t,selected:this._data.core.selected,event:r}))))},deselect_node:function(t,i,n){var r,s,a;if(e.isArray(t)){for(t=t.slice(),r=0,s=t.length;s>r;r++)this.deselect_node(t[r],i,n);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(a=this.get_node(t,!0),void(t.state.selected&&(t.state.selected=!1,this._data.core.selected=e.vakata.array_remove_item(this._data.core.selected,t.id),a.length&&a.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:t,selected:this._data.core.selected,event:n}),i||this.trigger("changed",{action:"deselect_node",node:t,selected:this._data.core.selected,event:n}))))},select_all:function(t){var i,n,r=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[e.jstree.root].children_d.concat(),i=0,n=this._data.core.selected.length;n>i;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),t||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:r})},deselect_all:function(e){var t,i,n=this._data.core.selected.concat([]);for(t=0,i=this._data.core.selected.length;i>t;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:n}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:n})},is_selected:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.selected},get_selected:function(t){return t?e.map(this._data.core.selected,e.proxy(function(e){return this.get_node(e)},this)):this._data.core.selected.slice()},get_top_selected:function(t){var i,n,r,s,a=this.get_selected(!0),o={};for(i=0,n=a.length;n>i;i++)o[a[i].id]=a[i];for(i=0,n=a.length;n>i;i++)for(r=0,s=a[i].children_d.length;s>r;r++)o[a[i].children_d[r]]&&delete o[a[i].children_d[r]];a=[];for(i in o)o.hasOwnProperty(i)&&a.push(i);return t?e.map(a,e.proxy(function(e){return this.get_node(e)},this)):a},get_bottom_selected:function(t){var i,n,r=this.get_selected(!0),s=[];for(i=0,n=r.length;n>i;i++)r[i].children.length||s.push(r[i].id);return t?e.map(s,e.proxy(function(e){return this.get_node(e)},this)):s},get_state:function(){var t,i={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(t in this._model.data)this._model.data.hasOwnProperty(t)&&t!==e.jstree.root&&(this._model.data[t].state.loaded&&this.settings.core.loaded_state&&i.core.loaded.push(t),this._model.data[t].state.opened&&i.core.open.push(t),this._model.data[t].state.selected&&i.core.selected.push(t));return i},set_state:function(i,n){if(i){if(i.core&&i.core.selected&&i.core.initial_selection===t&&(i.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),i.core){var r,s;if(i.core.loaded)return this.settings.core.loaded_state&&e.isArray(i.core.loaded)&&i.core.loaded.length?this._load_nodes(i.core.loaded,function(e){delete i.core.loaded,this.set_state(i,n)}):(delete i.core.loaded,this.set_state(i,n)),!1;if(i.core.open)return e.isArray(i.core.open)&&i.core.open.length?this._load_nodes(i.core.open,function(e){this.open_node(e,!1,0),delete i.core.open,this.set_state(i,n)}):(delete i.core.open,this.set_state(i,n)),!1;if(i.core.scroll)return i.core.scroll&&i.core.scroll.left!==t&&this.element.scrollLeft(i.core.scroll.left),i.core.scroll&&i.core.scroll.top!==t&&this.element.scrollTop(i.core.scroll.top),delete i.core.scroll,this.set_state(i,n),!1;if(i.core.selected)return r=this,(i.core.initial_selection===t||i.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),e.each(i.core.selected,function(e,t){r.select_node(t,!1,!0)})),delete i.core.initial_selection,delete i.core.selected,this.set_state(i,n),!1;for(s in i)i.hasOwnProperty(s)&&"core"!==s&&-1===e.inArray(s,this.settings.plugins)&&delete i[s];if(e.isEmptyObject(i.core))return delete i.core,this.set_state(i,n),!1}return!e.isEmptyObject(i)||(i=null,n&&n.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(t,i){this._data.core.state=!0===i?{}:this.get_state(),i&&e.isFunction(i)&&(this._data.core.state=i.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var n=this.get_container_ul()[0].className;t||(this.element.html("<ul class='"+n+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(e.jstree.root,function(t,i){i&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(e.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var i=[],n=[],r=this._data.core.selected.concat([]);n.push(t.id),!0===t.state.opened&&i.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){n.push(this.id),i.push(this.id)}),this._load_nodes(n,e.proxy(function(e){this.open_node(i,!1,0),this.select_node(r),this.trigger("refresh_node",{node:t,nodes:e})},this),!1,!0)},set_id:function(t,i){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var n,r,s=this._model.data,a=t.id;for(i=i.toString(),s[t.parent].children[e.inArray(t.id,s[t.parent].children)]=i,n=0,r=t.parents.length;r>n;n++)s[t.parents[n]].children_d[e.inArray(t.id,s[t.parents[n]].children_d)]=i;for(n=0,r=t.children.length;r>n;n++)s[t.children[n]].parent=i;for(n=0,r=t.children_d.length;r>n;n++)s[t.children_d[n]].parents[e.inArray(t.id,s[t.children_d[n]].parents)]=i;return n=e.inArray(t.id,this._data.core.selected),-1!==n&&(this._data.core.selected[n]=i),n=this.get_node(t.id,!0),n&&(n.attr("id",i),this.element.attr("aria-activedescendant")===t.id&&this.element.attr("aria-activedescendant",i)),delete s[t.id],t.id=i,t.li_attr.id=i,s[i]=t,this.trigger("set_id",{node:t,new:t.id,old:a}),!0},get_text:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.text},set_text:function(t,i){var n,r;if(e.isArray(t)){for(t=t.slice(),n=0,r=t.length;r>n;n++)this.set_text(t[n],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.text=i,this.get_node(t,!0).length&&this.redraw_node(t.id),this.trigger("set_text",{obj:t,text:i}),!0)},get_json:function(t,i,n){if(!(t=this.get_node(t||e.jstree.root)))return!1;i&&i.flat&&!n&&(n=[]);var r,s,a={id:t.id,text:t.text,icon:this.get_icon(t),li_attr:e.extend(!0,{},t.li_attr),a_attr:e.extend(!0,{},t.a_attr),state:{},data:(!i||!i.no_data)&&e.extend(!0,e.isArray(t.data)?[]:{},t.data)};if(i&&i.flat?a.parent=t.parent:a.children=[],i&&i.no_state)delete a.state;else for(r in t.state)t.state.hasOwnProperty(r)&&(a.state[r]=t.state[r]);if(i&&i.no_li_attr&&delete a.li_attr,i&&i.no_a_attr&&delete a.a_attr,i&&i.no_id&&(delete a.id,a.li_attr&&a.li_attr.id&&delete a.li_attr.id,a.a_attr&&a.a_attr.id&&delete a.a_attr.id),i&&i.flat&&t.id!==e.jstree.root&&n.push(a),!i||!i.no_children)for(r=0,s=t.children.length;s>r;r++)i&&i.flat?this.get_json(t.children[r],i,n):a.children.push(this.get_json(t.children[r],i));return i&&i.flat?n:t.id===e.jstree.root?a.children:a},create_node:function(i,n,r,s,a){if(null===i&&(i=e.jstree.root),!(i=this.get_node(i)))return!1;if(r=r===t?"last":r,!r.toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(i))return this.load_node(i,function(){this.create_node(i,n,r,s,!0)});n||(n={text:this.get_string("New node")}),n="string"==typeof n?{text:n}:e.extend(!0,{},n),n.text===t&&(n.text=this.get_string("New node"));var o,d,l,c;switch(i.id===e.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":o=this.get_node(i.parent),r=e.inArray(i.id,o.children),i=o;break;case"after":o=this.get_node(i.parent),r=e.inArray(i.id,o.children)+1,i=o;break;case"inside":case"first":r=0;break;case"last":r=i.children.length;break;default:r||(r=0)}if(r>i.children.length&&(r=i.children.length),n.id||(n.id=!0),!this.check("create_node",n,i,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===n.id&&delete n.id,!(n=this._parse_model_from_json(n,i.id,i.parents.concat())))return!1;for(o=this.get_node(n),d=[],d.push(n),d=d.concat(o.children_d),this.trigger("model",{nodes:d,parent:i.id}),i.children_d=i.children_d.concat(d),l=0,c=i.parents.length;c>l;l++)this._model.data[i.parents[l]].children_d=this._model.data[i.parents[l]].children_d.concat(d);for(n=o,o=[],l=0,c=i.children.length;c>l;l++)o[l>=r?l+1:l]=i.children[l];return o[r]=n.id,i.children=o,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(n),parent:i.id,position:r}),s&&s.call(this,this.get_node(n)),n.id},rename_node:function(t,i){var n,r,s;if(e.isArray(t)){for(t=t.slice(),n=0,r=t.length;r>n;n++)this.rename_node(t[n],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(s=t.text,this.check("rename_node",t,this.get_parent(t),i)?(this.set_text(t,i),this.trigger("rename_node",{node:t,text:i,old:s}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(t){var i,n,r,s,a,o,d,l,c,u,h,p;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.delete_node(t[i]);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;if(r=this.get_node(t.parent),s=e.inArray(t.id,r.children),u=!1,!this.check("delete_node",t,r,s))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==s&&(r.children=e.vakata.array_remove(r.children,s)),a=t.children_d.concat([]),a.push(t.id),o=0,d=t.parents.length;d>o;o++)this._model.data[t.parents[o]].children_d=e.vakata.array_filter(this._model.data[t.parents[o]].children_d,function(t){return-1===e.inArray(t,a)});for(l=0,c=a.length;c>l;l++)if(this._model.data[a[l]].state.selected){u=!0;break}for(u&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,function(t){return-1===e.inArray(t,a)})),this.trigger("delete_node",{node:t,parent:r.id}),u&&this.trigger("changed",{action:"delete_node",node:t,selected:this._data.core.selected,parent:r.id}),l=0,c=a.length;c>l;l++)delete this._model.data[a[l]];return-1!==e.inArray(this._data.core.focused,a)&&(this._data.core.focused=null,h=this.element[0].scrollTop,p=this.element[0].scrollLeft,r.id===e.jstree.root?this._model.data[e.jstree.root].children[0]&&this.get_node(this._model.data[e.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(r,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=h,this.element[0].scrollLeft=p),this.redraw_node(r,!0),!0},check:function(t,i,n,r,s){i=i&&i.id?i:this.get_node(i),n=n&&n.id?n:this.get_node(n);var a=t.match(/^move_node|copy_node|create_node$/i)?n:i,o=this.settings.core.check_callback;return"move_node"!==t&&"copy_node"!==t||s&&s.is_multi||i.id!==n.id&&("move_node"!==t||e.inArray(i.id,n.children)!==r)&&-1===e.inArray(n.id,i.children_d)?(a&&a.data&&(a=a.data),a&&a.functions&&(!1===a.functions[t]||!0===a.functions[t])?(!1===a.functions[t]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+t,data:JSON.stringify({chk:t,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})}),a.functions[t]):!(!1===o||e.isFunction(o)&&!1===o.call(this,t,i,n,r,s)||o&&!1===o[t])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+t,data:JSON.stringify({chk:t,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:t,pos:r,
obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(i,n,r,s,a,o,d){var l,c,u,h,p,m,_,f,g,v,y,w,b,M;if(n=this.get_node(n),r=r===t?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(n))return this.load_node(n,function(){this.move_node(i,n,r,s,!0,!1,d)});if(e.isArray(i)){if(1!==i.length){for(l=0,c=i.length;c>l;l++)(g=this.move_node(i[l],n,r,s,a,!1,d))&&(n=g,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===e.jstree.root)return!1;if(u=(i.parent||e.jstree.root).toString(),p=r.toString().match(/^(before|after)$/)&&n.id!==e.jstree.root?this.get_node(n.parent):n,m=d||(this._model.data[i.id]?this:e.jstree.reference(i.id)),_=!m||!m._id||this._id!==m._id,h=m&&m._id&&u&&m._model.data[u]&&m._model.data[u].children?e.inArray(i.id,m._model.data[u].children):-1,m&&m._id&&(i=m._model.data[i.id]),_)return!!(g=this.copy_node(i,n,r,s,a,!1,d))&&(m&&m.delete_node(i),g);switch(n.id===e.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=e.inArray(n.id,p.children);break;case"after":r=e.inArray(n.id,p.children)+1;break;case"inside":case"first":r=0;break;case"last":r=p.children.length;break;default:r||(r=0)}if(r>p.children.length&&(r=p.children.length),!this.check("move_node",i,p,r,{core:!0,origin:d,is_multi:m&&m._id&&m._id!==this._id,is_foreign:!m||!m._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===p.id){for(f=p.children.concat(),g=e.inArray(i.id,f),-1!==g&&(f=e.vakata.array_remove(f,g),r>g&&r--),g=[],v=0,y=f.length;y>v;v++)g[v>=r?v+1:v]=f[v];g[r]=i.id,p.children=g,this._node_changed(p.id),this.redraw(p.id===e.jstree.root)}else{for(g=i.children_d.concat(),g.push(i.id),v=0,y=i.parents.length;y>v;v++){for(f=[],M=m._model.data[i.parents[v]].children_d,w=0,b=M.length;b>w;w++)-1===e.inArray(M[w],g)&&f.push(M[w]);m._model.data[i.parents[v]].children_d=f}for(m._model.data[u].children=e.vakata.array_remove_item(m._model.data[u].children,i.id),v=0,y=p.parents.length;y>v;v++)this._model.data[p.parents[v]].children_d=this._model.data[p.parents[v]].children_d.concat(g);for(f=[],v=0,y=p.children.length;y>v;v++)f[v>=r?v+1:v]=p.children[v];for(f[r]=i.id,p.children=f,p.children_d.push(i.id),p.children_d=p.children_d.concat(i.children_d),i.parent=p.id,g=p.parents.concat(),g.unshift(p.id),M=i.parents.length,i.parents=g,g=g.concat(),v=0,y=i.children_d.length;y>v;v++)this._model.data[i.children_d[v]].parents=this._model.data[i.children_d[v]].parents.slice(0,-1*M),Array.prototype.push.apply(this._model.data[i.children_d[v]].parents,g);(u===e.jstree.root||p.id===e.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(u),this._node_changed(p.id)),o||this.redraw()}return s&&s.call(this,i,p,r),this.trigger("move_node",{node:i,parent:p.id,position:r,old_parent:u,old_position:h,is_multi:m&&m._id&&m._id!==this._id,is_foreign:!m||!m._id,old_instance:m,new_instance:this}),i.id},copy_node:function(i,n,r,s,a,o,d){var l,c,u,h,p,m,_,f,g,v;if(n=this.get_node(n),r=r===t?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(n))return this.load_node(n,function(){this.copy_node(i,n,r,s,!0,!1,d)});if(e.isArray(i)){if(1!==i.length){for(l=0,c=i.length;c>l;l++)(h=this.copy_node(i[l],n,r,s,a,!0,d))&&(n=h,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===e.jstree.root)return!1;switch(f=(i.parent||e.jstree.root).toString(),g=r.toString().match(/^(before|after)$/)&&n.id!==e.jstree.root?this.get_node(n.parent):n,v=d||(this._model.data[i.id]?this:e.jstree.reference(i.id)),!v||!v._id||this._id!==v._id,v&&v._id&&(i=v._model.data[i.id]),n.id===e.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=e.inArray(n.id,g.children);break;case"after":r=e.inArray(n.id,g.children)+1;break;case"inside":case"first":r=0;break;case"last":r=g.children.length;break;default:r||(r=0)}if(r>g.children.length&&(r=g.children.length),!this.check("copy_node",i,g,r,{core:!0,origin:d,is_multi:v&&v._id&&v._id!==this._id,is_foreign:!v||!v._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(_=v?v.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i))return!1;if(!0===_.id&&delete _.id,!(_=this._parse_model_from_json(_,g.id,g.parents.concat())))return!1;for(h=this.get_node(_),i&&i.state&&!1===i.state.loaded&&(h.state.loaded=!1),u=[],u.push(_),u=u.concat(h.children_d),this.trigger("model",{nodes:u,parent:g.id}),p=0,m=g.parents.length;m>p;p++)this._model.data[g.parents[p]].children_d=this._model.data[g.parents[p]].children_d.concat(u);for(u=[],p=0,m=g.children.length;m>p;p++)u[p>=r?p+1:p]=g.children[p];return u[r]=h.id,g.children=u,g.children_d.push(h.id),g.children_d=g.children_d.concat(h.children_d),g.id===e.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(g.id),o||this.redraw(g.id===e.jstree.root),s&&s.call(this,h,g,r),this.trigger("copy_node",{node:h,original:i,parent:g.id,position:r,old_parent:f,old_position:v&&v._id&&f&&v._model.data[f]&&v._model.data[f].children?e.inArray(i.id,v._model.data[f].children):-1,is_multi:v&&v._id&&v._id!==this._id,is_foreign:!v||!v._id,old_instance:v,new_instance:this}),h.id},cut:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var i,a,o,d=[];for(a=0,o=t.length;o>a;a++)(i=this.get_node(t[a]))&&i.id&&i.id!==e.jstree.root&&d.push(i);return!!d.length&&(n=d,s=this,r="move_node",void this.trigger("cut",{node:t}))},copy:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var i,a,o,d=[];for(a=0,o=t.length;o>a;a++)(i=this.get_node(t[a]))&&i.id&&i.id!==e.jstree.root&&d.push(i);return!!d.length&&(n=d,s=this,r="copy_node",void this.trigger("copy",{node:t}))},get_buffer:function(){return{mode:r,node:n,inst:s}},can_paste:function(){return!1!==r&&!1!==n},paste:function(e,t){return!!((e=this.get_node(e))&&r&&r.match(/^(copy_node|move_node)$/)&&n)&&(this[r](n,e,t,!1,!1,!1,s)&&this.trigger("paste",{parent:e.id,node:n,mode:r}),n=!1,r=!1,void(s=!1))},clear_buffer:function(){n=!1,r=!1,s=!1,this.trigger("clear_buffer")},edit:function(t,i,n){var r,s,a,o,l,c,u,h,p,m=!1;return!!(t=this.get_node(t))&&(this.check("edit",t,this.get_parent(t))?(p=t,i="string"==typeof i?i:t.text,this.set_text(t,""),t=this._open_to(t),p.text=i,r=this._data.core.rtl,s=this.element.width(),this._data.core.focused=p.id,a=t.children(".jstree-anchor").focus(),o=e("<span>"),l=i,c=e("<div />",{css:{position:"absolute",top:"-200px",left:r?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),u=e("<input />",{value:l,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:e.proxy(function(i){i.stopImmediatePropagation(),i.preventDefault();var r,s=o.children(".jstree-rename-input"),d=s.val(),h=this.settings.core.force_text;""===d&&(d=l),c.remove(),o.replaceWith(a),o.remove(),l=h?l:e("<div></div>").append(e.parseHTML(l)).html(),this.set_text(t,l),r=!!this.rename_node(t,h?e("<div></div>").text(d).text():e("<div></div>").append(e.parseHTML(d)).html()),r||this.set_text(t,l),this._data.core.focused=p.id,setTimeout(e.proxy(function(){var e=this.get_node(p.id,!0);e.length&&(this._data.core.focused=p.id,e.children(".jstree-anchor").focus())},this),0),n&&n.call(this,p,r,m),u=null},this),keydown:function(e){var t=e.which;27===t&&(m=!0,this.value=l),(27===t||13===t||37===t||38===t||39===t||40===t||32===t)&&e.stopImmediatePropagation(),(27===t||13===t)&&(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){u.width(Math.min(c.text("pW"+this.value).width(),s))},keypress:function(e){return 13!==e.which&&void 0}}),h={fontFamily:a.css("fontFamily")||"",fontSize:a.css("fontSize")||"",fontWeight:a.css("fontWeight")||"",fontStyle:a.css("fontStyle")||"",fontStretch:a.css("fontStretch")||"",fontVariant:a.css("fontVariant")||"",letterSpacing:a.css("letterSpacing")||"",wordSpacing:a.css("wordSpacing")||""},o.attr("class",a.attr("class")).append(a.contents().clone()).append(u),a.replaceWith(o),c.css(h),u.css(h).width(Math.min(c.text("pW"+u[0].value).width(),s))[0].select(),void e(d).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(t){u&&t.target!==u&&e(u).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(t,i){if(!t)return!1;if(!0===i){var n=this.settings.core.themes.dir;n||(n=e.jstree.path+"/themes"),i=n+"/"+t+"/style.css"}i&&-1===e.inArray(i,a)&&(e("head").append('<link rel="stylesheet" href="'+i+'" type="text/css" />'),a.push(i)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=t,this.element.addClass("jstree-"+t),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+t+"-responsive"),this.trigger("set_theme",{theme:t})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=e,e&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,n){var r,s,a,o;if(e.isArray(i)){for(i=i.slice(),r=0,s=i.length;s>r;r++)this.set_icon(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===e.jstree.root)&&(o=i.icon,i.icon=!0===n||null===n||n===t||""===n||n,a=this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===n?(a.removeClass("jstree-themeicon-custom "+o).css("background","").removeAttr("rel"),this.hide_icon(i)):!0===n||null===n||n===t||""===n?(a.removeClass("jstree-themeicon-custom "+o).css("background","").removeAttr("rel"),!1===o&&this.show_icon(i)):-1===n.indexOf("/")&&-1===n.indexOf(".")?(a.removeClass(o).css("background",""),a.addClass(n+" jstree-themeicon-custom").attr("rel",n),!1===o&&this.show_icon(i)):(a.removeClass(o).css("background",""),a.addClass("jstree-themeicon-custom").css("background","url('"+n+"') center center no-repeat").attr("rel",n),!1===o&&this.show_icon(i)),!0)},get_icon:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.icon},hide_icon:function(t){var i,n;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.hide_icon(t[i]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root)&&(t.icon=!1,this.get_node(t,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(t){var i,n,r;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.show_icon(t[i]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root)&&(r=this.get_node(t,!0),t.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),t.icon||(t.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},e.vakata={},e.vakata.attributes=function(t,i){t=e(t)[0];var n=i?{}:[];return t&&t.attributes&&e.each(t.attributes,function(t,r){-1===e.inArray(r.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==r.value&&""!==e.trim(r.value)&&(i?n[r.name]=r.value:n.push(r.name))}),n},e.vakata.array_unique=function(e){var i,n,r=[],s={};for(i=0,n=e.length;n>i;i++)s[e[i]]===t&&(r.push(e[i]),s[e[i]]=!0);return r},e.vakata.array_remove=function(e,t){return e.splice(t,1),e},e.vakata.array_remove_item=function(t,i){var n=e.inArray(i,t);return-1!==n?e.vakata.array_remove(t,n):t},e.vakata.array_filter=function(e,t,i,n,r){if(e.filter)return e.filter(t,i);n=[];for(r in e)~~r+""==r+""&&r>=0&&t.call(i,e[r],+r,e)&&n.push(e[r]);return n},e.jstree.plugins.changed=function(e,t){var i=[];this.trigger=function(e,n){var r,s;if(n||(n={}),"changed"===e.replace(".jstree","")){n.changed={selected:[],deselected:[]};var a={};for(r=0,s=i.length;s>r;r++)a[i[r]]=1;for(r=0,s=n.selected.length;s>r;r++)a[n.selected[r]]?a[n.selected[r]]=2:n.changed.selected.push(n.selected[r]);for(r=0,s=i.length;s>r;r++)1===a[i[r]]&&n.changed.deselected.push(i[r]);i=n.selected.slice()}t.trigger.call(this,e,n)},this.refresh=function(e,n){return i=[],t.refresh.apply(this,arguments)}};var l=d.createElement("I");l.className="jstree-icon jstree-checkbox",l.setAttribute("role","presentation"),e.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},e.jstree.plugins.checkbox=function(i,n){this.bind=function(){n.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",e.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",e.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",e.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",e.proxy(function(e,t){var i,n,r=this._model.data,s=(r[t.parent],t.nodes);for(i=0,n=s.length;n>i;i++)r[s[i]].state.checked=r[s[i]].state.checked||r[s[i]].original&&r[s[i]].original.state&&r[s[i]].original.state.checked,r[s[i]].state.checked&&this._data.checkbox.selected.push(s[i])},this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",e.proxy(function(t,i){var n,r,s,a,o,d,l=this._model.data,c=l[i.parent],u=i.nodes,h=[],p=this.settings.checkbox.cascade,m=this.settings.checkbox.tie_selection;if(-1!==p.indexOf("down"))if(c.state[m?"selected":"checked"]){for(r=0,s=u.length;s>r;r++)l[u[r]].state[m?"selected":"checked"]=!0;this._data[m?"core":"checkbox"].selected=this._data[m?"core":"checkbox"].selected.concat(u)}else for(r=0,s=u.length;s>r;r++)if(l[u[r]].state[m?"selected":"checked"]){for(a=0,o=l[u[r]].children_d.length;o>a;a++)l[l[u[r]].children_d[a]].state[m?"selected":"checked"]=!0;this._data[m?"core":"checkbox"].selected=this._data[m?"core":"checkbox"].selected.concat(l[u[r]].children_d)}if(-1!==p.indexOf("up")){for(r=0,s=c.children_d.length;s>r;r++)l[c.children_d[r]].children.length||h.push(l[c.children_d[r]].parent);for(h=e.vakata.array_unique(h),a=0,o=h.length;o>a;a++)for(c=l[h[a]];c&&c.id!==e.jstree.root;){for(n=0,r=0,s=c.children.length;s>r;r++)n+=l[c.children[r]].state[m?"selected":"checked"];if(n!==s)break;c.state[m?"selected":"checked"]=!0,this._data[m?"core":"checkbox"].selected.push(c.id),d=this.get_node(c,!0),d&&d.length&&d.attr("aria-selected",!0).children(".jstree-anchor").addClass(m?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}}this._data[m?"core":"checkbox"].selected=e.vakata.array_unique(this._data[m?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",e.proxy(function(t,i){var n,r,s,a,o=i.node,d=this._model.data,l=this.get_node(o.parent),c=this.settings.checkbox.cascade,u=this.settings.checkbox.tie_selection,h={},p=this._data[u?"core":"checkbox"].selected;for(n=0,r=p.length;r>n;n++)h[p[n]]=!0;if(-1!==c.indexOf("down")){var m=this._cascade_new_checked_state(o.id,!0),_=o.children_d.concat(o.id);for(n=0,r=_.length;r>n;n++)m.indexOf(_[n])>-1?h[_[n]]=!0:delete h[_[n]]}if(-1!==c.indexOf("up"))for(;l&&l.id!==e.jstree.root;){for(s=0,n=0,r=l.children.length;r>n;n++)s+=d[l.children[n]].state[u?"selected":"checked"];if(s!==r)break;l.state[u?"selected":"checked"]=!0,h[l.id]=!0,a=this.get_node(l,!0),a&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),l=this.get_node(l.parent)}p=[];for(n in h)h.hasOwnProperty(n)&&p.push(n);this._data[u?"core":"checkbox"].selected=p},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",e.proxy(function(t,i){var n,r,s,a=this.get_node(e.jstree.root),o=this._model.data;for(n=0,r=a.children_d.length;r>n;n++)(s=o[a.children_d[n]])&&s.original&&s.original.state&&s.original.state.undetermined&&(s.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",e.proxy(function(e,t){var i,n,r,s=t.node,a=(this.get_node(s,!0),this.settings.checkbox.cascade),o=this.settings.checkbox.tie_selection,d=this._data[o?"core":"checkbox"].selected,l=s.children_d.concat(s.id);if(-1!==a.indexOf("down")){var c=this._cascade_new_checked_state(s.id,!1);d=d.filter(function(e){return-1===l.indexOf(e)||c.indexOf(e)>-1})}if(-1!==a.indexOf("up")&&-1===d.indexOf(s.id)){for(i=0,n=s.parents.length;n>i;i++)r=this._model.data[s.parents[i]],r.state[o?"selected":"checked"]=!1,r&&r.original&&r.original.state&&r.original.state.undetermined&&(r.original.state.undetermined=!1),(r=this.get_node(s.parents[i],!0))&&r.length&&r.attr("aria-selected",!1).children(".jstree-anchor").removeClass(o?"jstree-clicked":"jstree-checked");d=d.filter(function(e){return-1===s.parents.indexOf(e)})}this._data[o?"core":"checkbox"].selected=d},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",e.proxy(function(t,i){for(var n,r,s,a,o=this.get_node(i.parent),d=this._model.data,l=this.settings.checkbox.tie_selection;o&&o.id!==e.jstree.root&&!o.state[l?"selected":"checked"];){for(s=0,n=0,r=o.children.length;r>n;n++)s+=d[o.children[n]].state[l?"selected":"checked"];if(!(r>0&&s===r))break;o.state[l?"selected":"checked"]=!0,this._data[l?"core":"checkbox"].selected.push(o.id),a=this.get_node(o,!0),a&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(l?"jstree-clicked":"jstree-checked"),o=this.get_node(o.parent)}},this)).on("move_node.jstree",e.proxy(function(t,i){var n,r,s,a,o,d=i.is_multi,l=i.old_parent,c=this.get_node(i.parent),u=this._model.data,h=this.settings.checkbox.tie_selection;if(!d)for(n=this.get_node(l);n&&n.id!==e.jstree.root&&!n.state[h?"selected":"checked"];){for(r=0,s=0,a=n.children.length;a>s;s++)r+=u[n.children[s]].state[h?"selected":"checked"];if(!(a>0&&r===a))break;n.state[h?"selected":"checked"]=!0,this._data[h?"core":"checkbox"].selected.push(n.id),o=this.get_node(n,!0),o&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=c;n&&n.id!==e.jstree.root;){for(r=0,s=0,a=n.children.length;a>s;s++)r+=u[n.children[s]].state[h?"selected":"checked"];if(r===a)n.state[h?"selected":"checked"]||(n.state[h?"selected":"checked"]=!0,this._data[h?"core":"checkbox"].selected.push(n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"));else{if(!n.state[h?"selected":"checked"])break;n.state[h?"selected":"checked"]=!1,this._data[h?"core":"checkbox"].selected=e.vakata.array_remove_item(this._data[h?"core":"checkbox"].selected,n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!1).children(".jstree-anchor").removeClass(h?"jstree-clicked":"jstree-checked")}n=this.get_node(n.parent)}},this))},this.get_undetermined=function(i){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var n,r,s,a,o={},d=this._model.data,l=this.settings.checkbox.tie_selection,c=this._data[l?"core":"checkbox"].selected,u=[],h=this,p=[];for(n=0,r=c.length;r>n;n++)if(d[c[n]]&&d[c[n]].parents)for(s=0,a=d[c[n]].parents.length;a>s&&o[d[c[n]].parents[s]]===t;s++)d[c[n]].parents[s]!==e.jstree.root&&(o[d[c[n]].parents[s]]=!0,u.push(d[c[n]].parents[s]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var i,l=h.get_node(this);if(l)if(l.state.loaded){for(n=0,r=l.children_d.length;r>n;n++)if(i=d[l.children_d[n]],!i.state.loaded&&i.original&&i.original.state&&i.original.state.undetermined&&!0===i.original.state.undetermined)for(o[i.id]===t&&i.id!==e.jstree.root&&(o[i.id]=!0,u.push(i.id)),s=0,a=i.parents.length;a>s;s++)o[i.parents[s]]===t&&i.parents[s]!==e.jstree.root&&(o[i.parents[s]]=!0,u.push(i.parents[s]))}else if(l.original&&l.original.state&&l.original.state.undetermined&&!0===l.original.state.undetermined)for(o[l.id]===t&&l.id!==e.jstree.root&&(o[l.id]=!0,u.push(l.id)),s=0,a=l.parents.length;a>s;s++)o[l.parents[s]]===t&&l.parents[s]!==e.jstree.root&&(o[l.parents[s]]=!0,u.push(l.parents[s]))}),n=0,r=u.length;r>n;n++)d[u[n]].state[l?"selected":"checked"]||p.push(i?d[u[n]]:u[n]);return p},this._undetermined=function(){if(null!==this.element){var e,t,i,n=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=n.length;t>e;e++)(i=this.get_node(n[e],!0))&&i.length&&i.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(t,i,r,s){if(t=n.redraw_node.apply(this,arguments)){var a,o,d=null,c=null;for(a=0,o=t.childNodes.length;o>a;a++)if(t.childNodes[a]&&t.childNodes[a].className&&-1!==t.childNodes[a].className.indexOf("jstree-anchor")){d=t.childNodes[a];break}d&&(!this.settings.checkbox.tie_selection&&this._model.data[t.id].state.checked&&(d.className+=" jstree-checked"),c=l.cloneNode(!1),this._model.data[t.id].state.checkbox_disabled&&(c.className+=" jstree-checkbox-disabled"),d.insertBefore(c,d.childNodes[0]))}return r||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)),t},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(t){t=this.get_node(t);var i,n,r=this.settings.checkbox.cascade,s=this.settings.checkbox.tie_selection,a=this._data[s?"core":"checkbox"].selected,o=this._model.data;if(!t||!0===t.state[s?"selected":"checked"]||-1===r.indexOf("undetermined")||-1===r.indexOf("down")&&-1===r.indexOf("up"))return!1;if(!t.state.loaded&&!0===t.original.state.undetermined)return!0;for(i=0,n=t.children_d.length;n>i;i++)if(-1!==e.inArray(t.children_d[i],a)||!o[t.children_d[i]].state.loaded&&o[t.children_d[i]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(t){var i,n,r;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.disable_checkbox(t[i]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(r=this.get_node(t,!0),void(t.state.checkbox_disabled||(t.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:t}))))},this.enable_checkbox=function(t){var i,n,r;if(e.isArray(t)){for(t=t.slice(),i=0,n=t.length;n>i;i++)this.enable_checkbox(t[i]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(r=this.get_node(t,!0),void(t.state.checkbox_disabled&&(t.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:t}))))},this.activate_node=function(t,i){return!e(i.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||e(i.target).hasClass("jstree-checkbox"))&&(i.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!e(i.target).hasClass("jstree-checkbox")?n.activate_node.call(this,t,i):!this.is_disabled(t)&&(this.is_checked(t)?this.uncheck_node(t,i):this.check_node(t,i),void this.trigger("activate_node",{node:this.get_node(t)})))},this._cascade_new_checked_state=function(e,t){var i,n,r,s=this,a=this.settings.checkbox.tie_selection,o=this._model.data[e],d=[],l=[];if(!this.settings.checkbox.cascade_to_disabled&&o.state.disabled||!this.settings.checkbox.cascade_to_hidden&&o.state.hidden)r=this.get_checked_descendants(e),o.state[a?"selected":"checked"]&&r.push(o.id),d=d.concat(r);else{if(o.children)for(i=0,n=o.children.length;n>i;i++){var c=o.children[i];r=s._cascade_new_checked_state(c,t),d=d.concat(r),r.indexOf(c)>-1&&l.push(c)}var u=s.get_node(o,!0),h=l.length>0&&l.length<o.children.length;o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=h),h?(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked")):t&&l.length===o.children.length?(o.state[a?"selected":"checked"]=t,d.push(o.id),u.attr("aria-selected",!0).children(".jstree-anchor").addClass(a?"jstree-clicked":"jstree-checked")):(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked"))}return d},this.get_checked_descendants=function(e){var t=this,i=t.settings.checkbox.tie_selection;return t._model.data[e].children_d.filter(function(e){return t._model.data[e].state[i?"selected":"checked"]})},this.check_node=function(t,i){if(this.settings.checkbox.tie_selection)return this.select_node(t,!1,!0,i);var n,r,s;if(e.isArray(t)){for(t=t.slice(),r=0,s=t.length;s>r;r++)this.check_node(t[r],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(n=this.get_node(t,!0),void(t.state.checked||(t.state.checked=!0,this._data.checkbox.selected.push(t.id),n&&n.length&&n.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:t,selected:this._data.checkbox.selected,event:i}))))},this.uncheck_node=function(t,i){if(this.settings.checkbox.tie_selection)return this.deselect_node(t,!1,i);var n,r,s;if(e.isArray(t)){for(t=t.slice(),n=0,r=t.length;r>n;n++)this.uncheck_node(t[n],i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(s=this.get_node(t,!0),void(t.state.checked&&(t.state.checked=!1,this._data.checkbox.selected=e.vakata.array_remove_item(this._data.checkbox.selected,t.id),s.length&&s.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:t,selected:this._data.checkbox.selected,event:i}))))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var t,i;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[e.jstree.root].children_d.concat(),t=0,i=this._data.checkbox.selected.length;i>t;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var e,t,i=this._data.checkbox.selected.concat([]);for(e=0,t=this._data.checkbox.selected.length;t>e;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:i})},this.is_checked=function(t){return this.settings.checkbox.tie_selection?this.is_selected(t):!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.checked},this.get_checked=function(t){return this.settings.checkbox.tie_selection?this.get_selected(t):t?e.map(this._data.checkbox.selected,e.proxy(function(e){return this.get_node(e)},this)):this._data.checkbox.selected},this.get_top_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_top_selected(t);var i,n,r,s,a=this.get_checked(!0),o={};for(i=0,n=a.length;n>i;i++)o[a[i].id]=a[i];for(i=0,n=a.length;n>i;i++)for(r=0,s=a[i].children_d.length;s>r;r++)o[a[i].children_d[r]]&&delete o[a[i].children_d[r]];a=[];for(i in o)o.hasOwnProperty(i)&&a.push(i);return t?e.map(a,e.proxy(function(e){return this.get_node(e)},this)):a},this.get_bottom_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(t);var i,n,r=this.get_checked(!0),s=[];for(i=0,n=r.length;n>i;i++)r[i].children.length||s.push(r[i].id);return t?e.map(s,e.proxy(function(e){return this.get_node(e)},this)):s},this.load_node=function(t,i){var r,s,a;if(!e.isArray(t)&&!this.settings.checkbox.tie_selection&&(a=this.get_node(t))&&a.state.loaded)for(r=0,s=a.children_d.length;s>r;r++)this._model.data[a.children_d[r]].state.checked&&(!0,this._data.checkbox.selected=e.vakata.array_remove_item(this._data.checkbox.selected,a.children_d[r]));return n.load_node.apply(this,arguments)},this.get_state=function(){var e=n.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?e:(e.checkbox=this._data.checkbox.selected.slice(),e)},this.set_state=function(t,i){var r=n.set_state.apply(this,arguments);if(r&&t.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var s=this;e.each(t.checkbox,function(e,t){s.check_node(t)})}return delete t.checkbox,this.set_state(t,i),!1}return r},this.refresh=function(e,t){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),n.refresh.apply(this,arguments)}},e.jstree.defaults.conditionalselect=function(){return!0},e.jstree.plugins.conditionalselect=function(e,t){this.activate_node=function(e,i){return this.settings.conditionalselect.call(this,this.get_node(e),i)?t.activate_node.call(this,e,i):void 0}},e.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(t,i){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,
label:"Create",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.create_node(n,{},"last",function(e){try{i.edit(e)}catch(t){setTimeout(function(){i.edit(e)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.edit(n)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.is_selected(n)?i.delete_node(i.get_selected()):i.delete_node(n)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.is_selected(n)?i.cut(i.get_top_selected()):i.cut(n)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.is_selected(n)?i.copy(i.get_top_selected()):i.copy(n)}},paste:{separator_before:!1,icon:!1,_disabled:function(t){return!e.jstree.reference(t.reference).can_paste()},separator_after:!1,label:"Paste",action:function(t){var i=e.jstree.reference(t.reference),n=i.get_node(t.reference);i.paste(n)}}}}}}},e.jstree.plugins.contextmenu=function(i,n){this.bind=function(){n.bind.call(this);var t,i,r=0,s=null;this.element.on("init.jstree loading.jstree ready.jstree",e.proxy(function(){this.get_container_ul().addClass("jstree-contextmenu")},this)).on("contextmenu.jstree",".jstree-anchor",e.proxy(function(e,t){"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),r=e.ctrlKey?+new Date:0,(t||s)&&(r=+new Date+1e4),s&&clearTimeout(s),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY,e))},this)).on("click.jstree",".jstree-anchor",e.proxy(function(t){this._data.contextmenu.visible&&(!r||+new Date-r>250)&&e.vakata.context.hide(),r=0},this)).on("touchstart.jstree",".jstree-anchor",function(n){n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(t=n.originalEvent.changedTouches[0].clientX,i=n.originalEvent.changedTouches[0].clientY,s=setTimeout(function(){e(n.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(n){s&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(Math.abs(t-n.originalEvent.changedTouches[0].clientX)>10||Math.abs(i-n.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(s),e.vakata.context.hide())}).on("touchend.vakata.jstree",function(e){s&&clearTimeout(s)}),e(d).on("context_hide.vakata.jstree",e.proxy(function(t,i){this._data.contextmenu.visible=!1,e(i.reference).removeClass("jstree-context")},this))},this.teardown=function(){this._data.contextmenu.visible&&e.vakata.context.hide(),n.teardown.call(this)},this.show_contextmenu=function(i,n,r,s){if(!(i=this.get_node(i))||i.id===e.jstree.root)return!1;var a=this.settings.contextmenu,o=this.get_node(i,!0),d=o.children(".jstree-anchor"),l=!1,c=!1;(a.show_at_node||n===t||r===t)&&(l=d.offset(),n=l.left,r=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(i)&&this.activate_node(i,s),c=a.items,e.isFunction(c)&&(c=c.call(this,i,e.proxy(function(e){this._show_contextmenu(i,n,r,e)},this))),e.isPlainObject(c)&&this._show_contextmenu(i,n,r,c)},this._show_contextmenu=function(t,i,n,r){var s=this.get_node(t,!0),a=s.children(".jstree-anchor");e(d).one("context_show.vakata.jstree",e.proxy(function(t,i){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";e(i.element).addClass(n),a.addClass("jstree-context")},this)),this._data.contextmenu.visible=!0,e.vakata.context.show(a,{x:i,y:n},r),this.trigger("show_contextmenu",{node:t,x:i,y:n})}},function(e){var t=!1,i={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};e.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(t){e(d).triggerHandler("context_"+t+".vakata",{reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_execute:function(t){return!(!(t=i.items[t])||t._disabled&&(!e.isFunction(t._disabled)||t._disabled({item:t,reference:i.reference,element:i.element}))||!t.action)&&t.action.call(null,{item:t,reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_parse:function(t,n){if(!t)return!1;n||(i.html="",i.items=[]);var r,s="",a=!1;return n&&(s+="<ul>"),e.each(t,function(t,n){return!n||(i.items.push(n),!a&&n.separator_before&&(s+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>"),a=!1,s+="<li class='"+(n._class||"")+(!0===n._disabled||e.isFunction(n._disabled)&&n._disabled({item:n,reference:i.reference,element:i.element})?" vakata-contextmenu-disabled ":"")+"' "+(n.shortcut?" data-shortcut='"+n.shortcut+"' ":"")+">",s+="<a href='#' rel='"+(i.items.length-1)+"' "+(n.title?"title='"+n.title+"'":"")+">",e.vakata.context.settings.icons&&(s+="<i ",n.icon&&(s+=-1!==n.icon.indexOf("/")||-1!==n.icon.indexOf(".")?" style='background:url(\""+n.icon+"\") center center no-repeat' ":" class='"+n.icon+"' "),s+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),s+=(e.isFunction(n.label)?n.label({item:t,reference:i.reference,element:i.element}):n.label)+(n.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+n.shortcut+'">'+(n.shortcut_label||"")+"</span>":"")+"</a>",n.submenu&&(r=e.vakata.context._parse(n.submenu,!0))&&(s+=r),s+="</li>",void(n.separator_after&&(s+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+">&#160;</a></li>",a=!0)))}),s=s.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),n&&(s+="</ul>"),n||(i.html=s,e.vakata.context._trigger("parse")),s.length>10&&s},_show_submenu:function(i){if(i=e(i),i.length&&i.children("ul").length){var n=i.children("ul"),r=i.offset().left,s=r+i.outerWidth(),a=i.offset().top,o=n.width(),d=n.height(),l=e(window).width()+e(window).scrollLeft(),c=e(window).height()+e(window).scrollTop();t?i[s-(o+10+i.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):i[s+o>l&&r>l-s?"addClass":"removeClass"]("vakata-context-right"),a+d+10>c&&n.css("bottom","-1px"),i.hasClass("vakata-context-right")?o>r&&n.css("margin-right",r-o):o>l-s&&n.css("margin-left",l-s-o),n.show()}},show:function(n,r,s){var a,o,d,l,c,u,h,p;switch(i.element&&i.element.length&&i.element.width(""),!0){case!r&&!n:return!1;case!!r&&!!n:i.reference=n,i.position_x=r.x,i.position_y=r.y;break;case!r&&!!n:i.reference=n,a=n.offset(),i.position_x=a.left+n.outerHeight(),i.position_y=a.top;break;case!!r&&!n:i.position_x=r.x,i.position_y=r.y}n&&!s&&e(n).data("vakata_contextmenu")&&(s=e(n).data("vakata_contextmenu")),e.vakata.context._parse(s)&&i.element.html(i.html),i.items.length&&(i.element.appendTo("body"),o=i.element,d=i.position_x,l=i.position_y,c=o.width(),u=o.height(),h=e(window).width()+e(window).scrollLeft(),p=e(window).height()+e(window).scrollTop(),t&&(d-=o.outerWidth()-e(n).outerWidth())<e(window).scrollLeft()+20&&(d=e(window).scrollLeft()+20),d+c+20>h&&(d=h-(c+20)),l+u+20>p&&(l=p-(u+20)),i.element.css({left:d,top:l}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),i.is_visible=!0,e.vakata.context._trigger("show"))},hide:function(){i.is_visible&&(i.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),i.is_visible=!1,e.vakata.context._trigger("hide"))}},e(function(){t="rtl"===e("body").css("direction");var n=!1;i.element=e("<ul class='vakata-context'></ul>"),i.element.on("mouseenter","li",function(t){t.stopImmediatePropagation(),e.contains(this,t.relatedTarget)||(n&&clearTimeout(n),i.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),e(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),e.vakata.context._show_submenu(this))}).on("mouseleave","li",function(t){e.contains(this,t.relatedTarget)||e(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(t){e(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),e.vakata.context.settings.hide_onmouseleave&&(n=setTimeout(function(t){return function(){e.vakata.context.hide()}}(),e.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(t){t.preventDefault(),e(this).blur().parent().hasClass("vakata-context-disabled")||!1===e.vakata.context._execute(e(this).attr("rel"))||e.vakata.context.hide()}).on("keydown","a",function(t){var n=null;switch(t.which){case 13:case 32:t.type="click",t.preventDefault(),e(t.currentTarget).trigger(t);break;case 37:i.is_visible&&(i.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 38:i.is_visible&&(n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),n.length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),n.addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 39:i.is_visible&&(i.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 40:i.is_visible&&(n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),n.length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),n.addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 27:e.vakata.context.hide(),t.preventDefault()}}).on("keydown",function(e){e.preventDefault();var t=i.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();t.parent().not(".vakata-context-disabled")&&t.click()}),e(d).on("mousedown.vakata.jstree",function(t){i.is_visible&&i.element[0]!==t.target&&!e.contains(i.element[0],t.target)&&e.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,n){i.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),t&&i.element.addClass("vakata-context-rtl").css("direction","rtl"),i.element.find("ul").hide().end()})})}(e),e.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1};var c,u;e.jstree.plugins.dnd=function(t,i){this.init=function(e,t){i.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in d.createElement("span")},this.bind=function(){i.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",e.proxy(function(t){if(this.settings.dnd.large_drag_target&&e(t.target).closest(".jstree-node")[0]!==t.currentTarget)return!0;if("touchstart"===t.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var i=this.get_node(t.target),n=this.is_selected(i)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=n>1?n+" "+this.get_string("nodes"):this.get_text(t.currentTarget);if(this.settings.core.force_text&&(r=e.vakata.html.escape(r)),i&&i.id&&i.id!==e.jstree.root&&(1===t.which||"touchstart"===t.type||"dragstart"===t.type)&&(!0===this.settings.dnd.is_draggable||e.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,n>1?this.get_top_selected(!0):[i],t))){if(c={jstree:!0,origin:this,obj:this.get_node(i,!0),nodes:n>1?this.get_top_selected():[i.id]},u=t.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),e.vakata.dnd.start(t,c,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy" style="display:none;">+</ins></div>');e.vakata.dnd._trigger("start",t,{helper:e(),element:u,data:c})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(t){return t.preventDefault(),e.vakata.dnd._trigger("move",t,{helper:e(),element:u,data:c}),!1}).on("drop.jstree",e.proxy(function(t){return t.preventDefault(),e.vakata.dnd._trigger("stop",t,{helper:e(),element:u,data:c}),!1},this))},this.redraw_node=function(e,t,n,r){if((e=i.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{var s,a,o=null;for(s=0,a=e.childNodes.length;a>s;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){o=e.childNodes[s];break}o&&o.setAttribute("draggable",!0)}return e}},e(function(){var i=!1,n=!1,r=!1,s=!1,a=e('<div id="jstree-marker">&#160;</div>').hide();e(d).on("dnd_start.vakata.jstree",function(e,t){i=!1,r=!1,t&&t.data&&t.data.jstree&&a.appendTo("body")}).on("dnd_move.vakata.jstree",function(o,d){var l=d.event.target!==r.target;if(s&&(!d.event||"dragover"!==d.event.type||l)&&clearTimeout(s),d&&d.data&&d.data.jstree&&(!d.event.target.id||"jstree-marker"!==d.event.target.id)){r=d.event;var c,u,h,p,m,_,f,g,v,y,w,b,M,Y,L,k,T=e.jstree.reference(d.event.target),D=!1,S=!1,x=!1;if(T&&T._data&&T._data.dnd)if(a.attr("class","jstree-"+T.get_theme()+(T.settings.core.themes.responsive?" jstree-dnd-responsive":"")),L=d.data.origin&&(d.data.origin.settings.dnd.always_copy||d.data.origin.settings.dnd.copy&&(d.event.metaKey||d.event.ctrlKey)),d.helper.children().attr("class","jstree-"+T.get_theme()+" jstree-"+T.get_theme()+"-"+T.get_theme_variant()+" "+(T.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[L?"show":"hide"](),d.event.target!==T.element[0]&&d.event.target!==T.get_container_ul()[0]||0!==T.get_container_ul().children().length){if((D=T.settings.dnd.large_drop_target?e(d.event.target).closest(".jstree-node").children(".jstree-anchor"):e(d.event.target).closest(".jstree-anchor"))&&D.length&&D.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(S=D.offset(),x=(d.event.pageY!==t?d.event.pageY:d.event.originalEvent.pageY)-S.top,h=D.outerHeight(),_=h/3>x?["b","i","a"]:x>h-h/3?["a","i","b"]:x>h/2?["i","a","b"]:["i","b","a"],e.each(_,function(t,r){switch(r){case"b":c=S.left-6,u=S.top,p=T.get_parent(D),m=D.parent().index();break;case"i":M=T.settings.dnd.inside_pos,Y=T.get_node(D.parent()),c=S.left-2,u=S.top+h/2+1,p=Y.id,m="first"===M?0:"last"===M?Y.children.length:Math.min(M,Y.children.length);break;case"a":c=S.left-6,u=S.top+h,p=T.get_parent(D),m=D.parent().index()+1}for(f=!0,g=0,v=d.data.nodes.length;v>g;g++)if(y=d.data.origin&&(d.data.origin.settings.dnd.always_copy||d.data.origin.settings.dnd.copy&&(d.event.metaKey||d.event.ctrlKey))?"copy_node":"move_node",w=m,"move_node"===y&&"a"===r&&d.data.origin&&d.data.origin===T&&p===T.get_parent(d.data.nodes[g])&&(b=T.get_node(p),w>e.inArray(d.data.nodes[g],b.children)&&(w-=1)),!(f=f&&(T&&T.settings&&T.settings.dnd&&!1===T.settings.dnd.check_while_dragging||T.check(y,d.data.origin&&d.data.origin!==T?d.data.origin.get_node(d.data.nodes[g]):d.data.nodes[g],p,w,{dnd:!0,ref:T.get_node(D.parent()),pos:r,origin:d.data.origin,is_multi:d.data.origin&&d.data.origin!==T,is_foreign:!d.data.origin})))){T&&T.last_error&&(n=T.last_error());break}return"i"===r&&D.parent().is(".jstree-closed")&&T.settings.dnd.open_timeout&&(!d.event||"dragover"!==d.event.type||l)&&(s&&clearTimeout(s),s=setTimeout(function(e,t){return function(){e.open_node(t)}}(T,D),T.settings.dnd.open_timeout)),f?(k=T.get_node(p,!0),k.hasClass(".jstree-dnd-parent")||(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),k.addClass("jstree-dnd-parent")),i={ins:T,par:p,pos:"i"!==r||"last"!==M||0!==m||T.is_loaded(Y)?m:"last"},a.css({left:c+"px",top:u+"px"}).show(),d.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),d.event.originalEvent&&d.event.originalEvent.dataTransfer&&(d.event.originalEvent.dataTransfer.dropEffect=L?"copy":"move"),n={},_=!0,!1):void 0}),!0===_))return}else{for(f=!0,g=0,v=d.data.nodes.length;v>g&&(f=f&&T.check(d.data.origin&&(d.data.origin.settings.dnd.always_copy||d.data.origin.settings.dnd.copy&&(d.event.metaKey||d.event.ctrlKey))?"copy_node":"move_node",d.data.origin&&d.data.origin!==T?d.data.origin.get_node(d.data.nodes[g]):d.data.nodes[g],e.jstree.root,"last",{dnd:!0,ref:T.get_node(e.jstree.root),pos:"i",origin:d.data.origin,is_multi:d.data.origin&&d.data.origin!==T,is_foreign:!d.data.origin}));g++);if(f)return i={ins:T,par:e.jstree.root,pos:"last"},a.hide(),d.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(d.event.originalEvent&&d.event.originalEvent.dataTransfer&&(d.event.originalEvent.dataTransfer.dropEffect=L?"copy":"move"))}e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),i=!1,d.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),d.event.originalEvent&&d.event.originalEvent.dataTransfer&&(d.event.originalEvent.dataTransfer.dropEffect="none"),a.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(a.hide(),i=!1,r=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(t,o){if(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),s&&clearTimeout(s),o&&o.data&&o.data.jstree){a.hide().detach();var d,l,c=[];if(i){for(d=0,l=o.data.nodes.length;l>d;d++)c[d]=o.data.origin?o.data.origin.get_node(o.data.nodes[d]):o.data.nodes[d];i.ins[o.data.origin&&(o.data.origin.settings.dnd.always_copy||o.data.origin.settings.dnd.copy&&(o.event.metaKey||o.event.ctrlKey))?"copy_node":"move_node"](c,i.par,i.pos,!1,!1,!1,o.data.origin)}else d=e(o.event.target).closest(".jstree"),d.length&&n&&n.error&&"check"===n.error&&(d=d.jstree(!0))&&d.settings.core.error.call(this,n);r=!1,i=!1}}).on("keyup.jstree keydown.jstree",function(t,o){(o=e.vakata.dnd._get())&&o.data&&o.data.jstree&&("keyup"===t.type&&27===t.which?(s&&clearTimeout(s),i=!1,n=!1,r=!1,s=!1,a.hide().detach(),e.vakata.dnd._clean()):(o.helper.find(".jstree-copy").first()[o.data.origin&&(o.data.origin.settings.dnd.always_copy||o.data.origin.settings.dnd.copy&&(t.metaKey||t.ctrlKey))?"show":"hide"](),r&&(r.metaKey=t.metaKey,r.ctrlKey=t.ctrlKey,e.vakata.dnd._trigger("move",r))))})}),function(e){e.vakata.html={div:e("<div />"),escape:function(t){return e.vakata.html.div.text(t).html()},strip:function(t){return e.vakata.html.div.empty().append(e.parseHTML(t)).text()}};var i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};e.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(i,n,r){r===t&&(r=e.vakata.dnd._get()),r.event=n,e(d).triggerHandler("dnd_"+i+".vakata",r)},_get:function(){return{data:i.data,element:i.element,helper:i.helper}},_clean:function(){i.helper&&i.helper.remove(),i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},e(d).off("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(d).off("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop)},_scroll:function(t){if(!i.scroll_e||!i.scroll_l&&!i.scroll_t)return i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),!1;if(!i.scroll_i)return i.scroll_i=setInterval(e.vakata.dnd._scroll,100),!1;if(!0===t)return!1;var n=i.scroll_e.scrollTop(),r=i.scroll_e.scrollLeft();i.scroll_e.scrollTop(n+i.scroll_t*e.vakata.dnd.settings.scroll_speed),i.scroll_e.scrollLeft(r+i.scroll_l*e.vakata.dnd.settings.scroll_speed),(n!==i.scroll_e.scrollTop()||r!==i.scroll_e.scrollLeft())&&e.vakata.dnd._trigger("scroll",i.scroll_e)},start:function(t,n,r){"touchstart"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=d.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag&&e.vakata.dnd.stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.touchAction="none",t.currentTarget.style.msTouchAction="none",t.currentTarget.style.MozUserSelect="none")}catch(e){}return i.init_x=t.pageX,i.init_y=t.pageY,i.data=n,i.is_down=!0,i.element=t.currentTarget,i.target=t.target,i.is_touch="touchstart"===t.type,!1!==r&&(i.helper=e("<div id='vakata-dnd'></div>").html(r).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),e(d).on("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(d).on("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop),!1},drag:function(t){if("touchmove"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=d.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_down){if(!i.is_drag){if(!(Math.abs(t.pageX-i.init_x)>(i.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)||Math.abs(t.pageY-i.init_y)>(i.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)))return;i.helper&&(i.helper.appendTo("body"),i.helper_w=i.helper.outerWidth()),i.is_drag=!0,e(i.target).one("click.vakata",!1),e.vakata.dnd._trigger("start",t)}var n=!1,r=!1,s=!1,a=!1,o=!1,l=!1,c=!1,u=!1,h=!1,p=!1;return i.scroll_t=0,i.scroll_l=0,i.scroll_e=!1,e(e(t.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(e(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var n=e(this),r=n.offset();return this.scrollHeight>this.offsetHeight&&(r.top+n.height()-t.pageY<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),t.pageY-r.top<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(r.left+n.width()-t.pageX<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),t.pageX-r.left<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1)),i.scroll_t||i.scroll_l?(i.scroll_e=e(this),!1):void 0}),i.scroll_e||(n=e(d),r=e(window),s=n.height(),a=r.height(),o=n.width(),l=r.width(),c=n.scrollTop(),u=n.scrollLeft(),s>a&&t.pageY-c<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1),s>a&&a-(t.pageY-c)<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),o>l&&t.pageX-u<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1),o>l&&l-(t.pageX-u)<e.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),(i.scroll_t||i.scroll_l)&&(i.scroll_e=n)),i.scroll_e&&e.vakata.dnd._scroll(!0),i.helper&&(h=parseInt(t.pageY+e.vakata.dnd.settings.helper_top,10),p=parseInt(t.pageX+e.vakata.dnd.settings.helper_left,10),s&&h+25>s&&(h=s-50),o&&p+i.helper_w>o&&(p=o-(i.helper_w+2)),i.helper.css({left:p+"px",top:h+"px"})),e.vakata.dnd._trigger("move",t),!1}},stop:function(t){if("touchend"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=d.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag)t.target!==i.target&&e(i.target).off("click.vakata"),e.vakata.dnd._trigger("stop",t);else if("touchend"===t.type&&t.target===i.target){var n=setTimeout(function(){e(t.target).click()},100);e(t.target).one("click",function(){n&&clearTimeout(n)})}return e.vakata.dnd._clean(),!1}}}(e),e.jstree.defaults.massload=null,e.jstree.plugins.massload=function(t,i){this.init=function(e,t){this._data.massload={},i.init.call(this,e,t)},this._load_nodes=function(t,n,r,s){var a,o,d,l=this.settings.massload,c=(JSON.stringify(t),[]),u=this._model.data;if(!r){for(a=0,o=t.length;o>a;a++)(!u[t[a]]||!u[t[a]].state.loaded&&!u[t[a]].state.failed||s)&&(c.push(t[a]),(d=this.get_node(t[a],!0))&&d.length&&d.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},c.length){if(e.isFunction(l))return l.call(this,c,e.proxy(function(e){var a,o;if(e)for(a in e)e.hasOwnProperty(a)&&(this._data.massload[a]=e[a]);for(a=0,o=t.length;o>a;a++)(d=this.get_node(t[a],!0))&&d.length&&d.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,t,n,r,s)},this));if("object"==typeof l&&l&&l.url)return l=e.extend(!0,{},l),e.isFunction(l.url)&&(l.url=l.url.call(this,c)),e.isFunction(l.data)&&(l.data=l.data.call(this,c)),e.ajax(l).done(e.proxy(function(e,a,o){var l,c;if(e)for(l in e)e.hasOwnProperty(l)&&(this._data.massload[l]=e[l]);for(l=0,c=t.length;c>l;l++)(d=this.get_node(t[l],!0))&&d.length&&d.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,t,n,r,s)},this)).fail(e.proxy(function(e){i._load_nodes.call(this,t,n,r,s)},this))}}return i._load_nodes.call(this,t,n,r,s)},this._load_node=function(t,n){var r,s=this._data.massload[t.id],a=null;return s?(a=this["string"==typeof s?"_append_html_data":"_append_json_data"](t,"string"==typeof s?e(e.parseHTML(s)).filter(function(){return 3!==this.nodeType}):s,function(e){n.call(this,e)}),r=this.get_node(t.id,!0),r&&r.length&&r.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[t.id],a):i._load_node.call(this,t,n)}},e.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},e.jstree.plugins.search=function(i,n){this.bind=function(){n.bind.call(this),this._data.search.str="",this._data.search.dom=e(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",e.proxy(function(t,i){if(this._data.search.som&&i.res.length){var n,r,s,a,o=this._model.data,d=[];for(n=0,r=i.res.length;r>n;n++)if(o[i.res[n]]&&!o[i.res[n]].state.hidden&&(d.push(i.res[n]),d=d.concat(o[i.res[n]].parents),this._data.search.smc))for(s=0,a=o[i.res[n]].children_d.length;a>s;s++)o[o[i.res[n]].children_d[s]]&&!o[o[i.res[n]].children_d[s]].state.hidden&&d.push(o[i.res[n]].children_d[s]);d=e.vakata.array_remove_item(e.vakata.array_unique(d),e.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(d,!0),this.redraw(!0)}},this)).on("clear_search.jstree",e.proxy(function(e,t){this._data.search.som&&t.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))},this))},this.search=function(i,n,r,s,a,o){if(!1===i||""===e.trim(i.toString()))return this.clear_search();s=this.get_node(s),s=s&&s.id?s.id:null,i=i.toString();var d,l,c=this.settings.search,u=!!c.ajax&&c.ajax,h=this._model.data,p=null,m=[],_=[];if(this._data.search.res.length&&!a&&this.clear_search(),r===t&&(r=c.show_only_matches),o===t&&(o=c.show_only_matches_children),!n&&!1!==u)return e.isFunction(u)?u.call(this,i,e.proxy(function(t){t&&t.d&&(t=t.d),this._load_nodes(e.isArray(t)?e.vakata.array_unique(t):[],function(){this.search(i,!0,r,s,a,o)})},this),s):(u=e.extend({},u),u.data||(u.data={}),u.data.str=i,s&&(u.data.inside=s),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=e.ajax(u).fail(e.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(u)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(e.proxy(function(t){t&&t.d&&(t=t.d),this._load_nodes(e.isArray(t)?e.vakata.array_unique(t):[],function(){this.search(i,!0,r,s,a,o)})},this)),this._data.search.lastRequest);if(a||(this._data.search.str=i,this._data.search.dom=e(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=r,this._data.search.smc=o),p=new e.vakata.search(i,!0,{caseSensitive:c.case_sensitive,fuzzy:c.fuzzy}),e.each(h[s||e.jstree.root].children_d,function(e,t){var n=h[t];n.text&&!n.state.hidden&&(!c.search_leaves_only||n.state.loaded&&0===n.children.length)&&(c.search_callback&&c.search_callback.call(this,i,n)||!c.search_callback&&p.search(n.text).isMatch)&&(m.push(t),_=_.concat(n.parents))}),m.length){for(_=e.vakata.array_unique(_),d=0,l=_.length;l>d;d++)_[d]!==e.jstree.root&&h[_[d]]&&!0===this.open_node(_[d],null,0)&&this._data.search.opn.push(_[d]);a?(this._data.search.dom=this._data.search.dom.add(e(this.element[0].querySelectorAll("#"+e.map(m,function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=e.vakata.array_unique(this._data.search.res.concat(m))):(this._data.search.dom=e(this.element[0].querySelectorAll("#"+e.map(m,function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=m),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:i,res:this._data.search.res,show_only_matches:r})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=e(this.element[0].querySelectorAll("#"+e.map(this._data.search.res,function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=e()},this.redraw_node=function(t,i,r,s){if((t=n.redraw_node.apply(this,arguments))&&-1!==e.inArray(t.id,this._data.search.res)){var a,o,d=null;for(a=0,o=t.childNodes.length;o>a;a++)if(t.childNodes[a]&&t.childNodes[a].className&&-1!==t.childNodes[a].className.indexOf("jstree-anchor")){d=t.childNodes[a];break}d&&(d.className+=" jstree-search")}return t}},function(e){e.vakata.search=function(t,i,n){n=n||{},n=e.extend({},e.vakata.search.defaults,n),!1!==n.fuzzy&&(n.fuzzy=!0),t=n.caseSensitive?t:t.toLowerCase();var r,s,a,o,d=n.location,l=n.distance,c=n.threshold,u=t.length;return u>32&&(n.fuzzy=!1),n.fuzzy&&(r=1<<u-1,s=function(){var e={},i=0;for(i=0;u>i;i++)e[t.charAt(i)]=0;for(i=0;u>i;i++)e[t.charAt(i)]|=1<<u-i-1;return e}(),a=function(e,t){var i=e/u,n=Math.abs(d-t);return l?i+n/l:n?1:i}),o=function(e){if(e=n.caseSensitive?e:e.toLowerCase(),t===e||-1!==e.indexOf(t))return{isMatch:!0,score:0};if(!n.fuzzy)return{isMatch:!1,
score:1};var i,o,l,h,p,m,_,f,g,v=e.length,y=c,w=e.indexOf(t,d),b=u+v,M=1,Y=[];for(-1!==w&&(y=Math.min(a(0,w),y),-1!==(w=e.lastIndexOf(t,d+u))&&(y=Math.min(a(0,w),y))),w=-1,i=0;u>i;i++){for(l=0,h=b;h>l;)a(i,d+h)<=y?l=h:b=h,h=Math.floor((b-l)/2+l);for(b=h,m=Math.max(1,d-h+1),_=Math.min(d+h,v)+u,f=new Array(_+2),f[_+1]=(1<<i)-1,o=_;o>=m;o--)if(g=s[e.charAt(o-1)],f[o]=0===i?(f[o+1]<<1|1)&g:(f[o+1]<<1|1)&g|(p[o+1]|p[o])<<1|1|p[o+1],f[o]&r&&(M=a(i,o-1),y>=M)){if(y=M,w=o-1,Y.push(w),!(w>d))break;m=Math.max(1,2*d-w)}if(a(i+1,d)>y)break;p=f}return{isMatch:w>=0,score:M}},!0===i?{search:o}:o(i)},e.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(e),e.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},e.jstree.plugins.sort=function(t,i){this.bind=function(){i.bind.call(this),this.element.on("model.jstree",e.proxy(function(e,t){this.sort(t.parent,!0)},this)).on("rename_node.jstree create_node.jstree",e.proxy(function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",e.proxy(function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)},this))},this.sort=function(t,i){var n,r;if((t=this.get_node(t))&&t.children&&t.children.length&&(t.children.sort(e.proxy(this.settings.sort,this)),i))for(n=0,r=t.children_d.length;r>n;n++)this.sort(t.children_d[n],!1)}};var h=!1;e.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},e.jstree.plugins.state=function(t,i){this.bind=function(){i.bind.call(this);var t=e.proxy(function(){this.element.on(this.settings.state.events,e.proxy(function(){h&&clearTimeout(h),h=setTimeout(e.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",e.proxy(function(e,i){this.element.one("restore_state.jstree",t),this.restore_state()||t()},this))},this.save_state=function(){var t=this.get_state();this.settings.state.preserve_loaded||delete t.core.loaded;var i={state:t,ttl:this.settings.state.ttl,sec:+new Date};e.vakata.storage.set(this.settings.state.key,JSON.stringify(i))},this.restore_state=function(){var t=e.vakata.storage.get(this.settings.state.key);if(t)try{t=JSON.parse(t)}catch(e){return!1}return!(t&&t.ttl&&t.sec&&+new Date-t.sec>t.ttl)&&(t&&t.state&&(t=t.state),t&&e.isFunction(this.settings.state.filter)&&(t=this.settings.state.filter.call(this,t)),!!t&&(this.settings.state.preserve_loaded||delete t.core.loaded,this.element.one("set_state.jstree",function(i,n){n.instance.trigger("restore_state",{state:e.extend(!0,{},t)})}),this.set_state(t),!0))},this.clear_state=function(){return e.vakata.storage.del(this.settings.state.key)}},function(e,t){e.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}}}(e),e.jstree.defaults.types={default:{}},e.jstree.defaults.types[e.jstree.root]={},e.jstree.plugins.types=function(i,n){this.init=function(i,r){var s,a;if(r&&r.types&&r.types.default)for(s in r.types)if("default"!==s&&s!==e.jstree.root&&r.types.hasOwnProperty(s))for(a in r.types.default)r.types.default.hasOwnProperty(a)&&r.types[s][a]===t&&(r.types[s][a]=r.types.default[a]);n.init.call(this,i,r),this._model.data[e.jstree.root].type=e.jstree.root},this.refresh=function(t,i){n.refresh.call(this,t,i),this._model.data[e.jstree.root].type=e.jstree.root},this.bind=function(){this.element.on("model.jstree",e.proxy(function(i,n){var r,s,a,o=this._model.data,d=n.nodes,l=this.settings.types,c="default";for(r=0,s=d.length;s>r;r++){if(c="default",o[d[r]].original&&o[d[r]].original.type&&l[o[d[r]].original.type]&&(c=o[d[r]].original.type),o[d[r]].data&&o[d[r]].data.jstree&&o[d[r]].data.jstree.type&&l[o[d[r]].data.jstree.type]&&(c=o[d[r]].data.jstree.type),o[d[r]].type=c,!0===o[d[r]].icon&&l[c].icon!==t&&(o[d[r]].icon=l[c].icon),l[c].li_attr!==t&&"object"==typeof l[c].li_attr)for(a in l[c].li_attr)if(l[c].li_attr.hasOwnProperty(a)){if("id"===a)continue;o[d[r]].li_attr[a]===t?o[d[r]].li_attr[a]=l[c].li_attr[a]:"class"===a&&(o[d[r]].li_attr.class=l[c].li_attr.class+" "+o[d[r]].li_attr.class)}if(l[c].a_attr!==t&&"object"==typeof l[c].a_attr)for(a in l[c].a_attr)if(l[c].a_attr.hasOwnProperty(a)){if("id"===a)continue;o[d[r]].a_attr[a]===t?o[d[r]].a_attr[a]=l[c].a_attr[a]:"href"===a&&"#"===o[d[r]].a_attr[a]?o[d[r]].a_attr.href=l[c].a_attr.href:"class"===a&&(o[d[r]].a_attr.class=l[c].a_attr.class+" "+o[d[r]].a_attr.class)}}o[e.jstree.root].type=e.jstree.root},this)),n.bind.call(this)},this.get_json=function(t,i,r){var s,a,o=this._model.data,d=i?e.extend(!0,{},i,{no_id:!1}):{},l=n.get_json.call(this,t,d,r);if(!1===l)return!1;if(e.isArray(l))for(s=0,a=l.length;a>s;s++)l[s].type=l[s].id&&o[l[s].id]&&o[l[s].id].type?o[l[s].id].type:"default",i&&i.no_id&&(delete l[s].id,l[s].li_attr&&l[s].li_attr.id&&delete l[s].li_attr.id,l[s].a_attr&&l[s].a_attr.id&&delete l[s].a_attr.id);else l.type=l.id&&o[l.id]&&o[l.id].type?o[l.id].type:"default",i&&i.no_id&&(l=this._delete_ids(l));return l},this._delete_ids=function(t){if(e.isArray(t)){for(var i=0,n=t.length;n>i;i++)t[i]=this._delete_ids(t[i]);return t}return delete t.id,t.li_attr&&t.li_attr.id&&delete t.li_attr.id,t.a_attr&&t.a_attr.id&&delete t.a_attr.id,t.children&&e.isArray(t.children)&&(t.children=this._delete_ids(t.children)),t},this.check=function(i,r,s,a,o){if(!1===n.check.call(this,i,r,s,a,o))return!1;r=r&&r.id?r:this.get_node(r),s=s&&s.id?s:this.get_node(s);var d,l,c,u,h=r&&r.id?o&&o.origin?o.origin:e.jstree.reference(r.id):null;switch(h=h&&h._model&&h._model.data?h._model.data:null,i){case"create_node":case"move_node":case"copy_node":if("move_node"!==i||-1===e.inArray(r.id,s.children)){if(d=this.get_rules(s),d.max_children!==t&&-1!==d.max_children&&d.max_children===s.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+i,data:JSON.stringify({chk:i,pos:a,obj:!(!r||!r.id)&&r.id,par:!(!s||!s.id)&&s.id})},!1;if(d.valid_children!==t&&-1!==d.valid_children&&-1===e.inArray(r.type||"default",d.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+i,data:JSON.stringify({chk:i,pos:a,obj:!(!r||!r.id)&&r.id,par:!(!s||!s.id)&&s.id})},!1;if(h&&r.children_d&&r.parents){for(l=0,c=0,u=r.children_d.length;u>c;c++)l=Math.max(l,h[r.children_d[c]].parents.length);l=l-r.parents.length+1}(0>=l||l===t)&&(l=1);do{if(d.max_depth!==t&&-1!==d.max_depth&&d.max_depth<l)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+i,data:JSON.stringify({chk:i,pos:a,obj:!(!r||!r.id)&&r.id,par:!(!s||!s.id)&&s.id})},!1;s=this.get_node(s.parent),d=this.get_rules(s),l++}while(s)}}return!0},this.get_rules=function(e){if(!(e=this.get_node(e)))return!1;var i=this.get_type(e,!0);return i.max_depth===t&&(i.max_depth=-1),i.max_children===t&&(i.max_children=-1),i.valid_children===t&&(i.valid_children=-1),i},this.get_type=function(t,i){return!!(t=this.get_node(t))&&(i?e.extend({type:t.type},this.settings.types[t.type]):t.type)},this.set_type=function(i,n){var r,s,a,o,d,l,c,u,h=this._model.data;if(e.isArray(i)){for(i=i.slice(),s=0,a=i.length;a>s;s++)this.set_type(i[s],n);return!0}if(r=this.settings.types,i=this.get_node(i),!r[n]||!i)return!1;if(c=this.get_node(i,!0),c&&c.length&&(u=c.children(".jstree-anchor")),o=i.type,d=this.get_icon(i),i.type=n,(!0===d||!r[o]||r[o].icon!==t&&d===r[o].icon)&&this.set_icon(i,r[n].icon===t||r[n].icon),r[o]&&r[o].li_attr!==t&&"object"==typeof r[o].li_attr)for(l in r[o].li_attr)if(r[o].li_attr.hasOwnProperty(l)){if("id"===l)continue;"class"===l?(h[i.id].li_attr.class=(h[i.id].li_attr.class||"").replace(r[o].li_attr[l],""),c&&c.removeClass(r[o].li_attr[l])):h[i.id].li_attr[l]===r[o].li_attr[l]&&(h[i.id].li_attr[l]=null,c&&c.removeAttr(l))}if(r[o]&&r[o].a_attr!==t&&"object"==typeof r[o].a_attr)for(l in r[o].a_attr)if(r[o].a_attr.hasOwnProperty(l)){if("id"===l)continue;"class"===l?(h[i.id].a_attr.class=(h[i.id].a_attr.class||"").replace(r[o].a_attr[l],""),u&&u.removeClass(r[o].a_attr[l])):h[i.id].a_attr[l]===r[o].a_attr[l]&&("href"===l?(h[i.id].a_attr[l]="#",u&&u.attr("href","#")):(delete h[i.id].a_attr[l],u&&u.removeAttr(l)))}if(r[n].li_attr!==t&&"object"==typeof r[n].li_attr)for(l in r[n].li_attr)if(r[n].li_attr.hasOwnProperty(l)){if("id"===l)continue;h[i.id].li_attr[l]===t?(h[i.id].li_attr[l]=r[n].li_attr[l],c&&("class"===l?c.addClass(r[n].li_attr[l]):c.attr(l,r[n].li_attr[l]))):"class"===l&&(h[i.id].li_attr.class=r[n].li_attr[l]+" "+h[i.id].li_attr.class,c&&c.addClass(r[n].li_attr[l]))}if(r[n].a_attr!==t&&"object"==typeof r[n].a_attr)for(l in r[n].a_attr)if(r[n].a_attr.hasOwnProperty(l)){if("id"===l)continue;h[i.id].a_attr[l]===t?(h[i.id].a_attr[l]=r[n].a_attr[l],u&&("class"===l?u.addClass(r[n].a_attr[l]):u.attr(l,r[n].a_attr[l]))):"href"===l&&"#"===h[i.id].a_attr[l]?(h[i.id].a_attr.href=r[n].a_attr.href,u&&u.attr("href",r[n].a_attr.href)):"class"===l&&(h[i.id].a_attr.class=r[n].a_attr.class+" "+h[i.id].a_attr.class,u&&u.addClass(r[n].a_attr[l]))}return!0}},e.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(e,t){return e+" ("+t+")"}},e.jstree.plugins.unique=function(i,n){this.check=function(t,i,r,s,a){if(!1===n.check.call(this,t,i,r,s,a))return!1;if(i=i&&i.id?i:this.get_node(i),!(r=r&&r.id?r:this.get_node(r))||!r.children)return!0;var o,d,l,c="rename_node"===t?s:i.text,u=[],h=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,m=this._model.data;for(o=0,d=r.children.length;d>o;o++)l=m[r.children[o]].text,h||(l=l.toLowerCase()),p&&(l=l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),u.push(l);switch(h||(c=c.toLowerCase()),p&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),t){case"delete_node":return!0;case"rename_node":return l=i.text||"",h||(l=l.toLowerCase()),p&&(l=l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),o=-1===e.inArray(c,u)||i.text&&l===c,o||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),o;case"create_node":return o=-1===e.inArray(c,u),o||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),o;case"copy_node":return o=-1===e.inArray(c,u),o||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),o;case"move_node":return o=i.parent===r.id&&(!a||!a.is_multi)||-1===e.inArray(c,u),o||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),o}return!0},this.create_node=function(i,r,s,a,o){if(!r||r.text===t){if(null===i&&(i=e.jstree.root),!(i=this.get_node(i)))return n.create_node.call(this,i,r,s,a,o);if(s=s===t?"last":s,!s.toString().match(/^(before|after)$/)&&!o&&!this.is_loaded(i))return n.create_node.call(this,i,r,s,a,o);r||(r={});var d,l,c,u,h,p,m=this._model.data,_=this.settings.unique.case_sensitive,f=this.settings.unique.trim_whitespace,g=this.settings.unique.duplicate;for(l=d=this.get_string("New node"),c=[],u=0,h=i.children.length;h>u;u++)p=m[i.children[u]].text,_||(p=p.toLowerCase()),f&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),c.push(p);for(u=1,p=l,_||(p=p.toLowerCase()),f&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==e.inArray(p,c);)l=g.call(this,d,++u).toString(),p=l,_||(p=p.toLowerCase()),f&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));r.text=l}return n.create_node.call(this,i,r,s,a,o)}};var p=d.createElement("DIV");if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML="&#160;",e.jstree.plugins.wholerow=function(t,i){this.bind=function(){i.bind.call(this),this.element.on("ready.jstree set_state.jstree",e.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",e.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",e.proxy(function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var i,n,r=!1;for(i=0,n=t.selected.length;n>i;i++)(r=this.get_node(t.selected[i],!0))&&r.length&&r.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",e.proxy(function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",e.proxy(function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",e.proxy(function(t){if(this._data.contextmenu){t.preventDefault();var i=e.Event("contextmenu",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,pageX:t.pageX,pageY:t.pageY});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i)}},this)).on("click.jstree",".jstree-wholerow",function(t){t.stopImmediatePropagation();var i=e.Event("click",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("dblclick.jstree",".jstree-wholerow",function(t){t.stopImmediatePropagation();var i=e.Event("dblclick",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",e.proxy(function(t){t.stopImmediatePropagation();var i=e.Event("click",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",e.proxy(function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",e.proxy(function(e){this.dehover_node(e.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),i.teardown.call(this)},this.redraw_node=function(t,n,r,s){if(t=i.redraw_node.apply(this,arguments)){var a=p.cloneNode(!0);-1!==e.inArray(t.id,this._data.core.selected)&&(a.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===t.id&&(a.className+=" jstree-wholerow-hovered"),t.insertBefore(a,t.childNodes[0])}return t}},d.registerElement&&Object&&Object.create){var m=Object.create(HTMLElement.prototype);m.createdCallback=function(){var t,i={core:{},plugins:[]};for(t in e.jstree.plugins)e.jstree.plugins.hasOwnProperty(t)&&this.attributes[t]&&(i.plugins.push(t),this.getAttribute(t)&&JSON.parse(this.getAttribute(t))&&(i[t]=JSON.parse(this.getAttribute(t))));for(t in e.jstree.defaults.core)e.jstree.defaults.core.hasOwnProperty(t)&&this.attributes[t]&&(i.core[t]=JSON.parse(this.getAttribute(t))||this.getAttribute(t));e(this).jstree(i)};try{d.registerElement("vakata-jstree",{prototype:m})}catch(e){}}}}),define("file-tree",["jquery","jstree","underscore","backbone","common"],function(e,t,i,n,r){"use strict";return{renderFileTree:function(){},renderDirTree:function(t,i,n){t.jstree({core:{data:function(i,s){if("#"==i.id)s(n);else{var a,o=i.data.path;a=1==i.parents.length?i.data.repo_id:t.jstree("get_node",i.parents[i.parents.length-2]).data.repo_id,e.ajax({url:r.getUrl({name:"get_dirents",repo_id:a})+"?path="+encodeURIComponent(o)+"&dir_only=true",cache:!1,dataType:"json",success:function(e){if(e.length)for(var t=0,n=e.length;t<n;t++)i.children.push({text:r.HTMLescape(e[t].name),data:{path:o+e[t].name+"/"},children:!0})},complete:function(){s(i.children)}})}},multiple:!1,animation:100}}).on("select_node.jstree",function(n,r){var s,a=r.node;s=1==a.parents.length?a.data.repo_id:t.jstree("get_node",a.parents[a.parents.length-2]).data.repo_id,e('input[name="dst_repo"]',i).val(s),e('input[name="dst_path"]',i).val(a.data.path)})},renderTreeForPath:function(t){var i=this,n=t.$form,s=t.$container,a=t.repo_name,o=t.repo_id,d=t.path;"/"!=d&&(d+="/");var l=[],c={text:r.HTMLescape(a),data:{repo_id:o,path:"/"},children:[],state:{opened:!0}};l.push(c),e.ajax({url:r.getUrl({name:"get_dirents",repo_id:o})+"?path="+encodeURIComponent(d)+"&dir_only=true&all_dir=true",cache:!1,dataType:"json",success:function(t){if(t.length)for(var i,n,s=[],a=0,o=t.length;a<o;a++)if(n=t[a].parent_dir+t[a].name+"/",i={text:r.HTMLescape(t[a].name),data:{path:n}},0==d.indexOf(n)?(e.extend(i,{children:[],state:{opened:!0}}),s.push(i)):e.extend(i,{children:!0}),"/"==t[a].parent_dir)c.children.push(i);else for(var l=0,u=s.length;l<u;l++)if(t[a].parent_dir==s[l].data.path){s[l].children.push(i);break}},complete:function(){i.renderDirTree(s,n,l)}})},prepareOtherReposTree:function(t){var i=this;e("#other-repos .hd").on("click",function(){var n=e("span",e(this)),s=e("#mv-form"),a=e(this).next(),o=e("#other-repos-dirs");n.hasClass("icon-caret-right")?(n.attr("class","icon-caret-down"),a.show(),e.ajax({url:r.getUrl({name:"unenc_rw_repos"}),cache:!1,dataType:"json",success:function(e){for(var n=[],a=t.cur_repo_id,d=0,l=e.length;d<l;d++)e[d].id!=a&&n.push({text:r.HTMLescape(e[d].name),data:{repo_id:e[d].id,path:"/"},children:!0});i.renderDirTree(o,s,n),o.removeClass("hide")},complete:function(){a.hide()}})):(n.attr("class","icon-caret-right"),o.addClass("hide"))})}}}),define("app/collections/repo-user-folder-perm",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({initialize:function(e){this.repo_id=e.repo_id,this.is_group_owned_repo=e.is_group_owned_repo},url:function(){return i.getUrl({name:this.is_group_owned_repo?"group-owned-library-user-folder-permission":"repo_user_folder_perm",repo_id:this.repo_id})}})}),define("app/collections/repo-group-folder-perm",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({initialize:function(e){this.repo_id=e.repo_id,this.is_group_owned_repo=e.is_group_owned_repo},url:function(){return i.getUrl({name:this.is_group_owned_repo?"group-owned-library-group-folder-permission":"repo_group_folder_perm",repo_id:this.repo_id})}})}),define("app/views/repo-folder-perm-item",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",template:t.template(e("#folder-perm-item-tmpl").html()),initialize:function(t){void 0===t.item_data.show_folder_path&&e.extend(t.item_data,{show_folder_path:!1}),this.data={show_admin:!1},e.extend(this.data,t.item_data),this.render()},render:function(){return this.$el.html(this.template(this.data)),this},events:{mouseenter:"showPermOpIcons",mouseleave:"hidePermOpIcons","click .perm-edit-icon":"editIconClick","change .perm-toggle-select":"editPerm","click .delete-icon":"deletePerm"},showPermOpIcons:function(){this.$el.find(".op-icon").removeClass("vh")},hidePermOpIcons:function(){this.$el.find(".op-icon").addClass("vh")},editIconClick:function(t){return e(t.currentTarget).closest("td").find(".perm").addClass("hide").end().find(".perm-toggle-select").removeClass("hide"),!1},editPerm:function(t){var i=this,r=e(t.currentTarget).val(),s={permission:r,folder_path:this.data.folder_path},a=this.data.for_user;a?e.extend(s,{user_email:this.data.user_email}):e.extend(s,{group_id:this.data.group_id});var o;o=this.data.is_group_owned_repo?a?"group-owned-library-user-folder-permission":"group-owned-library-group-folder-permission":a?"repo_user_folder_perm":"repo_group_folder_perm",e.ajax({url:n.getUrl({name:o,repo_id:this.data.repo_id}),type:"PUT",dataType:"json",cache:!1,beforeSend:n.prepareCSRFToken,data:s,success:function(){i.data.permission=r,i.render()},error:function(t){var i=n.prepareAjaxErrorMsg(t);a?e("#user-folder-perm .error").html(i).removeClass("hide"):e("#group-folder-perm .error").html(i).removeClass("hide")}})},deletePerm:function(){var t=this,i={permission:this.data.permission,folder_path:this.data.folder_path},r=this.data.for_user;r?e.extend(i,{user_email:this.data.user_email}):e.extend(i,{group_id:this.data.group_id});var s;return s=this.data.is_group_owned_repo?r?"group-owned-library-user-folder-permission":"group-owned-library-group-folder-permission":r?"repo_user_folder_perm":"repo_group_folder_perm",e.ajax({url:n.getUrl({name:s,repo_id:this.data.repo_id}),type:"DELETE",dataType:"json",cache:!1,beforeSend:n.prepareCSRFToken,data:i,success:function(){t.remove()},error:function(t){var i=n.prepareAjaxErrorMsg(t);r?e("#user-folder-perm .error").html(i).removeClass("hide"):e("#group-folder-perm .error").html(i).removeClass("hide")}}),!1}})}),define("app/views/dialogs/repo-folder-perm-admin",["jquery","underscore","backbone","common","jquery.ui","file-tree","app/collections/repo-user-folder-perm","app/collections/repo-group-folder-perm","app/views/repo-folder-perm-item"],function(e,t,i,n,r,s,a,o,d){"use strict";return i.View.extend({id:"repo-folder-perm-popup",template:t.template(e("#repo-folder-perm-admin-dialog-tmpl").html()),initialize:function(t){this.repo_name=t.repo_name,this.repo_id=t.repo_id,this.is_group_owned_repo=t.is_group_owned_repo,this.render(),this.$(".op-target").css({"max-width":280}),e(window).width()<768&&this.$el.css({width:e(window).width()-50,height:e(window).height()-50,overflow:"auto"}),this.$el.modal({focus:!1,onClose:function(){e(document).off("click",n),e.modal.close()}}),e(window).width()>=768&&e("#simplemodal-container").css({width:"auto",height:"auto"}),this.$(".js-tabs").tabs(),this.userPerm=new a({is_group_owned_repo:this.is_group_owned_repo,repo_id:this.repo_id}),this.userPerm.perm_type="user",this.$userPermPanel=this.$("#js-repo-user-folder-perm .js-folder-perm-content"),this.groupPerm=new o({is_group_owned_repo:this.is_group_owned_repo,repo_id:this.repo_id}),this.groupPerm.perm_type="group",this.$groupPermPanel=this.$("#js-repo-group-folder-perm .js-folder-perm-content"),this.renderPanel({collection:this.userPerm,$panel:this.$userPermPanel}),this.renderPanel({collection:this.groupPerm,$panel:this.$groupPermPanel});var i=this,n=function(e){var t=e.target||event.srcElement,n=i.$(".perm-toggle-select:visible"),r=n.parent();!n.length||n.is(t)||n.find("*").is(t)||r.find(".perm-edit-icon").is(t)||(n.addClass("hide"),r.find(".perm").removeClass("hide"))};e(document).on("click",n)},render:function(){return this.$el.html(this.template({title:gettext("{placeholder} Folder Permission").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(this.repo_name)+'">'+n.HTMLescape(this.repo_name)+"</span>")})),this},renderPanel:function(t){var i=t.collection,r=t.$panel,s=e(".loading-tip",r),a=e(".error",r);if("user"==i.perm_type)e('[name="emails"]',r).select2(e.extend(n.contactInputOptionsForSelect2(),{placeholder:gettext("Search user or enter email and press Enter")}));else{var o=[];e.ajax({url:n.getUrl({name:"shareable_groups"}),type:"GET",dataType:"json",cache:!1,success:function(e){for(var t=0,i=e.length;t<i;t++)o.push({id:e[t].id,name:e[t].name});o.sort(function(e,t){return n.compareTwoWord(e.name,t.name)})},error:function(e,t,i){},complete:function(){for(var t="",i=0,n=o.length;i<n;i++)t+='<option value="'+o[i].id+'" data-index="'+i+'">'+o[i].name+"</option>";e('[name="groups"]',r).html(t).select2({placeholder:gettext("Select a group"),maximumSelectionSize:1,formatSelectionTooBig:gettext("You can only select 1 item"),escapeMarkup:function(e){return e}})}})}this.listenTo(i,"add",this.addItem),i.fetch({cache:!1,success:function(e,t,i){s.hide()},error:function(e,t,i){var r=n.prepareCollectionFetchErrorMsg(e,t,i);a.html(r).show(),s.hide()}})},addItem:function(t,i,r){var s=i.perm_type,a="user"==s?this.$userPermPanel:this.$groupPermPanel,o="user"==s,l=n.encodePath(t.get("folder_path")),c=new d({item_data:e.extend(t.toJSON(),{for_user:o,show_folder_path:!0,encoded_path:l,is_group_owned_repo:this.is_group_owned_repo})});r.prepend?e('[name="folder_path"]',a).closest("tr").after(c.render().el):e("tbody",a).append(c.render().el)},events:{"click .js-add-folder":"showFolderSelectForm","click .js-folder-select-submit":"addFolder","click .js-folder-select-cancel":"cancelFolderSelect","click .js-user-perm-add-submit":"addPerm","click .js-group-perm-add-submit":"addPerm"},showFolderSelectForm:function(t){var i=e(t.currentTarget),n=i.closest(".js-folder-perm-content").slideUp(),r=e(".js-folder-select-form",n.parent()).slideDown(),a=e(".js-jtree-container",r);e.jstree.reference(a)||s.renderTreeForPath({$form:r,$container:a,repo_id:this.repo_id,repo_name:this.repo_name,path:"/"})},addFolder:function(t){var i=e(t.currentTarget),n=i.closest("form"),r=e("[name=dst_path]",n),s=r.val(),a=e(".error",n);if(!s)return a.html(gettext("Please click and choose a directory.")).removeClass("hide"),!1;n.slideUp(),e.jstree.reference(e(".js-jtree-container",n)).deselect_all(),e("[name=dst_path]",n).val(""),a.hide();var o=e(".js-folder-perm-content",n.parent()).slideDown();return e("[name=folder_path]",o).val(s),!1},cancelFolderSelect:function(t){var i=e(t.currentTarget),n=i.closest("form").slideUp();e(".js-folder-perm-content",n.parent()).slideDown();var r=e.jstree.reference(e(".js-jtree-container",n));r.get_selected().length>0&&r.deselect_all()},addPerm:function(t){var i,r,s,a,o,l=e(t.currentTarget);if(l.hasClass("js-user-perm-add-submit")){o=!0,i=this.$userPermPanel,s=n.getUrl({name:this.is_group_owned_repo?"group-owned-library-user-folder-permission":"repo_user_folder_perm",repo_id:this.repo_id});var r=e('[name="emails"]',i),c=r.val();if(!c)return!1;a={user_email:c.split(",")}}else{o=!1,i=this.$groupPermPanel,s=n.getUrl({name:this.is_group_owned_repo?"group-owned-library-group-folder-permission":"repo_group_folder_perm",repo_id:this.repo_id});var r=e('[name="groups"]',i),u=r.val().join(",");if(!u)return!1;a={group_id:u.split(",")}}var h=e('[name="folder_path"]',i),p=e('[name="permission"]',i),m=p.val(),_=h.val();if(!m||!_)return!1;e.extend(a,{folder_path:_,permission:m});var f=e(".error",i);n.disableButton(l);var g=this.is_group_owned_repo;e.ajax({url:s,dataType:"json",method:"POST",beforeSend:n.prepareCSRFToken,traditional:!0,data:a,success:function(t){if(t.success.length>0&&(e(t.success).each(function(t,r){var s=n.encodePath(r.folder_path),a=new d({item_data:e.extend(r,{for_user:o,show_folder_path:!0,encoded_path:s,is_group_owned_repo:g})});e('[name="folder_path"]',i).closest("tr").after(a.el)}),r.select2("val",""),h.val(""),e("option",p).prop("selected",!1),e('[value="rw"]',p).prop("selected",!0),f.addClass("hide")),t.failed.length>0){var s="";e(t.failed).each(function(e,t){s+=n.HTMLescape(t.user_email||t.group_id)+": "+n.HTMLescape(t.error_msg)+"<br />"}),f.html(s).removeClass("hide")}},error:function(e){var t=n.prepareAjaxErrorMsg(e);f.html(t).removeClass("hide")},complete:function(){n.enableButton(l)}})}})}),define("app/views/widgets/hl-item-view",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",hiddenOperationClass:".op-icon",initialize:function(e){this.$el.on("mouseenter",t.bind(this.highlight,this)),this.$el.on("mouseleave",t.bind(this.rmHighlight,this)),this.$el.on("focus","*",t.bind(this.focus,this))},focus:function(){if(app.ui.currentDropdown||app.ui.freezeItemHightlight)return!0;if(app.ui.currentHighlightedItem){if(app.ui.currentHighlightedItem==this)return!0;app.ui.currentHighlightedItem.rmHighlight()}return this.highlight(),!0},highlight:function(){app.ui.currentDropdown||app.ui.freezeItemHightlight||(app.ui.currentHighlightedItem=this,this.$el.addClass("hl").find(this.hiddenOperationClass).removeClass("vh"))},rmHighlight:function(){app.ui.currentDropdown||app.ui.freezeItemHightlight||(app.ui.currentHighlightedItem=null,this.$el.removeClass("hl"),e(window).width()>=768&&this.$el.find(this.hiddenOperationClass).addClass("vh"))}})}),define("app/views/widgets/dropdown",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return e(document).on("click",function(e){var t=app.ui.currentDropdown,i=e.target||event.srcElement;return!t||(t.$(".sf-dropdown-menu").is(i)||t.$(".sf-dropdown-menu").find("*").is(i)||(t.hide(),app.ui.currentHighlightedItem&&app.ui.currentHighlightedItem.rmHighlight()),!0)}),e(document).on("keydown",function(e){if(27==e.keyCode){var t=app.ui.currentDropdown;t&&(t.hide(),app.ui.currentHighlightedItem&&app.ui.currentHighlightedItem.rmHighlight())}}),i.View.extend({defaultOptions:{left:"0px"},initialize:function(e){this.$el.on("click",".sf-dropdown-toggle",t.bind(this.toggleDropdown,this)),this.$el.on("keydown",t.bind(this.handleKeydown,this)),this.options={},t.extend(this.options,this.defaultOptions,e)},hide:function(){app.ui.currentDropdown=null,this.$(".sf-dropdown-menu").addClass("hide").removeAttr("style")},show:function(){var t=this.$(".sf-dropdown-toggle"),i=this.$(".sf-dropdown-menu");app.ui.currentDropdown=this,void 0!=this.options.right?i.css("right",this.options.right):i.css("left",this.options.left),t.offset().top+t.outerHeight(!0)+i.outerHeight(!0)>e(window).scrollTop()+e(window).height()&&i.css({bottom:t.outerHeight(!0)+4}),this.$(".sf-dropdown-menu").removeClass("hide")},toggleDropdown:function(){return app.ui.currentDropdown&&app.ui.currentDropdown!=this&&app.ui.currentDropdown.hide(),this.$(".sf-dropdown-menu").is(":hidden")?this.show():this.hide(),!1},handleKeydown:function(t){if(/(38|40)/.test(t.which)){t.preventDefault(),t.stopPropagation();var i=e.makeArray(this.$el.find("li a"));if(i.length){var n=i.indexOf(t.target);38===t.which&&n>0&&n--,40===t.which&&n<i.length-1&&n++,i[n].focus()}}}})}),define("app/views/repo",["jquery","underscore","backbone","common","app/views/share","app/views/dialogs/repo-change-password","app/views/dialogs/repo-history-settings","app/views/dialogs/repo-share-link-admin","app/views/dialogs/repo-folder-perm-admin","app/views/widgets/hl-item-view","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o,d,l,c){"use strict";return l.extend({tagName:"tr",template:t.template(e("#repo-tmpl").html()),mobileTemplate:t.template(e("#repo-mobile-tmpl").html()),renameTemplate:t.template(e("#repo-rename-form-template").html()),transferTemplate:t.template(e("#repo-transfer-form-tmpl").html()),addLabelTemplate:t.template(e("#add-lib-label-form-tmpl").html()),events:{click:"clickItem","click td:lt(2)":"visitRepo","click .repo-delete-btn":"del","click .repo-share-btn":"share","click .js-repo-rename":"rename","click .js-repo-transfer":"transfer","click .js-repo-change-password":"changePassword","click .js-popup-history-setting":"popupHistorySetting","click .js-popup-share-link-admin":"popupShareLinkAdmin","click .js-popup-folder-perm-admin":"popupFolderPermAdmin","click .js-repo-details":"viewDetails","click .js-add-label":"addLabel","click .mobile-menu-control":"showMobileMenu","click .mobile-menu-mask":"closeMobileMenu"},initialize:function(e){l.prototype.initialize.call(this),this.myReposView=e.myReposView,this.listenTo(this.model,"change",this.render)
},render:function(){var i,r=this.model.toJSON(),s=n.isHiDPI()?48:24,a=this.model.getIconUrl(s),o={};return e(window).width()>=768?i=this.template:(i=this.mobileTemplate,o={right:0}),t.extend(r,{icon_url:a,icon_title:this.model.getIconTitle(),can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link}),this.$el.html(i(r)),this.dropdown=new c(e.extend({el:this.$(".sf-dropdown")},o)),this.mobileMenu=this.$(".mobile-menu-container"),this},clickItem:function(e){var t=e.target||event.srcElement;this.$("td").is(t)&&this.myReposView.repoDetailsView.$el.is(":visible")&&this.viewDetails()},visitRepo:function(){e(window).width()<768&&(location.href=this.$(".repo-name-span a").attr("href"))},del:function(){this.hideMobileMenu();var t=this,i=this.model.get("name"),r=gettext("Delete Library"),s=gettext("Are you sure you want to delete %s ?").replace("%s",'<span class="op-target ellipsis ellipsis-op-target">'+n.HTMLescape(i)+"</span>"),a=function(){e.ajax({url:n.getUrl({name:"repo",repo_id:t.model.get("id")}),type:"DELETE",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){t.$el.remove(),n.feedback(gettext("Successfully deleted."),"success")},error:function(e,t,i){n.ajaxErrorHandler(e,t,i)},complete:function(){e.modal.close()}})};return n.showConfirm(r,s,a),this.togglePopup(),!1},share:function(){this.hideMobileMenu();var e={is_repo_owner:!0,is_virtual:this.model.get("virtual"),user_perm:"rw",repo_id:this.model.get("id"),repo_encrypted:this.model.get("encrypted"),is_dir:!0,dirent_path:"/",obj_name:this.model.get("name")};return new r(e),!1},togglePopup:function(){this.dropdown.hide()},rename:function(){this.hideMobileMenu();var t=this.model.get("name"),i=e(this.renameTemplate({repo_name:t})),r=this.$(".repo-name-span"),s=this.$(".repo-op-td"),a=r.closest("td");a.attr("colspan",2).css({width:r.width()+s.outerWidth(),height:r.height()}).append(i),s.hide(),r.hide(),e('[name="newname"]',i).trigger("select"),this.togglePopup(),app.ui.freezeItemHightlight=!0;var o=function(){return app.ui.freezeItemHightlight=!1,i.remove(),s.show(),r.show(),a.attr("colspan",1).css({width:r.width()}),!1};e(".cancel",i).on("click",o);var d=(i.attr("id"),this);return i.on("submit",function(){var r,s=e.trim(e('[name="newname"]',i).val());if(!s)return r=gettext("It is required."),n.feedback(r,"error"),!1;if(-1!=s.indexOf("/"))return r=gettext("Name should not include '/'."),n.feedback(r,"error"),!1;if(s==t)return o(),!1;var a={repo_name:s},l=n.getUrl({name:"repo",repo_id:d.model.get("id")})+"?op=rename",c=function(e){app.ui.freezeItemHightlight=!1,d.model.set({name:s})},u=function(e){var t=n.prepareAjaxErrorMsg(e);n.feedback(t,"error"),n.enableButton(h)},h=e('[type="submit"]',i);return n.disableButton(h),e.ajax({url:l,type:"POST",dataType:"json",beforeSend:n.prepareCSRFToken,data:a,success:c,error:u}),!1}),!1},transfer:function(){this.hideMobileMenu();var t=this;this.togglePopup();var i=this.model.get("name"),r=e(this.transferTemplate({title:gettext("Transfer Library {library_name} To").replace("{library_name}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(i)+'">'+n.HTMLescape(i)+"</span>")}));return r.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"}),e('[name="email"]',r).select2(e.extend(n.contactInputOptionsForSelect2(),{width:"280px",maximumSelectionSize:1,placeholder:gettext("Search user or enter email and press Enter"),formatSelectionTooBig:gettext("You cannot select any more choices")})),r.on("submit",function(){var i=e.trim(e('[name="email"]',e(this)).val());if(!i)return!1;if(i==t.model.get("owner"))return!1;var s=e('[type="submit"]',e(this));return n.disableButton(s),e.ajax({url:n.getUrl({name:"repo_owner",repo_id:t.model.get("id")}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{owner:i},success:function(){e.modal.close(),t.remove(),n.feedback(gettext("Successfully transferred the library."),"success")},error:function(t){var i=n.prepareAjaxErrorMsg(t);e(".error",r).html(i).show(),n.enableButton(s)}}),!1}),!1},popupHistorySetting:function(){this.hideMobileMenu();var e={repo_name:this.model.get("name"),repo_id:this.model.get("id"),url_name:"repo_history_limit"};return this.togglePopup(),new a(e),!1},popupShareLinkAdmin:function(){this.hideMobileMenu();var e={repo_name:this.model.get("name"),repo_id:this.model.get("id")};return this.togglePopup(),new o(e),!1},popupFolderPermAdmin:function(){this.hideMobileMenu();var e={repo_name:this.model.get("name"),repo_id:this.model.get("id")};return this.togglePopup(),new d(e),!1},changePassword:function(){var e={repo_name:this.model.get("name"),repo_id:this.model.get("id")};return this.togglePopup(),new s(e),!1},viewDetails:function(){this.hideMobileMenu();var t=this.model.toJSON(),i=n.isHiDPI()?48:24,r=e.extend({},t,{icon_url:this.model.getIconUrl(i),big_icon_url:this.model.getIconUrl()}),s=this.myReposView.repoDetailsView;return s.show(r),e.ajax({url:n.getUrl({name:"repo_v2.1",repo_id:this.model.get("id")}),cache:!1,dataType:"json",success:function(e){s.update({file_count:e.file_count})},error:function(){s.update({error:!0})}}),this.togglePopup(),!1},addLabel:function(){var t=this;this.togglePopup();var i=e(this.addLabelTemplate());return e('<div><span class="loading-icon loading-tip"></span></div>').modal({focus:!1,minWidth:280}),e("#simplemodal-container").css({height:"auto"}),e.ajax({url:n.getUrl({name:"user_repo_labels"}),cache:!1,dataType:"json",success:function(t){for(var n=[],r=0,s=t.length;r<s;r++)n.push({id:t[r],text:t[r]});e("#simplemodal-data").html(i),e('[name="labels"]',i).select2({tags:n})},error:function(t){var i=n.prepareAjaxErrorMsg(t);e("#simplemodal-data").html('<p class="error">'+i+"</p>")}}),i.on("submit",function(){var r=e('[name="labels"]',i),s=r.select2("val"),a=e(".error",i),o=e('[type="submit"]',i);return 0==s.length?(a.html(gettext("It is required.")).show(),!1):(n.disableButton(o),e.ajax({url:n.getUrl({name:"repo_labels"}),type:"POST",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,data:{repo_id:t.model.get("id"),tag_names:s.join(",")},success:function(){var i=gettext("Successfully added label(s) for library {placeholder}").replace("{placeholder}",t.model.get("name"));e.modal.close(),n.feedback(i,"success")},error:function(e){var t=n.prepareAjaxErrorMsg(e);a.html(t).show(),n.enableButton(o)}}),!1)}),!1},showMobileMenu:function(e){var t=this.mobileMenu.length?this.mobileMenu:null;return t&&t.slideDown("fast"),!1},hideMobileMenu:function(){var e=this.mobileMenu.length?this.mobileMenu:null;e&&e.slideUp("fast")},closeMobileMenu:function(){return this.hideMobileMenu(),!1}})}),function(e){"function"==typeof define&&define.amd?define("simplemodal",["jquery"],e):e(jQuery)}(function(e){var t=[],i=e(document),n=navigator.userAgent.toLowerCase(),r=e(window),s=[],a={ieQuirks:null,msie:/msie/.test(n)&&!/opera/.test(n),opera:/opera/.test(n)};a.ie6=a.msie&&/msie 6./.test(n)&&"object"!=typeof window.XMLHttpRequest,a.ie7=a.msie&&/msie 7.0/.test(n),a.boxModel="CSS1Compat"===document.compatMode,e.modal=function(t,i){return e.modal.impl.init(t,i)},e.modal.close=function(){e.modal.impl.close()},e.modal.focus=function(t){e.modal.impl.focus(t)},e.modal.setContainerDimensions=function(){e.modal.impl.setContainerDimensions()},e.modal.setPosition=function(){e.modal.impl.setPosition()},e.modal.update=function(t,i){e.modal.impl.update(t,i)},e.fn.modal=function(t){return e.modal.impl.init(this,t)},e.modal.defaults={appendTo:"body",focus:!0,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:!1,autoPosition:!0,zIndex:1e3,close:!0,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,fixed:!0,position:null,persist:!1,modal:!0,onOpen:null,onShow:null,onClose:null},e.modal.impl={d:{},init:function(t,i){var n=this;if(n.d.data)return!1;if(a.ieQuirks=a.msie&&!a.boxModel,n.o=e.extend({},e.modal.defaults,i),n.zIndex=n.o.zIndex,n.occb=!1,"object"==typeof t)t=t instanceof e?t:e(t),n.d.placeholder=!1,t.parent().parent().length>0&&(t.before(e("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"})),n.d.placeholder=!0,n.display=t.css("display"),n.o.persist||(n.d.orig=t.clone(!0)));else{if("string"!=typeof t&&"number"!=typeof t)return alert("SimpleModal Error: Unsupported data type: "+typeof t),n;t=e("<div></div>").html(t)}return n.create(t),t=null,n.open(),e.isFunction(n.o.onShow)&&n.o.onShow.apply(n,[n.d]),n},create:function(i){var n=this;n.getDimensions(),n.o.modal&&a.ie6&&(n.d.iframe=e('<iframe src="javascript:false;"></iframe>').css(e.extend(n.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:s[0],width:s[1],zIndex:n.o.zIndex,top:0,left:0})).appendTo(n.o.appendTo)),n.d.overlay=e("<div></div>").attr("id",n.o.overlayId).addClass("simplemodal-overlay").css(e.extend(n.o.overlayCss,{display:"none",opacity:n.o.opacity/100,height:n.o.modal?t[0]:0,width:n.o.modal?t[1]:0,position:"fixed",left:0,top:0,zIndex:n.o.zIndex+1})).appendTo(n.o.appendTo),n.d.container=e("<div></div>").attr("id",n.o.containerId).attr("role","dialog").addClass("simplemodal-container").css(e.extend({position:n.o.fixed?"fixed":"absolute"},n.o.containerCss,{display:"none",zIndex:n.o.zIndex+2})).append(n.o.close&&n.o.closeHTML?e(n.o.closeHTML).addClass(n.o.closeClass):"").appendTo(n.o.appendTo),n.d.wrap=e("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(n.d.container),n.d.data=i.attr("id",i.attr("id")||n.o.dataId).addClass("simplemodal-data").css(e.extend(n.o.dataCss,{display:"none"})).appendTo("body"),i=null,n.setContainerDimensions(),n.d.data.appendTo(n.d.wrap),(a.ie6||a.ieQuirks)&&n.fixIE()},bindEvents:function(){var n=this;e("."+n.o.closeClass).bind("click.simplemodal",function(e){e.preventDefault(),n.close()}),n.o.modal&&n.o.close&&n.o.overlayClose&&n.d.overlay.bind("click.simplemodal",function(e){e.preventDefault(),n.close()}),i.bind("keydown.simplemodal",function(e){n.o.modal&&9===e.keyCode?n.watchTab(e):n.o.close&&n.o.escClose&&27===e.keyCode&&(e.preventDefault(),n.close())}),r.bind("resize.simplemodal orientationchange.simplemodal",function(){n.getDimensions(),n.o.autoResize?n.setContainerDimensions():n.o.autoPosition&&n.setPosition(),a.ie6||a.ieQuirks?n.fixIE():n.o.modal&&(n.d.iframe&&n.d.iframe.css({height:s[0],width:s[1]}),n.d.overlay.css({height:t[0],width:t[1]}))})},unbindEvents:function(){e("."+this.o.closeClass).unbind("click.simplemodal"),i.unbind("keydown.simplemodal"),r.unbind(".simplemodal"),this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var t=this,i=t.o.position;e.each([t.d.iframe||null,t.o.modal?t.d.overlay:null,"fixed"===t.d.container.css("position")?t.d.container:null],function(e,t){if(t){var n="document.body.clientHeight",r="document.body.clientWidth",s="document.body.scrollHeight",a="document.body.scrollLeft",o="document.body.scrollTop",d="document.body.scrollWidth",l="document.documentElement.clientHeight",c="document.documentElement.clientWidth",u="document.documentElement.scrollLeft",h="document.documentElement.scrollTop",p=t[0].style;if(p.position="absolute",e<2)p.removeExpression("height"),p.removeExpression("width"),p.setExpression("height",s+" > "+n+" ? "+s+" : "+n+' + "px"'),p.setExpression("width",d+" > "+r+" ? "+d+" : "+r+' + "px"');else{var m,_;if(i&&i.constructor===Array){var f=i[0]?"number"==typeof i[0]?i[0].toString():i[0].replace(/px/,""):t.css("top").replace(/px/,"");if(m=-1===f.indexOf("%")?f+" + (t = "+h+" ? "+h+" : "+o+') + "px"':parseInt(f.replace(/%/,""))+" * (("+l+" || "+n+") / 100) + (t = "+h+" ? "+h+" : "+o+') + "px"',i[1]){var g="number"==typeof i[1]?i[1].toString():i[1].replace(/px/,"");_=-1===g.indexOf("%")?g+" + (t = "+u+" ? "+u+" : "+a+') + "px"':parseInt(g.replace(/%/,""))+" * (("+c+" || "+r+") / 100) + (t = "+u+" ? "+u+" : "+a+') + "px"'}}else m="("+l+" || "+n+") / 2 - (this.offsetHeight / 2) + (t = "+h+" ? "+h+" : "+o+') + "px"',_="("+c+" || "+r+") / 2 - (this.offsetWidth / 2) + (t = "+u+" ? "+u+" : "+a+') + "px"';p.removeExpression("top"),p.removeExpression("left"),p.setExpression("top",m),p.setExpression("left",_)}}})},focus:function(t){var i=this,n=t&&-1!==e.inArray(t,["first","last"])?t:"first",r=e(":input:enabled:visible:"+n,i.d.wrap);setTimeout(function(){r.length>0?r.focus():i.d.wrap.focus()},10)},getDimensions:function(){var e=void 0===window.innerHeight?r.height():window.innerHeight;t=[i.height(),i.width()],s=[e,r.width()]},getVal:function(e,t){return e?"number"==typeof e?e:"auto"===e?0:e.indexOf("%")>0?parseInt(e.replace(/%/,""))/100*("h"===t?s[0]:s[1]):parseInt(e.replace(/px/,"")):null},update:function(e,t){var i=this;if(!i.d.data)return!1;i.d.origHeight=i.getVal(e,"h"),i.d.origWidth=i.getVal(t,"w"),i.d.data.hide(),e&&i.d.container.css("height",e),t&&i.d.container.css("width",t),i.setContainerDimensions(),i.d.data.show(),i.o.focus&&i.focus(),i.unbindEvents(),i.bindEvents()},setContainerDimensions:function(){var e=this,t=a.ie6||a.ie7,i=e.d.origHeight?e.d.origHeight:a.opera?e.d.container.height():e.getVal(t?e.d.container[0].currentStyle.height:e.d.container.css("height"),"h"),n=e.d.origWidth?e.d.origWidth:a.opera?e.d.container.width():e.getVal(t?e.d.container[0].currentStyle.width:e.d.container.css("width"),"w"),r=e.d.data.outerHeight(!0),o=e.d.data.outerWidth(!0);e.d.origHeight=e.d.origHeight||i,e.d.origWidth=e.d.origWidth||n;var d=e.o.maxHeight?e.getVal(e.o.maxHeight,"h"):null,l=e.o.maxWidth?e.getVal(e.o.maxWidth,"w"):null,c=d&&d<s[0]?d:s[0],u=l&&l<s[1]?l:s[1],h=e.o.minHeight?e.getVal(e.o.minHeight,"h"):"auto";i=i?e.o.autoResize&&i>c?c:i<h?h:i:r?r>c?c:e.o.minHeight&&"auto"!==h&&r<h?h:r:h;var p=e.o.minWidth?e.getVal(e.o.minWidth,"w"):"auto";n=n?e.o.autoResize&&n>u?u:n<p?p:n:o?o>u?u:e.o.minWidth&&"auto"!==p&&o<p?p:o:p,e.d.container.css({height:i,width:n}),e.d.wrap.css({overflow:r>i||o>n?"auto":"visible"}),e.o.autoPosition&&e.setPosition()},setPosition:function(){var e,t,i=this,n=s[0]/2-i.d.container.outerHeight(!0)/2,a=s[1]/2-i.d.container.outerWidth(!0)/2,o="fixed"!==i.d.container.css("position")?r.scrollTop():0;i.o.position&&"[object Array]"===Object.prototype.toString.call(i.o.position)?(e=parseFloat(o)+parseFloat(i.o.position[0]||n),t=i.o.position[1]||a):(e=o+n,t=a),i.d.container.css({left:t,top:e})},watchTab:function(t){var i=this;if(e(t.target).parents(".simplemodal-container").length>0){if(i.inputs=e(":input:enabled:visible:first, :input:enabled:visible:last",i.d.data[0]),!t.shiftKey&&t.target===i.inputs[i.inputs.length-1]||t.shiftKey&&t.target===i.inputs[0]||0===i.inputs.length){t.preventDefault();var n=t.shiftKey?"last":"first";i.focus(n)}}else t.preventDefault(),i.focus()},open:function(){var t=this;t.d.iframe&&t.d.iframe.show(),e.isFunction(t.o.onOpen)?t.o.onOpen.apply(t,[t.d]):(t.d.overlay.show(),t.d.container.show(),t.d.data.show()),t.o.focus&&t.focus(),t.bindEvents()},close:function(){var t=this;if(!t.d.data)return!1;if(t.unbindEvents(),e.isFunction(t.o.onClose)&&!t.occb)t.occb=!0,t.o.onClose.apply(t,[t.d]);else{if(t.d.placeholder){var i=e("#simplemodal-placeholder");t.o.persist?i.replaceWith(t.d.data.removeClass("simplemodal-data").css("display",t.display)):(t.d.data.hide().remove(),i.replaceWith(t.d.orig))}else t.d.data.hide().remove();t.d.container.hide().remove(),t.d.overlay.hide(),t.d.iframe&&t.d.iframe.hide().remove(),t.d.overlay.remove(),t.d={}}}}}),define("app/views/add-repo",["jquery","simplemodal","underscore","backbone","common"],function(e,t,i,n,r){"use strict";return n.View.extend({tagName:"div",template:i.template(e("#create-repo-tmpl").html()),initialize:function(t){this.repos=t,this.render(),this.$el.modal(),e("#simplemodal-container").css({height:"auto"}),this.listenTo(t,"invalid",this.displayValidationErrors)},render:function(){return this.$el.html(this.template(this.templateData())),this},templateData:function(){return{showSharePerm:!1,enable_encrypted_library:app.pageOptions.enable_encrypted_library,library_templates:app.pageOptions.library_templates}},events:{submit:"addRepo","click #encrypt-switch":"togglePasswdInput"},newAttributes:function(){var t={name:e.trim(e("input[name=repo_name]",this.$el).val()),encrypted:e("#encrypt-switch").prop("checked"),library_template:e('[name="library_template"]',this.$el).val(),storage_id:e('[name="storage"]',this.$el).val()};return t.encrypted&&e.extend(t,{passwd1:e("input[name=passwd]",this.$el).val(),passwd2:e("input[name=passwd_again]",this.$el).val(),passwd:e("input[name=passwd]",this.$el).val()}),t},displayValidationErrors:function(e,t,i){this.$(".error").html(t).show(),r.enableButton(this.$('[type="submit"]'))},addRepo:function(e){e.preventDefault(),r.disableButton(this.$('[type="submit"]'));var t=this.repos;t.create(this.newAttributes(),{wait:!0,validate:!0,prepend:!0,success:function(){1==t.length&&t.reset(t.models)},error:function(e,t,i){var n=r.prepareAjaxErrorMsg(t);r.feedback(n,"error",r.ERROR_TIMEOUT)},complete:function(){r.closeModal()}})},togglePasswdInput:function(t){var i=e("#encrypt-switch"),n=this.$('input[type="password"]');i.prop("checked")?n.attr("disabled",!1).removeClass("input-disabled"):n.attr("disabled",!0).addClass("input-disabled")}})}),define("app/views/repo-details",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({id:"repo-details",className:"details-panel",template:t.template(e("#repo-details-tmpl").html()),initialize:function(t){var i=this;this.parentView=t.parentView,e(document).on("keydown",function(e){27==e.which&&i.hide()})},events:{"click .js-close":"close"},render:function(){this.$el.html(this.template(this.data))},update:function(e){e.error?this.$("#file-count").html('<span class="error">'+gettext("Error")+"</span>"):this.$("#file-count").html(e.file_count)},hide:function(){this.$el.hide()},close:function(){return this.hide(),!1},show:function(t){this.data=t,this.render(),e("#"+this.id).length?this.$el.show():(this.parentView.$(".main-panel-main-with-side").append(this.$el),this.$el.is(":visible")||this.$el.show())}})}),define("app/views/myhome-repos",["jquery","underscore","backbone","common","app/collections/repos","app/views/repo","app/views/add-repo","app/views/repo-details","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o,d){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#my-own-repos-tmpl").html()),toolbarTemplate:t.template(e("#my-repos-toolbar-tmpl").html()),theadTemplate:t.template(e("#my-repos-thead-tmpl").html()),theadMobileTemplate:t.template(e("#my-repos-thead-mobile-tmpl").html()),events:{"click #my-repos-toolbar .repo-create":"createRepo","click #my-libs-more-op a":"closeDropdown","click #my-repos .by-name":"sortByName","click #my-repos .by-time":"sortByTime"},initialize:function(e){this.repos=new r,this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset),this.repoDetailsView=new o({parentView:this})},addOne:function(e,t,i){var n=new s({model:e,myReposView:this});i.prepend?this.$tableBody.prepend(n.render().el):this.$tableBody.append(n.render().el)},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.repos.length?(this.$emptyTip.hide(),this.renderThead(),this.$tableBody.empty(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.repos.each(this.addOne,this),this.$table.show()):(this.$table.hide(),this.$emptyTip.show()),app.pageOptions.guide_enabled&&(e("#guide-for-new").modal({focus:!1}),e("#simplemodal-container").css({height:"auto"}),app.pageOptions.guide_enabled=!1)},showMyRepos:function(){this.$table.hide(),this.$loadingTip.show();var e=this;this.repos.fetch({cache:!1,reset:!0,success:function(e,t,i){},error:function(t,i,r){e.$loadingTip.hide();var s=e.$(".error"),a=n.prepareCollectionFetchErrorMsg(t,i,r);s.html(a).show()}})},renderThead:function(){var t=e(window).width()>=768?this.theadTemplate:this.theadMobileTemplate;this.$tableHead.html(t())},renderToolbar:function(){this.$toolbar=e('<div class="cur-view-toolbar" id="my-repos-toolbar"></div>').html(this.toolbarTemplate()),this.$(".common-toolbar").before(this.$toolbar),this.more_op_dropdown=new d({el:this.$("#my-libs-more-op")})},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main main-panel-main-with-side" id="my-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableHead=e("thead",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},show:function(){e("#my-repos").length||(this.renderToolbar(),this.renderMainCon()),this.showMyRepos()},hide:function(){this.$toolbar.detach(),this.$mainCon.detach()},createRepo:function(){new a(this.repos)},sortByName:function(){return n.toggleSortByNameMode(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},sortByTime:function(){return n.toggleSortByTimeMode(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},closeDropdown:function(){this.more_op_dropdown.hide()}})}),define("app/models/deleted-repo",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({getIconUrl:function(e){var t=this.get("encrypted");return i.getLibIconUrl(t,!1,e)},getIconTitle:function(){return this.get("encrypted")?gettext("Encrypted library"):gettext("Read-Write library")}})}),define("app/collections/deleted-repos",["underscore","backbone","common","app/models/deleted-repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"deleted_repos"})}})}),define("app/views/deleted-repo",["jquery","underscore","backbone","common","moment","app/views/widgets/hl-item-view"],function(e,t,i,n,r,s){"use strict";return s.extend({tagName:"tr",template:t.template(e("#deleted-repo-tmpl").html()),mobileTemplate:t.template(e("#deleted-repo-mobile-tmpl").html()),events:{"click .restore":"restoreRepo"},initialize:function(){s.prototype.initialize.call(this)},render:function(){var i,s=this.model.toJSON(),a=n.isHiDPI()?48:24,o=this.model.getIconUrl(a),d=r(this.model.get("del_time"));return i=e(window).width()>=768?this.template:this.mobileTemplate,t.extend(s,{icon_url:o,icon_title:this.model.getIconTitle(),time:d.format("LLLL"),time_from_now:n.getRelativeTimeStr(d)}),this.$el.html(i(s)),this},restoreRepo:function(){var t=this;return e.ajax({url:n.getUrl({name:"deleted_repos"}),type:"POST",data:{repo_id:this.model.get("repo_id")},beforeSend:n.prepareCSRFToken,success:function(){t.remove();var e=gettext("Successfully restored library {placeholder}").replace("{placeholder}",t.model.get("repo_name"));n.feedback(e,"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1}})}),define("app/views/my-deleted-repos",["jquery","underscore","backbone","common","app/collections/deleted-repos","app/views/deleted-repo"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#my-deleted-repos-tmpl").html()),theadTemplate:t.template(e("#my-deleted-repos-hd-tmpl").html()),theadMobileTemplate:t.template(e("#my-deleted-repos-hd-mobile-tmpl").html()),events:{},initialize:function(e){this.repos=new r,this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset)},renderMainCon:function(){return this.$mainCon=e('<div class="main-panel-main" id="my-deleted-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableHead=e("thead",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips"),this},addOne:function(e,t,i){var n=new s({model:e});this.$tableBody.append(n.render().el)},renderThead:function(){var t=e(window).width()>=768?this.theadTemplate:this.theadMobileTemplate;this.$tableHead.html(t())},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.repos.length?(this.$emptyTip.hide(),this.renderThead(),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.$table.show()):(this.$table.hide(),this.$emptyTip.show())},showRepos:function(){this.$table.hide(),this.$loadingTip.show();var e=this;this.repos.fetch({cache:!1,reset:!0,success:function(e,t,i){},error:function(t,i,r){e.$loadingTip.hide();var s=n.prepareCollectionFetchErrorMsg(t,i,r);$error.html(s).show()}})},show:function(){this.renderMainCon(),this.showRepos()},hide:function(){this.$mainCon.detach()}})}),define("app/views/shared-repo",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view","app/views/share"],function(e,t,i,n,r,s){"use strict";return r.extend({tagName:"tr",template:t.template(e("#shared-repo-tmpl").html()),mobileTemplate:t.template(e("#shared-repo-mobile-tmpl").html()),events:{"click .repo-share-btn":"share","click .unshare-btn":"removeShare"},initialize:function(){r.prototype.initialize.call(this)},share:function(){var e={is_repo_owner:!1,is_admin:!0,is_virtual:!1,user_perm:"rw",repo_id:this.model.get("id"),repo_encrypted:this.model.get("encrypted"),is_dir:!0,dirent_path:"/",obj_name:this.model.get("name")};return new s(e),!1},removeShare:function(t){var i=this,r=function(t){n.feedback(gettext("Success"),"success",n.SUCCESS_TIMOUT),i.$el.remove(),i.collection.remove(i.model,{silent:!0}),0==i.collection.length&&(e("#repos-shared-to-me table").hide(),e("#repos-shared-to-me .empty-tips").show())};return e.ajax({url:n.getUrl({name:"beshared_repo",repo_id:this.model.get("id")})+"?share_type=personal&from="+encodeURIComponent(this.model.get("owner")),type:"DELETE",beforeSend:n.prepareCSRFToken,dataType:"json",success:r}),!1},render:function(){var i=this.model.toJSON(),r=n.isHiDPI()?48:24,s=this.model.getIconUrl(r),a=e(window).width()>=768?this.template:this.mobileTemplate;return t.extend(i,{icon_url:s,icon_title:this.model.getIconTitle()}),this.$el.html(a(i)),this}})}),define("app/views/myhome-shared-repos",["jquery","underscore","backbone","common","app/collections/repos","app/views/shared-repo"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#repos-shared-to-me-tmpl").html()),theadTemplate:t.template(e("#shared-repos-hd-tmpl").html()),theadMobileTemplate:t.template(e("#shared-repos-hd-mobile-tmpl").html()),initialize:function(e){this.repos=new r({type:"shared"}),this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset)},addOne:function(e,t,i){var n=new s({model:e,collection:this.repos});i.prepend?this.$tableBody.prepend(n.render().el):this.$tableBody.append(n.render().el)},renderThead:function(){var t=e(window).width()>=768?this.theadTemplate:this.theadMobileTemplate;this.$tableHead.html(t())},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.repos.length?(this.$emptyTip.hide(),this.renderThead(),this.$tableBody.empty(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.repos.each(this.addOne,this),this.$table.show()):(this.$emptyTip.show(),this.$table.hide())},showSharedRepos:function(){this.$table.hide();var e=this.$loadingTip;e.show();var t=this;this.repos.fetch({reset:!0,success:function(e,t,i){},error:function(i,r,s){e.hide();var a=t.$(".error"),o=n.prepareCollectionFetchErrorMsg(i,r,s);a.html(o).show()}})},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="shared-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableHead=this.$("thead"),this.$tableBody=this.$("tbody"),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},show:function(){e("#shared-repos").length||this.renderMainCon(),this.showSharedRepos()},hide:function(){this.$mainCon.detach()},events:{"click #shared-repos .by-name":"sortByName","click #shared-repos .by-time":"sortByTime"},sortByName:function(){return n.toggleSortByNameMode(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},sortByTime:function(){return n.toggleSortByTimeMode(),n.updateSortIconByMode({context:this.$table}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1}})}),define("app/models/group",["underscore","backbone"],function(e,t){"use strict";return t.Model.extend({})}),define("app/collections/groups",["underscore","backbone","common","app/models/group"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,comparator:function(e,t){return i.compareTwoWord(e.get("name"),t.get("name"))},url:function(){return i.getUrl({name:"groups"})}})}),define("app/models/group-repo",["underscore","backbone","app/models/repo"],function(e,t,i){"use strict";var n=i.extend({defaults:{permission:"r"}});return e.extend(n.prototype.defaults,i.prototype.defaults),n}),define("app/collections/group-repos",["underscore","backbone","common","app/models/group-repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,comparator:NaN,url:function(){return i.getUrl({name:"group_repos",group_id:this.group_id})},parse:function(e){return this.is_staff=e.is_staff,e.repos},setGroupID:function(e){this.group_id=e}})}),define("app/views/group-repo",["jquery","underscore","backbone","common","app/views/share","app/views/dialogs/repo-folder-perm-admin","app/views/widgets/hl-item-view","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o){"use strict";return a.extend({tagName:"tr",template:t.template(e("#group-repo-tmpl").html()),mobileTemplate:t.template(e("#group-repo-mobile-tmpl").html()),renameTemplate:t.template(e("#repo-rename-form-template").html()),events:{"click .delete-repo":"delRepo","click .js-set-repo-perm":"setRepoPerm","click .js-repo-rename":"renameRepo","click .js-repo-details":"viewDetails",click:"clickItem","click .cancel-share":"unshare","click .repo-share-btn":"share"},initialize:function(e){a.prototype.initialize.call(this),this.group_id=e.group_id,this.is_staff=e.is_staff,this.show_repo_owner=e.show_repo_owner,this.repoDetailsView=e.repoDetailsView,this.listenTo(this.model,"change",this.render),this.listenTo(this.model,"destroy",this.remove)},delRepo:function(){var t=this;return e.ajax({url:n.getUrl({name:"group_owned_repo",group_id:this.group_id,repo_id:this.model.get("id")}),type:"DELETE",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){var e=gettext("Successfully deleted library {placeholder}").replace("{placeholder}",t.model.get("name"));t.remove(),n.feedback(e,"success")},error:function(e,t,i){n.ajaxErrorHandler(e,t,i)}}),!1},setRepoPerm:function(){var e={is_group_owned_repo:!0,repo_name:this.model.get("name"),repo_id:this.model.get("id")};return new s(e),this._hideMenu(),!1},_hideMenu:function(){this.dropdown.hide()},renameRepo:function(){var t=this.model.get("name"),i=e(this.renameTemplate({repo_name:t})),r=this.$(".repo-name-span"),s=this.$(".repo-op-td"),a=r.closest("td");a.attr("colspan",2).css({width:r.width()+s.outerWidth(),height:r.height()}).append(i),s.hide(),r.hide(),e('[name="newname"]',i).trigger("select"),this._hideMenu(),app.ui.freezeItemHightlight=!0;var o=function(){return app.ui.freezeItemHightlight=!1,i.remove(),s.show(),r.show(),a.attr("colspan",1).css({width:r.width()}),!1};e(".cancel",i).on("click",o);var d=(i.attr("id"),this);return i.on("submit",function(){var r,s=e.trim(e('[name="newname"]',i).val());if(!s)return r=gettext("It is required."),n.feedback(r,"error"),!1;if(-1!=s.indexOf("/"))return r=gettext("Name should not include '/'."),n.feedback(r,"error"),!1;if(s==t)return o(),!1
;var a=e('[type="submit"]',i);return n.disableButton(a),e.ajax({url:n.getUrl({name:"group_owned_repo",group_id:d.group_id,repo_id:d.model.get("id")}),type:"PUT",dataType:"json",beforeSend:n.prepareCSRFToken,data:{name:s},success:function(e){app.ui.freezeItemHightlight=!1,d.model.set({name:e.name})},error:function(e){n.prepareAjaxErrorMsg(e);n.feedback(r,"error"),n.enableButton(a)}}),!1}),!1},viewDetails:function(){var t=this.model.toJSON(),i=n.isHiDPI()?48:24,r=e.extend({},t,{icon_url:this.model.getIconUrl(i),big_icon_url:this.model.getIconUrl()}),s=this.repoDetailsView;return s.show(r),e.ajax({url:n.getUrl({name:"repo_v2.1",repo_id:this.model.get("id")}),cache:!1,dataType:"json",success:function(e){s.update({file_count:e.file_count})},error:function(){s.update({error:!0})}}),this._hideMenu(),!1},clickItem:function(e){var t=e.target||event.srcElement;this.model.get("owner")==this.group_id+"@seafile_group"&&this.$("td").is(t)&&this.repoDetailsView.$el.is(":visible")&&this.viewDetails()},render:function(){var t,i=this.model.toJSON(),r=n.isHiDPI()?48:24,s=this.model.getIconUrl(r),a=e(window).width()>=768?this.template:this.mobileTemplate,d=!1;-1==i.owner.indexOf("@seafile_group")?t=this.model.get("owner_nickname")||this.model.get("owner_name"):(t=i.group_name,d=!0),e.extend(i,{group_id:this.group_id,is_group_owned_repo:d,is_staff:this.is_staff,is_repo_owner:app.pageOptions.username==this.model.get("owner"),owner_name:t,show_repo_owner:this.show_repo_owner,icon_url:s,icon_title:this.model.getIconTitle()}),this.$el.html(a(i));var l={};return e(window).width()<768&&(l={right:0}),this.dropdown=new o(e.extend({el:this.$(".sf-dropdown")},l)),this},share:function(){var t={is_repo_owner:app.pageOptions.username==this.model.get("owner"),is_virtual:!1,user_perm:"rw",repo_id:this.model.get("id"),repo_encrypted:this.model.get("encrypted"),is_dir:!0,dirent_path:"/",obj_name:this.model.get("name")};return app.pageOptions.is_pro&&(t.is_admin=this.model.get("is_admin"),this.is_staff&&this.model.get("owner")==this.group_id+"@seafile_group"&&e.extend(t,{is_address_book_group_admin:!0,is_group_owned_repo:!0})),new r(t),!1},unshare:function(){this.model.get("name");return this.model.destroy({wait:!0,success:function(){var e=gettext("Successfully unshared 1 item.");n.feedback(e,"success",n.SUCCESS_TIMOUT)},error:function(e,t){var i=n.prepareAjaxErrorMsg(t);n.feedback(i,"error")}}),!1}})}),define("app/views/group-item",["jquery","underscore","backbone","common","app/collections/group-repos","app/views/group-repo","app/models/group-repo"],function(e,t,i,n,r,s,a){"use strict";return i.View.extend({template:t.template(e("#group-item-tmpl").html()),mobileTemplate:t.template(e("#group-item-mobile-tmpl").html()),events:{},initialize:function(e){this.repoDetailsView=e.repoDetailsView},render:function(){var t=e(window).width()>=768?this.template:this.mobileTemplate;this.$el.html(t(this.model.attributes));var i=this.model.get("repos");return i.length&&this.renderRepoList(i),this},renderRepoList:function(t){t.sort(function(e,t){return n.compareTwoWord(e.name,t.name)});var i=this.model.get("id"),o=-1!=e.inArray(app.pageOptions.username,this.model.get("admins")),d=this.repoDetailsView,l=this.$("tbody"),c=new r;c.setGroupID(i),e(t).each(function(e,t){var n=new s({model:new a(t,{collection:c}),group_id:i,is_staff:o,repoDetailsView:d,show_repo_owner:!1});l.append(n.render().el)})}})}),define("app/views/groups",["jquery","underscore","backbone","common","app/collections/groups","app/views/repo-details","app/views/group-item"],function(e,t,i,n,r,s,a){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#groups-tmpl").html()),toolbarTemplate:t.template(e("#groups-toolbar-tmpl").html()),addGroupTemplate:t.template(e("#add-group-form-tmpl").html()),initialize:function(e){this.groups=new r,this.listenTo(this.groups,"add",this.addOne),this.listenTo(this.groups,"reset",this.reset),this.repoDetailsView=new s({parentView:this})},events:{"click #add-group":"addGroup"},addOne:function(e,t,i){var n=new a({model:e,repoDetailsView:this.repoDetailsView});i.prepend?this.$groupList.prepend(n.render().el):this.$groupList.append(n.render().el)},reset:function(){this.$error.hide(),this.$loadingTip.hide(),this.groups.length?(this.$emptyTip.hide(),this.$groupList.empty(),this.groups.each(this.addOne,this),this.$groupList.show()):(this.$emptyTip.show(),this.$groupList.hide())},renderToolbar:function(){this.$toolbar=e('<div class="cur-view-toolbar" id="groups-toolbar"></div>').html(this.toolbarTemplate()),this.$(".common-toolbar").before(this.$toolbar)},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main main-panel-main-with-side" id="groups"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$loadingTip=this.$(".loading-tip"),this.$groupList=this.$("#group-list"),this.$emptyTip=this.$(".empty-tips"),this.$error=this.$(".error")},showGroups:function(){this.$groupList.hide(),this.$emptyTip.hide(),this.$loadingTip.show();var e=this;this.groups.fetch({cache:!1,data:{with_repos:1},reset:!0,success:function(e,t,i){},error:function(t,i,r){var s=n.prepareCollectionFetchErrorMsg(t,i,r);e.$loadingTip.hide(),e.$error.html(s).show()}})},show:function(){this.renderToolbar(),this.renderMainCon(),this.showGroups()},hide:function(){this.$toolbar.detach(),this.$mainCon.detach()},addGroup:function(){var t=e(this.addGroupTemplate());t.modal(),e("#simplemodal-container").css({height:"auto"});var i=this.groups,r=this;t.on("submit",function(){var s=e.trim(e('[name="group_name"]',t).val()),a=e(".error",t),o=e('[type="submit"]',t);return s?(a.hide(),n.disableButton(o),i.create({name:s,repos:[]},{wait:!0,validate:!0,prepend:!0,success:function(){1==i.length&&r.reset(),app.ui.sideNavView.updateGroups(),n.closeModal()},error:function(e,t,i){var r=n.prepareAjaxErrorMsg(t);a.html(r).show(),n.enableButton(o)}}),!1):(a.html(gettext("It is required.")).show(),!1)})}})}),define("app/collections/group-owned-repos",["underscore","backbone","common","app/models/group-repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,comparator:NaN,url:function(){return i.getUrl({name:"group_owned_repos",group_id:this.group_id})},parse:function(e){},setGroupID:function(e){this.group_id=e}})}),define("app/views/add-group-repo",["jquery","simplemodal","underscore","backbone","common","app/views/add-repo"],function(e,t,i,n,r,s){"use strict";return s.extend({templateData:function(){return{showSharePerm:!0,enable_encrypted_library:app.pageOptions.enable_encrypted_library,library_templates:app.pageOptions.library_templates}},newAttributes:function(){var t=s.prototype.newAttributes.apply(this);return i.extend(t,{permission:e("select[name=permission]",this.$el).val()})}})}),define("app/views/add-department-repo",["jquery","simplemodal","underscore","backbone","common","app/views/add-repo"],function(e,t,i,n,r,s){"use strict";return s.extend({template:i.template(e("#create-department-repo-tmpl").html()),templateData:function(){return{}},newAttributes:function(){return{name:e.trim(e("input[name=repo_name]",this.$el).val()),permission:e("select[name=permission]",this.$el).val()}}})}),define("app/collections/group-members",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({setGroupId:function(e){this.group_id=e},url:function(){return i.getUrl({name:"group_members",group_id:this.group_id})}})}),define("app/views/group-member",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"li",className:"user-item cspt ovhd",template:t.template(e("#group-member-tmpl").html()),events:{mouseenter:"highlight",mouseleave:"rmHighlight",click:"visitMemberProfile"},initialize:function(e){this.is_owner=e.is_owner},render:function(){var t={is_owner:this.is_owner};return e.extend(t,this.model.attributes),this.$el.html(this.template(t)),this},highlight:function(){this.$el.addClass("hl")},rmHighlight:function(){this.$el.removeClass("hl")},visitMemberProfile:function(){location.href=n.getUrl({name:"user_profile",username:encodeURIComponent(this.model.get("email"))})}})}),define("app/views/widgets/popover",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return e(document).on("click",function(e){var t=app.ui.currentPopover,i=e.target||event.srcElement;return!t||(t.$el.is(i)||t.$el.find("*").is(i)||t.hide(),!0)}),e(document).on("keydown",function(e){if(27==e.keyCode){var t=app.ui.currentPopover;t&&t.hide()}}),e(window).on("resize",function(){var e=app.ui.currentPopover;if(!e)return!0;e.setConMaxHeight()}),i.View.extend({initialize:function(e){this.$el.on("click",".js-close",t.bind(this.hide,this))},setConMaxHeight:function(){this.$(".sf-popover-con").css({"max-height":e(window).height()-this.$el.offset().top-this.$(".sf-popover-hd").outerHeight(!0)-2})},hide:function(){return app.ui.currentPopover=null,this.$el.detach(),!1},show:function(){app.ui.currentPopover=this,this.showContent(),this.setConMaxHeight()},toggle:function(){return app.ui.currentPopover?app.ui.currentPopover!=this?(app.ui.currentPopover.hide(),this.show()):this.hide():this.show(),!1}})}),define("app/views/group-members",["jquery","underscore","backbone","common","app/collections/group-members","app/views/group-member","app/views/widgets/popover"],function(e,t,i,n,r,s,a){"use strict";return a.extend({id:"group-members",className:"sf-popover",template:t.template(e("#group-members-tmpl").html()),initialize:function(e){a.prototype.initialize.call(this),this.groupView=e.groupView,this.collection=new r,this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"reset",this.reset),this.render()},events:{},addOne:function(e,t,i){var n=!1;e.get("email")===this.groupView.group.owner&&(n=!0);var r=new s({is_owner:n,model:e});this.$listContainer.append(r.render().el)},reset:function(){this.$error.hide(),this.$loadingTip.hide(),this.$listContainer.empty(),this.collection.each(this.addOne,this),this.$listContainer.show()},render:function(){this.$el.html(this.template()),this.$loadingTip=this.$(".loading-tip"),this.$listContainer=this.$("#group-member-list"),this.$error=this.$(".error")},showContent:function(){this.$listContainer.hide(),this.$loadingTip.show();var t=this;this.collection.setGroupId(this.groupView.group.id),this.collection.fetch({cache:!1,reset:!0,data:{avatar_size:64},success:function(e,t,i){},error:function(e,i,r){var s=n.prepareCollectionFetchErrorMsg(e,i,r);t.$error.html(s).show(),t.$loadingTip.hide()}}),e("#group-members-icon").after(this.$el)}})}),define("app/models/group-discussion",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({})}),define("app/collections/group-discussions",["underscore","backbone","common","app/models/group-discussion"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,setGroupId:function(e){this.group_id=e},url:function(){return i.getUrl({name:"group_discussions",group_id:this.group_id})},parse:function(e){return this.current_page=e.current_page,this.page_num=e.page_num,e.msgs}})}),function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=c.normal,this.options.gfm&&(this.options.tables?this.rules=c.tables:this.rules=c.gfm)}function t(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=u.breaks:this.rules=u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function i(e){this.options=e||{}}function n(e){this.tokens=[],this.token=null,this.options=e||l.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options}function r(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function s(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function a(e,t){return e=e.source,t=t||"",function i(n,r){return n?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(n,r),i):new RegExp(e,t)}}function o(){}function d(e){for(var t,i,n=1;n<arguments.length;n++){t=arguments[n];for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}function l(t,i,s){if(s||"function"==typeof i){s||(s=i,i=null),i=d({},l.defaults,i||{});var a,o,c=i.highlight,u=0;try{a=e.lex(t,i)}catch(e){return s(e)}o=a.length;var h=function(e){if(e)return i.highlight=c,s(e);var t;try{t=n.parse(a,i)}catch(t){e=t}return i.highlight=c,e?s(e):s(null,t)};if(!c||c.length<3)return h();if(delete i.highlight,!o)return h();for(;u<a.length;u++)!function(e){"code"!==e.type?--o||h():c(e.text,e.lang,function(t,i){return t?h(t):null==i||i===e.text?--o||h():(e.text=i,e.escaped=!0,void(--o||h()))})}(a[u])}else try{return i&&(i=d({},l.defaults,i)),n.parse(e.lex(t,i),i)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(i||l.defaults).silent)return"<p>An error occured:</p><pre>"+r(e.message+"",!0)+"</pre>";throw e}}var c={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};c.bullet=/(?:[*+-]|\d+\.)/,c.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,c.item=a(c.item,"gm")(/bull/g,c.bullet)(),c.list=a(c.list)(/bull/g,c.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+c.def.source+")")(),c.blockquote=a(c.blockquote)("def",c.def)(),c._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",c.html=a(c.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,c._tag)(),c.paragraph=a(c.paragraph)("hr",c.hr)("heading",c.heading)("lheading",c.lheading)("blockquote",c.blockquote)("tag","<"+c._tag)("def",c.def)(),c.normal=d({},c),c.gfm=d({},c.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),c.gfm.paragraph=a(c.paragraph)("(?!","(?!"+c.gfm.fences.source.replace("\\1","\\2")+"|"+c.list.source.replace("\\1","\\3")+"|")(),c.tables=d({},c.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=c,e.lex=function(t,i){return new e(i).lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,i){for(var n,r,s,a,o,d,l,u,h,e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e))e=e.substring(s[0].length),s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?s:s.replace(/\n+$/,"")});else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if(t&&(s=this.rules.nptable.exec(e))){for(e=e.substring(s[0].length),d={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/\n$/,"").split("\n")},u=0;u<d.align.length;u++)/^ *-+: *$/.test(d.align[u])?d.align[u]="right":/^ *:-+: *$/.test(d.align[u])?d.align[u]="center":/^ *:-+ *$/.test(d.align[u])?d.align[u]="left":d.align[u]=null;for(u=0;u<d.cells.length;u++)d.cells[u]=d.cells[u].split(/ *\| */);this.tokens.push(d)}else if(s=this.rules.lheading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:"="===s[2]?1:2,text:s[1]});else if(s=this.rules.hr.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"hr"});else if(s=this.rules.blockquote.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"blockquote_start"}),s=s[0].replace(/^ *> ?/gm,""),this.token(s,t,!0),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a=s[2],this.tokens.push({type:"list_start",ordered:a.length>1}),s=s[0].match(this.rules.item),n=!1,h=s.length,u=0;u<h;u++)d=s[u],l=d.length,d=d.replace(/^ *([*+-]|\d+\.) +/,""),~d.indexOf("\n ")&&(l-=d.length,d=this.options.pedantic?d.replace(/^ {1,4}/gm,""):d.replace(new RegExp("^ {1,"+l+"}","gm"),"")),this.options.smartLists&&u!==h-1&&(o=c.bullet.exec(s[u+1])[0],a===o||a.length>1&&o.length>1||(e=s.slice(u+1).join("\n")+e,u=h-1)),r=n||/\n\n(?!\s*$)/.test(d),u!==h-1&&(n="\n"===d.charAt(d.length-1),r||(r=n)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(d,!1,i),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(s=this.rules.html.exec(e))e=e.substring(s[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===s[1]||"script"===s[1]||"style"===s[1]),text:s[0]});else if(!i&&t&&(s=this.rules.def.exec(e)))e=e.substring(s[0].length),this.tokens.links[s[1].toLowerCase()]={href:s[2],title:s[3]};else if(t&&(s=this.rules.table.exec(e))){for(e=e.substring(s[0].length),d={type:"table",header:s[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<d.align.length;u++)/^ *-+: *$/.test(d.align[u])?d.align[u]="right":/^ *:-+: *$/.test(d.align[u])?d.align[u]="center":/^ *:-+ *$/.test(d.align[u])?d.align[u]="left":d.align[u]=null;for(u=0;u<d.cells.length;u++)d.cells[u]=d.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(d)}else if(t&&(s=this.rules.paragraph.exec(e)))e=e.substring(s[0].length),this.tokens.push({type:"paragraph",text:"\n"===s[1].charAt(s[1].length-1)?s[1].slice(0,-1):s[1]});else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"text",text:s[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var u={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};u._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,u._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=a(u.link)("inside",u._inside)("href",u._href)(),u.reflink=a(u.reflink)("inside",u._inside)(),u.normal=d({},u),u.pedantic=d({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=d({},u.normal,{escape:a(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=d({},u.gfm,{br:a(u.br)("{2,}","*")(),text:a(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,i,n){return new t(i,n).output(e)},t.prototype.output=function(e){for(var t,i,n,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),"@"===s[2]?(i=":"===s[1].charAt(6)?this.mangle(s[1].substring(7)):this.mangle(s[1]),n=this.mangle("mailto:")+i):(i=r(s[1]),n=i),a+=this.renderer.link(n,null,i);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):r(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,a+=this.outputLink(s,{href:s[2],title:s[3]}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(r(s[2],!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(r(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(s[0].length),i=r(s[1]),n=i,a+=this.renderer.link(n,null,i);return a},t.prototype.outputLink=function(e,t){var i=r(t.href),n=t.title?r(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(i,n,this.output(e[1])):this.renderer.image(i,n,r(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,i="",n=e.length,r=0;r<n;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),i+="&#"+t+";";return i},i.prototype.code=function(e,t,i){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(i=!0,e=n)}return t?'<pre><code class="'+this.options.langPrefix+r(t,!0)+'">'+(i?e:r(e,!0))+"\n</code></pre>\n":"<pre><code>"+(i?e:r(e,!0))+"\n</code></pre>"},i.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,i){return"<h"+t+' id="'+this.options.headerPrefix+i.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(e,t){var i=t?"ol":"ul";return"<"+i+">\n"+e+"</"+i+">\n"},i.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},i.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},i.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},i.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.prototype.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"},i.prototype.strong=function(e){return"<strong>"+e+"</strong>"},i.prototype.em=function(e){return"<em>"+e+"</em>"},i.prototype.codespan=function(e){return"<code>"+e+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(e){return"<del>"+e+"</del>"},i.prototype.link=function(e,t,i){if(this.options.sanitize){try{var n=decodeURIComponent(s(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:"))return""}var r='<a href="'+e+'"';return t&&(r+=' title="'+t+'"'),r+=">"+i+"</a>"},i.prototype.image=function(e,t,i){var n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">"},i.prototype.text=function(e){return e},n.parse=function(e,t,i){return new n(t,i).parse(e)},n.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var i="";this.next();)i+=this.tok();return i},n.prototype.next=function(){return this.token=this.tokens.pop()},n.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},n.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},n.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,i,n,r="",s="";for(i="",e=0;e<this.token.header.length;e++)({header:!0,align:this.token.align[e]}),i+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(r+=this.renderer.tablerow(i),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],i="",n=0;n<t.length;n++)i+=this.renderer.tablecell(this.inline.output(t[n]),{header:!1,align:this.token.align[n]});s+=this.renderer.tablerow(i)}return this.renderer.table(r,s);case"blockquote_start":for(var s="";"blockquote_end"!==this.next().type;)s+=this.tok();return this.renderer.blockquote(s);case"list_start":for(var s="",a=this.token.ordered;"list_end"!==this.next().type;)s+=this.tok();return this.renderer.list(s,a);case"list_item_start":for(var s="";"list_item_end"!==this.next().type;)s+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(s);case"loose_item_start":for(var s="";"list_item_end"!==this.next().type;)s+=this.tok();return this.renderer.listitem(s);case"html":var o=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(o);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},o.exec=o,l.options=l.setOptions=function(e){return d(l.defaults,e),l},l.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new i,xhtml:!1},l.Parser=n,l.parser=n.parse,l.Renderer=i,l.Lexer=e,l.lexer=e.lex,l.InlineLexer=t,l.inlineLexer=t.output,l.parse=l,"undefined"!=typeof module&&"object"==typeof exports?module.exports=l:"function"==typeof define&&define.amd?define("marked",[],function(){return l}):this.marked=l}.call(function(){return this||("undefined"!=typeof window?window:global)}()),define("app/views/group-discussion",["jquery","underscore","backbone","common","marked","moment"],function(e,t,i,n,r,s){"use strict";return i.View.extend({tagName:"li",className:"msg ovhd",template:t.template(e("#group-discussion-tmpl").html()),events:{mouseenter:"highlight",mouseleave:"rmHighlight","focus *":"focusItem","click .js-del-msg":"delMessage","click .js-reply-msg":"reply"},initialize:function(e){this.listenTo(this.model,"destroy",this.remove),this.parentView=e.parentView,this.is_group_owner=e.is_group_owner,this.is_group_admin=e.is_group_admin},render:function(){var e=this.model.attributes,i=s(e.created_at),a=!1;(this.is_group_owner||this.is_group_admin||this.model.get("user_email")==app.pageOptions.username)&&(a=!0);var o=n.getUrl({name:"user_profile",username:encodeURIComponent(e.user_email)});return t.extend(e,{content_marked:r(e.content,{breaks:!0,sanitize:!0}),time:i.format("LLLL"),time_from_now:n.getRelativeTimeStr(i),can_delete_msg:a,user_profile_url:o}),this.$el.html(this.template(e)),this},highlight:function(){this.$el.addClass("hl"),this.$(".msg-ops").removeClass("vh")},rmHighlight:function(){this.$el.removeClass("hl"),this.$(".msg-ops").addClass("vh")},focusItem:function(){e(".msg.hl",this.$el.parent()).removeClass("hl").find(".msg-ops").addClass("vh"),this.highlight()},reply:function(){return this.parentView.replyTo(this.model.get("user_name")),!1},delMessage:function(){return this.model.destroy({wait:!0,success:function(){},error:function(e,t){var i=n.prepareAjaxErrorMsg(t);n.feedback(i,"error")}}),!1}})}),define("app/views/group-discussions",["jquery","underscore","backbone","common","app/collections/group-discussions","app/views/group-discussion"],function(e,t,i,n,r,s){"use strict";return i.View.extend({id:"group-discussions",className:"comments-panel",template:t.template(e("#group-discussions-tmpl").html()),initialize:function(t){this.groupView=t.groupView,this.collection=new r,this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"reset",this.reset),this.render();var i=this;e(document).on("keydown",function(e){27==e.which&&i.hide()})},events:{"click .js-close":"close","click .js-load-more":"loadMore","submit form":"formSubmit"},addOne:function(e,t,i){var n=new s({model:e,is_group_owner:this.is_group_owner,is_group_admin:this.is_group_admin,parentView:this});i.prepend?this.$listContainer.append(n.render().el):this.$listContainer.prepend(n.render().el)},reset:function(){this.$error.hide(),this.$loadingTip.hide(),this.$listContainer.empty(),this.collection.length?(this.$emptyTip.hide(),this.collection.each(this.addOne,this),this.$listContainer.show(),this.collection.current_page<this.collection.page_num?this.$loadMore.show():this.$loadMore.hide(),this.scrollConToBottom()):(this.$emptyTip.show(),this.$listContainer.hide(),this.$loadMore.hide())},render:function(){this.$el.html(this.template()),this.$con=this.$("#group-discussions-con"),this.$loadingTip=this.$(".loading-tip"),this.$listContainer=this.$("#group-discussion-list"),this.$emptyTip=this.$(".no-discussion-tip"),this.$error=this.$(".error"),this.$loadMore=this.$(".js-load-more")},showContent:function(){this.$listContainer.hide(),this.$loadingTip.show();var t=this;this.is_group_owner=!1,this.is_group_admin=!1,app.pageOptions.username==this.groupView.group.owner?this.is_group_owner=!0:-1!=e.inArray(app.pageOptions.username,this.groupView.group.admins)&&(this.is_group_admin=!0),this.collection.setGroupId(this.groupView.group.id),this.collection.fetch({cache:!1,reset:!0,data:{avatar_size:64},success:function(e,t,i){},error:function(e,i,r){t.$loadingTip.hide();var s=n.prepareCollectionFetchErrorMsg(e,i,r);t.$error.html(s).show()}})},hide:function(){this.$el.hide()},close:function(){return this.hide(),!1},toggle:function(){return this.$el.is(":visible")?this.hide():this.show(),!1},show:function(){e("#"+this.id).length?this.$el.show():(this.groupView.$mainCon.append(this.$el),this.$el.is(":visible")||this.$el.show()),this.showContent()},replyTo:function(e){var t="@"+e+" ",i=this.$('[name="message"]').val(t);n.setCaretPosition(i[0],t.length),i.trigger("focus")},loadMore:function(){var t=this;this.$loadMore.hide(),this.$loadingTip.show(),this.collection.fetch({cache:!1,remove:!1,data:{avatar_size:64,page:this.collection.current_page+1},success:function(i,n,r){var s=0;t.$(".msg:lt("+n.msgs.length+")").each(function(){s+=e(this).outerHeight(!0)}),t.$con.scrollTop(s-50)},error:function(e,i,r){var s=n.prepareCollectionFetchErrorMsg(e,i,r);t.$error.html(s).show()},complete:function(){t.$loadingTip.hide(),t.collection.current_page<t.collection.page_num?t.$loadMore.show():t.$loadMore.hide()}})},formSubmit:function(){var t=this,i=e.trim(this.$('[name="message"]').val());return!!i&&(this.collection.create({content:i,avatar_size:64},{wait:!0,validate:!0,prepend:!0,success:function(){t.$('[name="message"]').val(""),
1==t.collection.length?t.collection.reset(t.collection.models):t.scrollConToBottom()},error:function(e,i,r){var s=n.prepareAjaxErrorMsg(i);t.$error.html(s).show()}}),!1)},scrollConToBottom:function(){var e=this.$con;e.scrollTop(e[0].scrollHeight-e[0].clientHeight)}})}),define("app/views/group-manage-member",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",template:t.template(e("#group-manage-member-tmpl").html()),events:{mouseenter:"highlight",mouseleave:"rmHighlight","click .role-edit-icon":"showEdit","change .role-edit":"editRole","click .rm":"rmMember"},initialize:function(e){this.group_id=e.group_id,this.is_owner=e.is_owner,this.$errorContainer=e.errorContainer,this.listenTo(this.model,"change",this.render)},render:function(){return this.$el.html(this.template(e.extend(this.model.attributes,{is_owner:this.is_owner,username:app.pageOptions.username}))),this},highlight:function(){this.$el.addClass("hl").find(".op-icon").removeClass("vh")},rmHighlight:function(){this.$el.removeClass("hl").find(".op-icon").addClass("vh")},showEdit:function(){this.$(".cur-role, .role-edit-icon").hide(),this.$(".role-edit").show()},editRole:function(){var t=this,i=this.$('[name="role"]').val(),r=1==i;e.ajax({url:n.getUrl({name:"group_member",group_id:this.group_id,email:encodeURIComponent(this.model.get("email"))}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{is_admin:r},success:function(){t.model.set({is_admin:r})},error:function(e){var i=n.prepareAjaxErrorMsg(e);t.$errorContainer.html(i).show()}})},rmMember:function(){var t=this;e.ajax({url:n.getUrl({name:"group_member",group_id:this.group_id,email:encodeURIComponent(this.model.get("email"))}),type:"delete",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){t.remove()},error:function(e){var i=n.prepareAjaxErrorMsg(e);t.$errorContainer.html(i).show()}})}})}),define("app/views/group-manage-members",["jquery","underscore","backbone","common","app/collections/group-members","app/views/group-manage-member"],function(e,t,i,n,r,s){"use strict";return i.View.extend({template:t.template(e("#group-manage-members-tmpl").html()),initialize:function(t){this.group_id=t.group_id,this.group_name=t.group_name,this.is_owner=t.is_owner,this.render(),this.$(".op-target").css({"max-width":270}),this.$el.modal({focus:!1,containerCss:{width:560},onClose:function(){e(document).off("click",s),e.modal.close()}}),this.$modalContainer=e("#simplemodal-container").css({height:"auto"}),this.$('[name="user_name"]').select2(e.extend({width:"320px"},n.contactInputOptionsForSelect2())),this.collection=new r,this.listenTo(this.collection,"add",this.addOne),this.renderMemberList(),this.setConMaxHeight(),this.$loadingTip=this.$(".loading-tip"),this.$listContainer=this.$("tbody"),this.$error=this.$(".error");var i=this;e(window).on("resize",function(){i.setConMaxHeight()});var s=function(e){var t=e.target||event.srcElement,n=i.$(".role-edit:visible"),r=n.parent();!n.length||n.is(t)||n.find("*").is(t)||r.find(".role-edit-icon").is(t)||(n.hide(),r.find(".cur-role, .role-edit-icon").show())};e(document).on("click",s)},render:function(){var e=gettext("{placeholder} Members").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(this.group_name)+'">'+n.HTMLescape(this.group_name)+"</span>");return this.$el.html(this.template({title:e,is_owner:this.is_owner})),this},events:{"click .invite-link-in-popup":"closePopup","submit form":"formSubmit"},closePopup:function(){e.modal.close()},addOne:function(e,t,i){var n=new s({model:e,group_id:this.group_id,is_owner:this.is_owner,errorContainer:this.$error});i.prepend?this.$listContainer.prepend(n.render().el):this.$listContainer.append(n.render().el)},renderMemberList:function(){var e=this;this.collection.setGroupId(this.group_id),this.collection.fetch({cache:!1,data:{avatar_size:40},success:function(t,i,n){e.$loadingTip.hide()},error:function(t,i,r){var s=n.prepareCollectionFetchErrorMsg(t,i,r);e.$loadingTip.hide(),e.$error.html(s).show()}})},formSubmit:function(){var t=this,i=this.$('[name="user_name"]'),r=e.trim(i.val());return!!r&&(1==r.split(",").length?this.collection.create({email:r},{wait:!0,validate:!0,prepend:!0,success:function(){i.select2("val","")},error:function(e,i,r){var s=n.prepareAjaxErrorMsg(i);t.$error.html(s).show()}}):e.ajax({url:n.getUrl({name:"group_member_bulk",group_id:t.group_id}),type:"post",dataType:"json",beforeSend:n.prepareCSRFToken,data:{emails:r},success:function(r){i.select2("val",""),r.success.length>0&&t.collection.add(r.success,{prepend:!0});var s="";r.failed.length>0&&(e(r.failed).each(function(e,t){s+=n.HTMLescape(t.email)+": "+n.HTMLescape(t.error_msg)+"<br />"}),t.$error.html(s).show())},error:function(e){var i=n.prepareAjaxErrorMsg(e);t.$error.html(i).show()}}),!1)},setConMaxHeight:function(){var t=this.$modalContainer;this.$(".members").css({"max-height":e(window).height()-parseInt(t.css("top"))-parseInt(t.css("padding-top"))-parseInt(t.css("padding-bottom"))-this.$("h3").outerHeight(!0)-this.$("form").outerHeight(!0)-20,overflow:"auto"})}})}),define("app/views/group-settings",["jquery","underscore","backbone","common","app/views/group-manage-members","app/views/widgets/popover"],function(e,t,i,n,r,s){"use strict";return s.extend({id:"group-settings",className:"sf-popover",template:t.template(e("#group-settings-tmpl").html()),contentTemplate:t.template(e("#group-settings-content-tmpl").html()),renameTemplate:t.template(e("#group-rename-form-tmpl").html()),transferTemplate:t.template(e("#group-transfer-form-tmpl").html()),importMembersTemplate:t.template(e("#group-import-members-form-tmpl").html()),initialize:function(e){s.prototype.initialize.call(this),this.groupView=e.groupView,this.render()},events:{"mouseenter .group-setting-item":"highlightItem","mouseleave .group-setting-item":"rmHighlightItem","click .group-setting-item":"manageGroup"},render:function(){this.$el.html(this.template())},showContent:function(){this.$listContainer=this.$(".sf-popover-con"),this.is_owner=!1,this.is_admin=!1,app.pageOptions.username==this.groupView.group.owner?this.is_owner=!0:-1!=e.inArray(app.pageOptions.username,this.groupView.group.admins)&&(this.is_admin=!0),this.$listContainer.html(this.contentTemplate({is_owner:this.is_owner,is_admin:this.is_admin,wiki_enabled:this.groupView.group.wiki_enabled})),e("#group-settings-icon").after(this.$el)},highlightItem:function(t){e(t.currentTarget).addClass("hl")},rmHighlightItem:function(t){e(t.currentTarget).removeClass("hl")},manageGroup:function(t){switch(e(t.currentTarget).data("op")){case"rename":this.rename();break;case"transfer":this.transfer();break;case"add-wiki":this.toggleWiki("on");break;case"remove-wiki":this.toggleWiki("off");break;case"import-members":this.importMembers();break;case"manage-members":this.manageMembers();break;case"dismiss":this.dismiss();break;case"leave":this.leave()}return this.hide(),!1},rename:function(){var t=this,i=e(this.renameTemplate());i.modal(),e("#simplemodal-container").css({width:"auto",height:"auto"}),i.on("submit",function(){var r=e.trim(e('[name="new_name"]',e(this)).val());if(!r||r==t.groupView.group.name)return!1;var s=e('[type="submit"]',e(this));return n.disableButton(s),e.ajax({url:n.getUrl({name:"group",group_id:t.groupView.group.id}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{name:r},success:function(){e.modal.close(),t.groupView.updateName(r),app.ui.sideNavView.updateGroups()},error:function(t){var r=n.prepareAjaxErrorMsg(t);e(".error",i).html(r).show(),n.enableButton(s)}}),!1})},transfer:function(){var t=this,i=e(this.transferTemplate());i.modal({focus:!1,minWidth:268}),e("#simplemodal-container").css({width:"auto",height:"auto"}),e('[name="email"]',i).select2(e.extend(n.contactInputOptionsForSelect2(),{width:"268px",maximumSelectionSize:1,placeholder:gettext("Search user or enter email and press Enter"),formatSelectionTooBig:gettext("You cannot select any more choices")})),i.on("submit",function(){var r=e.trim(e('[name="email"]',e(this)).val());if(!r)return!1;if(r==t.groupView.group.owner)return!1;var s=e('[type="submit"]',e(this));return n.disableButton(s),e.ajax({url:n.getUrl({name:"group",group_id:t.groupView.group.id}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{owner:r},success:function(i){t.groupView.group=i,n.feedback(gettext("Successfully transferred the group. You are now a normal member of the group."),"success"),e.modal.close()},error:function(t){var r=n.prepareAjaxErrorMsg(t);e(".error",i).html(r).show(),n.enableButton(s)}}),!1})},toggleWiki:function(t){var i,r=this;i="on"==t?"true":"false",e.ajax({url:n.getUrl({name:"group",group_id:r.groupView.group.id}),type:"put",dataType:"json",beforeSend:n.prepareCSRFToken,data:{wiki_enabled:i},success:function(e){r.hide(),r.groupView.group=e,r.groupView.renderToolbar2({id:e.id,wiki_enabled:e.wiki_enabled})},error:function(e){var t=n.prepareAjaxErrorMsg(e);n.feedback(t,"error"),r.hide()}})},importMembers:function(){var t=this,i=e(this.importMembersTemplate());i.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"}),i.on("submit",function(){var r=e("[name=file]",i)[0],s=e(".error",i);if(!r.files.length)return s.html(gettext("Please choose a CSV file")).removeClass("hide"),!1;var a=e('[type="submit"]',e(this));n.disableButton(a);var o=r.files[0],d=new FormData;return d.append("file",o),e.ajax({url:n.getUrl({name:"group_import_members",group_id:t.groupView.group.id}),type:"post",dataType:"json",data:d,processData:!1,contentType:!1,beforeSend:n.prepareCSRFToken,success:function(t){if(t.failed.length>0){var i="";e(t.failed).each(function(e,t){i+=n.HTMLescape(t.email)+": "+n.HTMLescape(t.error_msg)+"<br />"}),s.html(i).removeClass("hide"),n.enableButton(a)}else e.modal.close(),n.feedback(gettext("Successfully imported."),"success")},error:function(e){var t=n.prepareAjaxErrorMsg(e);s.html(t).removeClass("hide"),n.enableButton(a)}}),!1})},manageMembers:function(){new r({group_id:this.groupView.group.id,group_name:this.groupView.group.name,is_owner:this.is_owner})},dismiss:function(){var t=this,i=gettext("Dismiss Group"),r=gettext("Really want to dismiss this group?"),s=function(){e.ajax({url:n.getUrl({name:"group",group_id:t.groupView.group.id}),type:"delete",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){app.ui.sideNavView.updateGroups(),app.router.navigate("groups/",{trigger:!0})},error:function(e){var t=n.prepareAjaxErrorMsg(e);n.feedback(t,"error")},complete:function(){e.modal.close()}})};n.showConfirm(i,r,s)},leave:function(){var t=this,i=gettext("Quit Group"),r=gettext("Are you sure you want to quit this group?"),s=function(){e.ajax({url:n.getUrl({name:"group_member",group_id:t.groupView.group.id,email:encodeURIComponent(app.pageOptions.username)}),type:"delete",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){app.ui.sideNavView.updateGroups(),app.router.navigate("groups/",{trigger:!0})},error:function(e){var t=n.prepareAjaxErrorMsg(e);n.feedback(t,"error")},complete:function(){e.modal.close()}})};n.showConfirm(i,r,s)}})}),define("app/views/group",["jquery","underscore","backbone","common","app/collections/group-repos","app/collections/group-owned-repos","app/views/group-repo","app/views/add-group-repo","app/views/add-department-repo","app/views/repo-details","app/views/group-members","app/views/group-discussions","app/views/group-settings"],function(e,t,i,n,r,s,a,o,d,l,c,u,h){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#group-tmpl").html()),toolbarTemplate:t.template(e("#group-toolbar-tmpl").html()),toolbar2Template:t.template(e("#group-toolbar2-tmpl").html()),pathTemplate:t.template(e("#group-path-tmpl").html()),theadTemplate:t.template(e("#shared-repos-hd-tmpl").html()),theadMobileTemplate:t.template(e("#shared-repos-hd-mobile-tmpl").html()),events:{"click #group-settings-icon":"toggleSettingsPanel","click #group-members-icon":"toggleMembersPanel","click #group-discussions-icon":"toggleDiscussionsPanel","click #group-toolbar .repo-create":"createRepo","click #group-repos .by-name":"sortByName","click #group-repos .by-time":"sortByTime"},initialize:function(e){this.group={},this.repos=new r,this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset),this.ownedRepos=new s,this.listenTo(this.ownedRepos,"add",this.addOne),this.listenTo(this.ownedRepos,"reset",this.resetOwnedRepos),this.settingsView=new h({groupView:this}),this.membersView=new c({groupView:this}),this.discussionsView=new u({groupView:this}),this.repoDetailsView=new l({parentView:this})},addOne:function(e,t,i){e.get("size_formatted")||0!=e.get("size")||e.get("mtime_relative")||e.set({size_formatted:"0 bytes",mtime_relative:gettext("Just now")});var n=new a({model:e,group_id:this.group_id,show_repo_owner:!0,repoDetailsView:this.repoDetailsView,is_staff:this.repos.is_staff});i.prepend?this.$tableBody.prepend(n.render().el):this.$tableBody.append(n.render().el)},renderThead:function(){var t;t=e(window).width()<768?this.theadMobileTemplate:this.theadTemplate,this.$tableHead.html(t())},reset:function(e){var t=e.repos||this.repos;t.length?(this.$emptyTip.hide(),this.renderThead(),this.$tableBody.empty(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:t}),t.each(this.addOne,this),this.$table.show()):(this.showEmptyTip(),this.$table.hide())},resetOwnedRepos:function(){0==this.repos.length&&this.reset({repos:this.ownedRepos})},showEmptyTip:function(){this.group.is_address_book_group?this.group.user_is_admin?this.$emptyTip.filter(".address-book-group-empty-tips-for-admin").show():this.$emptyTip.filter(".address-book-group-empty-tips-for-member").show():this.$emptyTip.filter(".common-group-empty-tips").show()},showGroup:function(t){var i=this;this.$table.hide(),this.$emptyTip.hide(),this.$error.hide(),this.$loadingTip.show(),e.ajax({url:n.getUrl({name:"group",group_id:this.group_id}),cache:!1,dataType:"json",success:function(n){i.group=n;var r=!1,s=!1;-1!=e.inArray(app.pageOptions.username,n.admins)&&(s=!0),i.group.is_address_book_group=!1,i.group.user_is_admin=s,0==n.parent_group_id?(r=!0,i.group.repos_for_new=i.repos):(i.group.is_address_book_group=!0,app.pageOptions.is_pro&&s&&(r=!0,i.group.repos_for_new=i.ownedRepos)),r?i.$toolbar.removeClass("hide"):i.$toolbar.addClass("hide"),i.renderPath({name:n.name,is_address_book_group:i.group.is_address_book_group}),i.renderToolbar2({id:n.id,wiki_enabled:n.wiki_enabled}),0==n.parent_group_id||s||e("#group-settings-icon").hide(),i.showRepoList(),t&&t.showDiscussions&&i.showDiscussions()},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.$toolbar.addClass("hide"),i.$path.empty(),i.$toolbar2.empty(),i.$loadingTip.hide(),i.$error.html(t).show()}})},showRepoList:function(){var e=this;this.repos.setGroupID(this.group_id),this.repos.fetch({cache:!1,reset:!0,data:{from:"web"},success:function(e,t,i){},error:function(t,i,r){var s=n.prepareCollectionFetchErrorMsg(t,i,r);e.$error.html(s).show()},complete:function(){e.$loadingTip.hide()}})},renderToolbar:function(){this.$toolbar=e('<div class="cur-view-toolbar hide" id="group-toolbar"></div>').html(this.toolbarTemplate()),this.$(".common-toolbar").before(this.$toolbar)},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main main-panel-main-with-side" id="group"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$path=e(".group-path",this.$mainCon),this.$toolbar2=e(".group-toolbar-2",this.$mainCon),this.$table=e("table",this.$mainCon),this.$tableHead=e("thead",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=e(".loading-tip",this.$mainCon),this.$emptyTip=this.$("#group-repos .empty-tips"),this.$error=e(".error",this.$mainCon)},renderPath:function(e){this.$path.html(this.pathTemplate(e))},renderToolbar2:function(e){this.$toolbar2.html(this.toolbar2Template(e))},updateName:function(t){this.group.name=t,e(".group-name",this.$mainCon).html(n.HTMLescape(t))},show:function(t,i){e("#group").length||(this.renderToolbar(),this.renderMainCon()),this.repoDetailsView.$el.is(":visible")&&this.repoDetailsView.hide(),this.group_id=t,this.showGroup(i)},hide:function(){this.$toolbar.detach(),this.$mainCon.detach()},createRepo:function(){var e=this.group.repos_for_new;e.setGroupID(this.group_id),this.group.is_address_book_group?new d(e):new o(e)},sortByName:function(){return n.toggleSortByNameMode(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},sortByTime:function(){return n.toggleSortByTimeMode(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},toggleSettingsPanel:function(){return this.settingsView.toggle()},toggleMembersPanel:function(){return this.membersView.toggle()},showDiscussions:function(){return this.discussionsView.show()},toggleDiscussionsPanel:function(){return this.discussionsView.toggle()}})}),define("app/models/pub-repo",["underscore","backbone","app/models/repo"],function(e,t,i){"use strict";var n=i.extend({defaults:{permission:"r"}});return e.extend(n.prototype.defaults,i.prototype.defaults),n}),define("app/collections/pub-repos",["underscore","backbone","common","app/models/pub-repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,comparator:NaN,url:function(){return i.getUrl({name:"pub_repos"})}})}),define("app/views/organization-repo",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view"],function(e,t,i,n,r){"use strict";return r.extend({tagName:"tr",template:t.template(e("#organization-repo-tmpl").html()),mobileTemplate:t.template(e("#organization-repo-mobile-tmpl").html()),initialize:function(){r.prototype.initialize.call(this)},render:function(){var i=this.model.toJSON(),r=n.isHiDPI()?48:24,s=this.model.getIconUrl(r),a=e(window).width()>=768?this.template:this.mobileTemplate;return t.extend(i,{icon_url:s,icon_title:this.model.getIconTitle()}),this.$el.html(a(i)),this},events:{"click .cancel-share":"removeShare"},removeShare:function(){var t=this.$el;this.model.get("name");return e.ajax({url:n.getUrl({name:"shared_repos",repo_id:this.model.get("id")})+"?share_type=public",type:"DELETE",beforeSend:n.prepareCSRFToken,dataType:"json",success:function(){t.remove();var e=gettext("Successfully unshared 1 item.");n.feedback(e,"success",n.SUCCESS_TIMOUT)},error:function(e){n.ajaxErrorHandler(e)}}),!1}})}),define("app/views/create-pub-repo",["jquery","simplemodal","underscore","backbone","common","app/views/add-repo"],function(e,t,i,n,r,s){"use strict";return s.extend({templateData:function(){return{showSharePerm:!0,enable_encrypted_library:app.pageOptions.enable_encrypted_library,library_templates:app.pageOptions.library_templates}},newAttributes:function(){var t=s.prototype.newAttributes.apply(this);return i.extend(t,{permission:e("select[name=permission]",this.$el).val()})}})}),define("app/views/add-pubrepo-item",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({tagName:"tr",template:t.template(e("#add-pubrepo-item-tmpl").html()),events:{"click .select":"select","change .share-permission-select":"selectPerm"},initialize:function(){},selectPerm:function(t){var i=e(t.currentTarget).val();this.model.set({pub_perm:i},{silent:!0})},select:function(){this.$("[type=checkbox]").prop("checked")?this.model.set({selected:!0},{silent:!0}):this.model.set({selected:!1},{silent:!0})},render:function(){return this.$el.html(this.template(this.model.toJSON())),this}})}),define("app/views/add-pub-repo",["jquery","simplemodal","underscore","backbone","common","app/collections/repos","app/views/add-pubrepo-item"],function(e,t,i,n,r,s,a){"use strict";return n.View.extend({id:"add-pubrepo-popup",template:i.template(e("#add-pubrepo-popup-tmpl").html()),initialize:function(t){this.$el.html(this.template()).modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"}),this.$table=this.$("table"),this.$loadingTip=this.$(".loading-tip"),this.myRepos=new s,this.pubRepos=t,this.listenTo(this.myRepos,"reset",this.reset),this.myRepos.fetch({reset:!0})},events:{"click .submit":"submit"},submit:function(){var t=this.myRepos.where({selected:!0}),n=this,s=[];i.each(t,function(t){var i=t.id,n="rw";t.has("pub_perm")&&(n=t.get("pub_perm")),s.push(e.ajax({url:r.getUrl({name:"shared_repos",repo_id:i})+"?share_type=public&permission="+n,type:"PUT",beforeSend:r.prepareCSRFToken,dataType:"json",error:function(e,t,i){r.ajaxErrorHandler(e,t,i)}}))}),e.when.apply(e,s).done(function(){e.modal.close(),n.pubRepos.fetch({reset:!0})})},addOne:function(e){var t=new a({model:e});this.$table.append(t.render().el)},reset:function(){this.$loadingTip.hide(),this.$table.show(),this.myRepos.each(this.addOne,this)}})}),define("app/views/organization",["jquery","underscore","backbone","common","app/collections/pub-repos","app/views/organization-repo","app/views/create-pub-repo","app/views/add-pub-repo","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o,d){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#organization-repos-tmpl").html()),toolbarTemplate:t.template(e("#org-repos-toolbar-tmpl").html()),theadTemplate:t.template(e("#shared-repos-hd-tmpl").html()),theadMobileTemplate:t.template(e("#shared-repos-hd-mobile-tmpl").html()),initialize:function(e){this.repos=new r,this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset)},renderToolbar:function(){this.$toolbar=e('<div class="cur-view-toolbar" id="org-repos-toolbar"></div>').html(this.toolbarTemplate()),this.$(".common-toolbar").before(this.$toolbar),this.dropdown=new d({el:this.$("#org-repos-toolbar .js-add-pub-lib-dropdown")})},renderMainCon:function(){return this.$mainCon=e('<div class="main-panel-main" id="org-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableHead=e("thead",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips"),this},show:function(){this.renderToolbar(),this.renderMainCon(),this.showRepoList()},hide:function(){this.$toolbar.detach(),this.$mainCon.detach()},events:{"click #org-repos-toolbar .share-existing":"addRepo","click #org-repos-toolbar .create-new":"createRepo","click #org-repos .by-name":"sortByName","click #org-repos .by-time":"sortByTime"},createRepo:function(){return new a(this.repos),this.dropdown.hide(),!1},addRepo:function(){return new o(this.repos),this.dropdown.hide(),!1},addOne:function(e,t,i){var n=new s({model:e,collection:this.repos});i.prepend?this.$tableBody.prepend(n.render().el):this.$tableBody.append(n.render().el)},renderThead:function(){var t=e(window).width()>=768?this.theadTemplate:this.theadMobileTemplate;this.$tableHead.html(t())},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.repos.length?(this.$emptyTip.hide(),this.renderThead(),this.$tableBody.empty(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:this.repos}),this.repos.each(this.addOne,this),this.$table.show()):(this.$table.hide(),this.$emptyTip.show())},showRepoList:function(){var e=this.$loadingTip;e.show();var t=this;this.repos.fetch({cache:!1,reset:!0,success:function(e,t,i){},error:function(i,r,s){var a=t.$(".error"),o=n.prepareCollectionFetchErrorMsg(i,r,s);a.html(o).show(),e.hide()}})},sortByName:function(){return n.toggleSortByNameMode(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1},sortByTime:function(){return n.toggleSortByTimeMode(),n.updateSortIconByMode({context:this.$el}),n.sortLibs({libs:this.repos}),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.repos.comparator=null,!1}})}),function(e){"function"==typeof define&&define.amd?define("jquery.magnific-popup",["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(e){var t,i,n,r,s,a,o="Close",d="BeforeClose",l="MarkupParse",c="Open",u="Change",h="mfp",p="."+h,m="mfp-ready",_="mfp-removing",f="mfp-prevent-close",g=function(){},v=!!window.jQuery,y=e(window),w=function(e,i){t.ev.on(h+e+p,i)},b=function(t,i,n,r){var s=document.createElement("div");return s.className="mfp-"+t,n&&(s.innerHTML=n),r?i&&i.appendChild(s):(s=e(s),i&&s.appendTo(i)),s},M=function(i,n){t.ev.triggerHandler(h+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},Y=function(i){return i===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=i),t.currTemplate.closeBtn},L=function(){e.magnificPopup.instance||(t=new g,t.init(),e.magnificPopup.instance=t)},k=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};g.prototype={constructor:g,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=k(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document),t.popupsCache={}},open:function(i){var r;if(!1===i.isObj){t.items=i.items.toArray(),t.index=0;var a,o=i.items;for(r=0;r<o.length;r++)if(a=o[r],a.parsed&&(a=a.el[0]),a===i.el[0]){t.index=r;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(t.isOpen)return void t.updateItemHTML();t.types=[],s="",i.mainEl&&i.mainEl.length?t.ev=i.mainEl.eq(0):t.ev=n,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=b("bg").on("click"+p,function(){t.close()}),t.wrap=b("wrap").attr("tabindex",-1).on("click"+p,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=b("container",t.wrap)),t.contentContainer=b("content"),t.st.preloader&&(t.preloader=b("preloader",t.container,t.st.tLoading));var d=e.magnificPopup.modules;for(r=0;r<d.length;r++){var u=d[r];u=u.charAt(0).toUpperCase()+u.slice(1),t["init"+u].call(t)}M("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(w(l,function(e,t,i,n){i.close_replaceWith=Y(n.type)}),s+=" mfp-close-btn-in"):t.wrap.append(Y())),t.st.alignTop&&(s+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:y.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:n.height(),position:"absolute"}),t.st.enableEscapeKey&&n.on("keyup"+p,function(e){27===e.keyCode&&t.close()}),y.on("resize"+p,function(){t.updateSize()}),t.st.closeOnContentClick||(s+=" mfp-auto-cursor"),s&&t.wrap.addClass(s);var h=t.wH=y.height(),_={};if(t.fixedContentPos&&t._hasScrollBar(h)){var f=t._getScrollbarSize();f&&(_.marginRight=f)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):_.overflow="hidden");var g=t.st.mainClass;return t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),M("BuildControls"),e("html").css(_),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(m),t._setFocus()):t.bgOverlay.addClass(m),n.on("focusin"+p,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(h),M(c),i},close:function(){t.isOpen&&(M(d),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(_),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){M(o);var i=_+" "+m+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var r={marginRight:""};t.isIE7?e("body, html").css("overflow",""):r.overflow="",e("html").css(r)}n.off("keyup.mfp focusin"+p),t.ev.off(p),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,M("AfterClose")},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||y.height();t.fixedContentPos||t.wrap.css("height",t.wH),M("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(M("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var s=!!t.st[n]&&t.st[n].markup;M("FirstMarkupParse",s),t.currTemplate[n]=!s||e(s)}r&&r!==i.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(a,n),i.preloaded=!0,M(u,i),r=i.type,t.container.prepend(t.contentContainer),M("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[i]?t.content.find(".mfp-close").length||t.content.append(Y()):t.content=e:t.content="",M("BeforeAppend"),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n,r=t.items[i];if(r.tagName?r={el:e(r)}:(n=r.type,r={data:r,src:r.src}),r.el){for(var s=t.types,a=0;a<s.length;a++)if(r.el.hasClass("mfp-"+s[a])){n=s[a];break}r.src=r.el.attr("data-mfp-src"),r.src||(r.src=r.el.attr("href"))}return r.type=n||t.st.type||"inline",r.index=i,r.parsed=!0,t.items[i]=r,M("ElementParse",r),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var r="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(r).on(r,n)):(i.isObj=!1,i.delegate?e.off(r).on(r,i.delegate,n):(i.items=e,e.off(r).on(r,n)))},_openClick:function(i,n,r){if((void 0!==r.midClick?r.midClick:e.magnificPopup.defaults.midClick)||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){var s=void 0!==r.disableOn?r.disableOn:e.magnificPopup.defaults.disableOn;if(s)if(e.isFunction(s)){if(!s.call(t))return!0}else if(y.width()<s)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),r.el=e(i.mfpEl),r.delegate&&(r.items=n.find(r.delegate)),t.open(r)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var r={status:e,text:n};M("UpdateStatus",r),e=r.status,n=r.text,t.preloader.html(n),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass(f)){var n=t.st.closeOnContentClick,r=t.st.closeOnBgClick;if(n&&r)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(r&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?n.height():document.body.scrollHeight)>(e||y.height())},_setFocus:function(){
(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){return i.target===t.wrap[0]||e.contains(t.wrap[0],i.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,i,n){var r;n.data&&(i=e.extend(n.data,i)),M(l,[t,i,n]),e.each(i,function(i,n){if(void 0===n||!1===n)return!0;if(r=i.split("_"),r.length>1){var s=t.find(p+"-"+r[0]);if(s.length>0){var a=r[1];"replaceWith"===a?s[0]!==n[0]&&s.replaceWith(n):"img"===a?s.is("img")?s.attr("src",n):s.replaceWith(e("<img>").attr("src",n).attr("class",s.attr("class"))):s.attr(r[1],n)}}else t.find(p+"-"+i).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:g.prototype,modules:[],open:function(t,i){return L(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(i){L();var n=e(this);if("string"==typeof i)if("open"===i){var r,s=v?n.data("magnificPopup"):n[0].magnificPopup,a=parseInt(arguments[1],10)||0;s.items?r=s.items[a]:(r=n,s.delegate&&(r=r.find(s.delegate)),r=r.eq(a)),t._openClick({mfpEl:r},n,s)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),v?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var T,D,S,x="inline",C=function(){S&&(D.after(S.addClass(T)).detach(),S=null)};e.magnificPopup.registerModule(x,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(x),w(o+"."+x,function(){C()})},getInline:function(i,n){if(C(),i.src){var r=t.st.inline,s=e(i.src);if(s.length){var a=s[0].parentNode;a&&a.tagName&&(D||(T=r.hiddenClass,D=b(T),T="mfp-"+T),S=s.after(D).detach().removeClass(T)),t.updateStatus("ready")}else t.updateStatus("error",r.tNotFound),s=e("<div>");return i.inlineElement=s,s}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var H,j="ajax",Z=function(){H&&e(document.body).removeClass(H)},P=function(){Z(),t.req&&t.req.abort()};e.magnificPopup.registerModule(j,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(j),H=t.st.ajax.cursor,w(o+"."+j,P),w("BeforeChange."+j,P)},getAjax:function(i){H&&e(document.body).addClass(H),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(n,r,s){var a={data:n,xhr:s};M("ParseAjax",a),t.appendContent(e(a.data),j),i.finished=!0,Z(),t._setFocus(),setTimeout(function(){t.wrap.addClass(m)},16),t.updateStatus("ready"),M("AjaxContentAdded")},error:function(){Z(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(n),""}}});var J,F=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,n=".image";t.types.push("image"),w(c+n,function(){"image"===t.currItem.type&&i.cursor&&e(document.body).addClass(i.cursor)}),w(o+n,function(){i.cursor&&e(document.body).removeClass(i.cursor),y.off("resize"+p)}),w("Resize"+n,t.resizeImage),t.isLowIE&&w("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,J&&clearInterval(J),e.isCheckingImgSize=!1,M("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],r=function(s){J&&clearInterval(J),J=setInterval(function(){return n.naturalWidth>0?void t._onImageHasSize(e):(i>200&&clearInterval(J),i++,void(3===i?r(10):40===i?r(50):100===i&&r(500)))},s)};r(1)},getImage:function(i,n){var r=0,s=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,M("ImageLoadComplete")):(r++,200>r?setTimeout(s,100):a()))},a=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",o.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},o=t.st.image,d=n.find(".mfp-img");if(d.length){var l=document.createElement("img");l.className="mfp-img",i.el&&i.el.find("img").length&&(l.alt=i.el.find("img").attr("alt")),i.img=e(l).on("load.mfploader",s).on("error.mfploader",a),l.src=i.src,d.is("img")&&(i.img=i.img.clone()),l=i.img[0],l.naturalWidth>0?i.hasSize=!0:l.width||(i.hasSize=!1)}return t._parseMarkup(n,{title:F(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(J&&clearInterval(J),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",o.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var X,E=function(){return void 0===X&&(X=void 0!==document.createElement("p").style.MozTransform),X};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,n=".zoom";if(i.enabled&&t.supportsTransition){var r,s,a=i.duration,l=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,r={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},s="transition";return r["-webkit-"+s]=r["-moz-"+s]=r["-o-"+s]=r[s]=n,t.css(r),t},c=function(){t.content.css("visibility","visible")};w("BuildControls"+n,function(){if(t._allowZoom()){if(clearTimeout(r),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void c();s=l(e),s.css(t._getOffset()),t.wrap.append(s),r=setTimeout(function(){s.css(t._getOffset(!0)),r=setTimeout(function(){c(),setTimeout(function(){s.remove(),e=s=null,M("ZoomAnimationEnded")},16)},a)},16)}}),w(d+n,function(){if(t._allowZoom()){if(clearTimeout(r),t.st.removalDelay=a,!e){if(!(e=t._getItemToZoom()))return;s=l(e)}s.css(t._getOffset(!0)),t.wrap.append(s),t.content.css("visibility","hidden"),setTimeout(function(){s.css(t._getOffset())},16)}}),w(o+n,function(){t._allowZoom()&&(c(),s&&s.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var r=n.offset(),s=parseInt(n.css("padding-top"),10),a=parseInt(n.css("padding-bottom"),10);r.top-=e(window).scrollTop()-s;var o={width:n.width(),height:(v?n.innerHeight():n[0].offsetHeight)-a-s};return E()?o["-moz-transform"]=o.transform="translate("+r.left+"px,"+r.top+"px)":(o.left=r.left,o.top=r.top),o}}});var $="iframe",O=function(e){if(t.currTemplate[$]){var i=t.currTemplate[$].find("iframe");i.length&&(e||(i[0].src="//about:blank"),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule($,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push($),w("BeforeChange",function(e,t,i){t!==i&&(t===$?O():i===$&&O(!0))}),w(o+"."+$,function(){O()})},getIframe:function(i,n){var r=i.src,s=t.st.iframe;e.each(s.patterns,function(){return r.indexOf(this.index)>-1?(this.id&&(r="string"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace("%id%",r),!1):void 0});var a={};return s.srcAction&&(a[s.srcAction]=r),t._parseMarkup(n,a,i),t.updateStatus("ready"),n}}});var N=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},W=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,r=".mfp-gallery";return t.direction=!0,!(!i||!i.enabled)&&(s+=" mfp-gallery",w(c+r,function(){i.navigateByImgClick&&t.wrap.on("click"+r,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),n.on("keydown"+r,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),w("UpdateStatus"+r,function(e,i){i.text&&(i.text=W(i.text,t.currItem.index,t.items.length))}),w(l+r,function(e,n,r,s){var a=t.items.length;r.counter=a>1?W(i.tCounter,s.index,a):""}),w("BuildControls"+r,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,r=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(f),s=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(f);r.click(function(){t.prev()}),s.click(function(){t.next()}),t.container.append(r.add(s))}}),w(u+r,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void w(o+r,function(){n.off(r),t.wrap.off("click"+r),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=N(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=N(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),r=Math.min(i[1],t.items.length);for(e=1;e<=(t.direction?r:n);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?n:r);e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=N(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),M("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,M("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var A="retina";e.magnificPopup.registerModule(A,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;(i=isNaN(i)?i():i)>1&&(w("ImageHasSize."+A,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),w("ElementParse."+A,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),L()}),define("app/models/dirent",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.Model.extend({getPath:function(){return n.pathJoin([this.collection.path,this.get("obj_name")])},getIconUrl:function(e){if(this.get("is_dir")){var t="r"==this.get("perm");return n.getDirIconUrl(t,e)}return n.getFileIconUrl(this.get("obj_name"),e)},getWebUrl:function(){var e=this.collection,t=this.getPath();return this.get("is_dir")?e.category?"#"+e.category+"/lib/"+e.repo_id+n.encodePath(t):"#lib/"+e.repo_id+n.encodePath(t):app.config.siteRoot+"lib/"+e.repo_id+"/file"+n.encodePath(t)},getDownloadUrl:function(){var e=this.collection,t=this.getPath();return this.get("is_dir")?app.config.siteRoot+"repo/download_dir/"+e.repo_id+"/?p="+n.encodePath(t):app.config.siteRoot+"lib/"+e.repo_id+"/file"+n.encodePath(t)+"?dl=1"},deleteFromServer:function(t){var i=this.collection,r=this.getPath(),s=this,a={repo_id:i.repo_id,name:this.get("is_dir")?"del_dir":"del_file"};e.ajax({url:n.getUrl(a)+"?p="+encodeURIComponent(r),type:"DELETE",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(e){i.remove(s),t.success&&t.success(e)},error:function(e){t.error&&t.error(e)}})},rename:function(t){var i=this.collection,r=this,s={repo_id:i.repo_id,name:this.get("is_dir")?"rename_dir":"rename_file"},a={operation:"rename",newname:t.newname};e.ajax({url:n.getUrl(s)+"?p="+encodeURIComponent(this.getPath()),type:"POST",dataType:"json",beforeSend:n.prepareCSRFToken,data:a,success:function(i){var n={obj_name:i.obj_name,last_modified:(new Date).getTime()/1e3,last_update:gettext("Just now")};r.get("is_dir")||e.extend(n,{starred:!1}),r.set(n),t.success&&t.success(i)},error:function(e){t.error&&t.error(e)}})},lockOrUnlockFile:function(t){var i=this.collection,r=this.getPath();e.ajax({url:n.getUrl({name:"lock_or_unlock_file",repo_id:i.repo_id})+"?p="+encodeURIComponent(r),type:"PUT",dataType:"json",data:{operation:t.op,p:r},cache:!1,beforeSend:n.prepareCSRFToken,success:function(){t.success()},error:function(e){t.error(e)}})},lockFile:function(e){var t=this;return this.lockOrUnlockFile({op:"lock",success:function(){t.set({is_locked:!0,locked_by_me:!0,lock_owner_name:app.pageOptions.name}),e.success&&e.success()},error:function(t){e.error&&e.error(t)}}),!1},unlockFile:function(e){var t=this;return this.lockOrUnlockFile({op:"unlock",success:function(){t.set({is_locked:!1}),e.success&&e.success()},error:function(t){e.error&&e.error(t)}}),!1}})}),define("app/collections/dirents",["underscore","backbone","common","app/models/dirent"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"list_lib_dir",repo_id:this.repo_id})},initialize:function(){},parse:function(e){return this.repo_name=e.repo_name,this.user_perm=e.user_perm,this.no_quota=e.no_quota,this.encrypted=e.encrypted,this.repo_owner=e.repo_owner,this.is_repo_owner=e.is_repo_owner,this.is_virtual=e.is_virtual,this.has_been_shared_out=e.has_been_shared_out,this.dirent_more=e.dirent_more,this.more_start=e.more_start,this.is_admin=e.is_admin,e.dirent_list},setPath:function(e,t,i){this.category=e,this.repo_id=t,this.path=i}})}),define("app/views/dialogs/dirent-mvcp",["jquery","underscore","backbone","common","file-tree","jquery.ui"],function(e,t,i,n,r,s){"use strict";return i.View.extend({mvcpTemplate:t.template(e("#mvcp-form-template").html()),mvProgressTemplate:t.template(e("#mv-progress-popup-template").html()),initialize:function(t){this.dirent=t.dirent,this.dir=t.dir,this.op_type=t.op_type,this.dirView=t.dirView,this.imgIndex=t.imgIndex,this.show_cur_repo="rw"==this.dirent.get("perm"),this.render(),this.$el.modal({autoResize:!0,focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"}),this.show_cur_repo&&r.renderTreeForPath({$form:this.$el,$container:this.$("#current-repo-dirs"),repo_name:this.dir.repo_name,repo_id:this.dir.repo_id,path:this.dir.path}),this.dir.encrypted||r.prepareOtherReposTree({cur_repo_id:this.dir.repo_id}),this.$error=this.$(".error"),this.$form=this.$("form")},render:function(){var e=this.dir,t=this.dirent.get("obj_name"),i=this.dirent.get("is_dir")?"dir":"file",r="mv"==this.op_type?gettext("Move {placeholder} to:"):gettext("Copy {placeholder} to:");return r=r.replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(t)+'">'+n.HTMLescape(t)+"</span>"),this.$el.html(this.mvcpTemplate({form_title:r,op_type:this.op_type,obj_type:i,obj_name:t,show_cur_repo:this.show_cur_repo,show_other_repos:!e.encrypted})),this},removeImgItem:function(){this.dirent.get("is_img")&&this.dirView.updateMagnificPopupOptions({op:"delete-item",index:this.imgIndex})},events:{"submit form":"formSubmit"},_showProgress:function(t,i){var r=this,s=this.op_type,a=this.dirent.get("obj_name"),o=e(r.mvProgressTemplate()),d=e("#mv-details",o),l=e("#cancel-mv",o),c=e("#mv-other-info",o);l.removeClass("hide"),setTimeout(function(){o.modal({containerCss:{width:300,height:150,paddingTop:50},focus:!1});var t="mv"==r.op_type?gettext("Moving %(name)s"):gettext("Copying %(name)s");d.html(t.replace("%(name)s",n.HTMLescape(a))).removeClass("vh"),e("#mv-progress").progressbar(),u()},100);var u=function(){e.ajax({url:n.getUrl({name:"query_copy_move_progress"})+"?task_id="+encodeURIComponent(i),dataType:"json",success:function(i){var a=e(".ui-progressbar-value",e("#mv-progress"));if(i.failed||i.canceled||i.successful)if(i.successful)e.modal.close(),"mv"==s&&(r.dir.remove(r.dirent),r.removeImgItem()),n.feedback(t,"success");else{d.addClass("vh");var o=i.failed?gettext("Failed."):gettext("Canceled.");c.html(o).removeClass("hide"),l.addClass("hide"),setTimeout(function(){e.modal.close()},1e3)}else i.done==i.total?(a.css("width","100%"),d.addClass("vh"),l.addClass("hide"),c.html(gettext("Saving...")).removeClass("hide")):a.css("width",parseInt(i.done/i.total*100,10)+"%"),a.show(),setTimeout(u,1e3)},error:function(t,i,r){var s=n.prepareAjaxErrorMsg(t);d.addClass("vh"),c.html(s).removeClass("hide"),l.addClass("hide"),setTimeout(function(){e.modal.close()},1e3)}})};l.on("click",function(){n.disableButton(l),e.ajax({url:n.getUrl({name:"copy_move_task"}),type:"DELETE",dataType:"json",beforeSend:n.prepareCSRFToken,data:{task_id:i},success:function(t){d.addClass("vh"),c.html(gettext("Canceled.")).removeClass("hide"),l.addClass("hide"),setTimeout(function(){e.modal.close()},1e3)},error:function(e,t,i){var r=n.prepareAjaxErrorMsg(e);c.html(r).removeClass("hide"),n.enableButton(l)}})})},formSubmit:function(){var t=this,i=this.dir.path,r=this.dir.repo_id,s=this.dirent.get("obj_name"),a=this.dirent.get("is_dir")?"dir":"file",o=e('[name="dst_repo"]',this.$form).val(),d=e('[name="dst_path"]',this.$form).val();if(!e.trim(o)||!e.trim(d))return this.$error.removeClass("hide"),!1;if(o==r&&(d==i&&"mv"==this.op_type||"dir"==a&&d==i+s+"/"))return this.$error.html(gettext("Invalid destination path")).removeClass("hide"),!1;var l=n.getUrl({name:"copy_move_task"}),c={src_repo_id:r,src_parent_dir:i,src_dirent_name:s,dst_repo_id:o,dst_parent_dir:d,operation:"mv"==this.op_type?"move":"copy",dirent_type:a},u=function(a){e.modal.close();var l;"mv"==t.op_type?l=gettext("Successfully moved %(name)s").replace("%(name)s",s):(l=gettext("Successfully copied %(name)s").replace("%(name)s",s),o==r&&d==i&&t.dirView.renderDir()),a.task_id?t._showProgress(l,a.task_id):("mv"==t.op_type&&(t.dir.remove(t.dirent),t.removeImgItem()),n.feedback(l,"success"))};return n.ajaxPost({form:this.$form,post_url:l,post_data:c,after_op_success:u,form_id:this.$form.attr("id")}),!1}})}),define("app/views/dialogs/dirent-smart-link",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({smartLinkTemplate:t.template(e("#smart-link-tmpl").html()),initialize:function(t){this.attributes=t.attributes,this.dir=t.dir,this.render({attributes:this.attributes,dir:this.dir}),this.$el.modal({autoResize:!0,focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"})},render:function(){var t=n.getUrl({name:"smart_link"})+"?repo_id="+this.dir.repo_id+"&path="+encodeURIComponent(this.dir.path+"/"+this.attributes.obj_name)+"&is_dir="+!this.attributes.is_file,i=this.$el;return e.ajax({url:t,type:"GET",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(e){i.find(".smart-link-loading").hide(),i.find(".smart-link-operation").show(),i.find(".smart-link-href").attr("href",e.smart_link).show().html(e.smart_link)},error:function(e){n.ajaxErrorHandler(e)}}),this.$el.html(this.smartLinkTemplate()),this},events:{"click .smart-link-copy":"smartLinkCopy","click .smart-link-close":"smartLinkClose"},smartLinkCopy:function(){var t=this.$el;t.find(".copy-input").val(t.find(".smart-link-href").html()).select(),document.execCommand("copy"),n.feedback(gettext("Internal link copied to clipboard"),"success"),e.modal.close()},smartLinkClose:function(){e.modal.close()}})}),function(e){void 0===e.fn.each2&&e.extend(e.fn,{each2:function(t){for(var i=e([0]),n=-1,r=this.length;++n<r&&(i.context=i[0]=this[n])&&!1!==t.call(i[0],n,i););return this}})}(jQuery),function(e,t){"use strict";function i(t){var i=e(document.createTextNode(""));t.before(i),i.before(t),i.remove()}function n(e){function t(e){return O[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function r(e,t){for(var i=0,n=t.length;i<n;i+=1)if(a(e,t[i]))return i;return-1}function s(){var t=e($);t.appendTo(document.body);var i={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),i}function a(e,i){return e===i||e!==t&&i!==t&&(null!==e&&null!==i&&(e.constructor===String?e+""==i+"":i.constructor===String&&i+""==e+""))}function o(e,t,i){var n,r,s;if(null===e||e.length<1)return[];for(n=e.split(t),r=0,s=n.length;r<s;r+=1)n[r]=i(n[r]);return n}function d(e){return e.outerWidth(!1)-e.width()}function l(i){var n="keyup-change-value";i.on("keydown",function(){e.data(i,n)===t&&e.data(i,n,i.val())}),i.on("keyup",function(){var r=e.data(i,n);r!==t&&i.val()!==r&&(e.removeData(i,n),i.trigger("keyup-change"))})}function c(i){i.on("mousemove",function(i){var n=X;n!==t&&n.x===i.pageX&&n.y===i.pageY||e(i.target).trigger("mousemove-filtered",i)})}function u(e,i,n){n=n||t;var r;return function(){var t=arguments;window.clearTimeout(r),r=window.setTimeout(function(){i.apply(n,t)},e)}}function h(e,t){var i=u(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){r(e.target,t.get())>=0&&i(e)})}function p(e){e[0]!==document.activeElement&&window.setTimeout(function(){var t,i=e[0],n=e.val().length;e.focus(),(i.offsetWidth>0||i.offsetHeight>0)&&i===document.activeElement&&(i.setSelectionRange?i.setSelectionRange(n,n):i.createTextRange&&(t=i.createTextRange(),t.collapse(!1),t.select()))},0)}function m(t){t=e(t)[0];var i=0,n=0;if("selectionStart"in t)i=t.selectionStart,n=t.selectionEnd-i;else if("selection"in document){t.focus();var r=document.selection.createRange();n=document.selection.createRange().text.length,r.moveStart("character",-t.value.length),i=r.text.length-n}return{offset:i,length:n}}function _(e){e.preventDefault(),e.stopPropagation()}function f(e){e.preventDefault(),e.stopImmediatePropagation()}function g(t){if(!P){var i=t[0].currentStyle||window.getComputedStyle(t[0],null);P=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"}),P.attr("class","select2-sizer"),e(document.body).append(P)}return P.text(t.val()),P.width()}function v(t,i,n){var r,s,a=[];r=e.trim(t.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),r=e.trim(i.attr("class")),r&&(r=""+r,e(r.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(s=n(this))&&a.push(s)})),t.attr("class",a.join(" "))}function y(e,t,i,r){var s=n(e.toUpperCase()).indexOf(n(t.toUpperCase())),a=t.length;if(s<0)return void i.push(r(e));i.push(r(e.substring(0,s))),i.push("<span class='select2-match'>"),i.push(r(e.substring(s,s+a))),i.push("</span>"),i.push(r(e.substring(s+a,e.length)))}function w(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function b(i){var n,r=null,s=i.quietMillis||100,a=i.url,o=this;return function(d){window.clearTimeout(n),n=window.setTimeout(function(){var n=i.data,s=a,l=i.transport||e.fn.select2.ajaxDefaults.transport,c={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||t,dataType:i.dataType||"json"},u=e.extend({},e.fn.select2.ajaxDefaults.params,c);n=n?n.call(o,d.term,d.page,d.context):null,s="function"==typeof s?s.call(o,d.term,d.page,d.context):s,r&&"function"==typeof r.abort&&r.abort(),i.params&&(e.isFunction(i.params)?e.extend(u,i.params.call(o)):e.extend(u,i.params)),e.extend(u,{url:s,dataType:i.dataType,data:n,success:function(e){var t=i.results(e,d.page,d);d.callback(t)},error:function(e,t,i){var n={hasError:!0,jqXHR:e,textStatus:t,errorThrown:i};d.callback(n)}}),r=l.call(o,u)},s)}}function M(t){var i,n,r=t,s=function(e){return""+e.text};e.isArray(r)&&(n=r,r={results:n}),!1===e.isFunction(r)&&(n=r,r=function(){return n});var a=r();return a.text&&(s=a.text,e.isFunction(s)||(i=a.text,s=function(e){return e[i]})),function(t){var i,n=t.term,a={results:[]};if(""===n)return void t.callback(r());i=function(r,a){var o,d;if(r=r[0],r.children){o={};for(d in r)r.hasOwnProperty(d)&&(o[d]=r[d]);o.children=[],e(r.children).each2(function(e,t){i(t,o.children)}),(o.children.length||t.matcher(n,s(o),r))&&a.push(o)}else t.matcher(n,s(r),r)&&a.push(r)},e(r().results).each2(function(e,t){i(t,a.results)}),t.callback(a)}}function Y(i){var n=e.isFunction(i);return function(r){var s=r.term,a={results:[]},o=n?i(r):i;e.isArray(o)&&(e(o).each(function(){var e=this.text!==t,i=e?this.text:this;(""===s||r.matcher(s,i))&&a.results.push(e?this:{id:this,text:this})}),r.callback(a))}}function L(t,i){if(e.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(i+" must be a string, function, or falsy value")}function k(t,i){if(e.isFunction(t)){var n=Array.prototype.slice.call(arguments,2);return t.apply(i,n)}return t}function T(t){var i=0;return e.each(t,function(e,t){t.children?i+=T(t.children):i++}),i}function D(e,i,n,r){var s,o,d,l,c,u=e,h=!1;if(!r.createSearchChoice||!r.tokenSeparators||r.tokenSeparators.length<1)return t;for(;;){for(o=-1,d=0,l=r.tokenSeparators.length;d<l&&(c=r.tokenSeparators[d],!((o=e.indexOf(c))>=0));d++);if(o<0)break;if(s=e.substring(0,o),e=e.substring(o+c.length),s.length>0&&(s=r.createSearchChoice.call(this,s,i))!==t&&null!==s&&r.id(s)!==t&&null!==r.id(s)){for(h=!1,d=0,l=i.length;d<l;d++)if(a(r.id(s),r.id(i[d]))){h=!0;break}h||n(s)}}return u!==e?e:void 0}function S(){var t=this;e.each(arguments,function(e,i){t[i].remove(),t[i]=null})}function x(t,i){var n=function(){};return n.prototype=new t,n.prototype.constructor=n,n.prototype.parent=t.prototype,n.prototype=e.extend(n.prototype,i),n}if(window.Select2===t){var C,H,j,Z,P,J,F,X={x:0,y:0},E={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(e){switch(e=e.which?e.which:e){case E.LEFT:case E.RIGHT:case E.UP:case E.DOWN:return!0}return!1},isControl:function(e){switch(e.which){case E.SHIFT:case E.CTRL:case E.ALT:return!0}return!!e.metaKey},isFunctionKey:function(e){return(e=e.which?e.which:e)>=112&&e<=123}},$="<div class='select2-measure-scrollbar'></div>",O={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f",
"ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};J=e(document),Z=function(){var e=1;return function(){return e++}}(),C=x(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(i){var n,r;this.opts=i=this.prepareOpts(i),this.id=i.id,i.element.data("select2")!==t&&null!==i.element.data("select2")&&i.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(i.element.attr("id")||"autogen"+Z()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",i.element.attr("title")),this.body=e(document.body),v(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",i.element.attr("style")),this.container.css(k(i.containerCss,this.opts.element)),this.container.addClass(k(i.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",_),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),v(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(i.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",_),this.results=n=this.container.find(".select2-results"),this.search=r=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",_),c(this.results),this.dropdown.on("mousemove-filtered",".select2-results",this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",".select2-results",this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",".select2-results",this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",".select2-results",this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(e){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),h(80,this.results),this.dropdown.on("scroll-debounced",".select2-results",this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&n.mousewheel(function(e,t,i,r){var s=n.scrollTop();r>0&&s-r<=0?(n.scrollTop(0),_(e)):r<0&&n.get(0).scrollHeight-n.scrollTop()+r<=n.height()&&(n.scrollTop(n.get(0).scrollHeight-n.height()),_(e))}),l(r),r.on("keyup-change input paste",this.bind(this.updateResults)),r.on("focus",function(){r.addClass("select2-focused")}),r.on("blur",function(){r.removeClass("select2-focused")}),this.dropdown.on("mouseup",".select2-results",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);var a=i.element.prop("disabled");a===t&&(a=!1),this.enable(!a);var o=i.element.prop("readonly");o===t&&(o=!1),this.readonly(o),F=F||s(),this.autofocus=i.element.prop("autofocus"),i.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",i.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,i=e.data("select2"),n=this;this.close(),e.length&&e[0].detachEvent&&n._sync&&e.each(function(){n._sync&&this.detachEvent("onpropertychange",n._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,i!==t&&(i.container.remove(),i.liveRegion.remove(),i.dropdown.remove(),e.show().removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),S.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:a(e.attr("locked"),"locked")||a(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(i){var n,r,s,d,l=this;if(n=i.element,"select"===n.get(0).tagName.toLowerCase()&&(this.select=r=i.element),r&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),i=e.extend({},{populateResults:function(n,r,s){var a,o=this.opts.id,d=this.liveRegion;(a=function(n,r,c){var u,h,p,m,_,f,g,v,y,w;n=i.sortResults(n,r,s);var b=[];for(u=0,h=n.length;u<h;u+=1)p=n[u],_=!0===p.disabled,m=!_&&o(p)!==t,f=p.children&&p.children.length>0,g=e("<li></li>"),g.addClass("select2-results-dept-"+c),g.addClass("select2-result"),g.addClass(m?"select2-result-selectable":"select2-result-unselectable"),_&&g.addClass("select2-disabled"),f&&g.addClass("select2-result-with-children"),g.addClass(l.opts.formatResultCssClass(p)),g.attr("role","presentation"),v=e(document.createElement("div")),v.addClass("select2-result-label"),v.attr("id","select2-result-label-"+Z()),v.attr("role","option"),w=i.formatResult(p,v,s,l.opts.escapeMarkup),w!==t&&(v.html(w),g.append(v)),f&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),a(p.children,y,c+1),g.append(y)),g.data("select2-data",p),b.push(g[0]);r.append(b),d.text(i.formatMatches(n.length))})(r,n,0)}},e.fn.select2.defaults,i),"function"!=typeof i.id&&(s=i.id,i.id=function(e){return e[s]}),e.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(r?(i.query=this.bind(function(e){var i,r,s,a={results:[],more:!1},o=e.term;s=function(t,i){var n;t.is("option")?e.matcher(o,t.text(),t)&&i.push(l.optionToData(t)):t.is("optgroup")&&(n=l.optionToData(t),t.children().each2(function(e,t){s(t,n.children)}),n.children.length>0&&i.push(n))},i=n.children(),this.getPlaceholder()!==t&&i.length>0&&(r=this.getPlaceholderOption())&&(i=i.not(r)),i.each2(function(e,t){s(t,a.results)}),e.callback(a)}),i.id=function(e){return e.id}):"query"in i||("ajax"in i?(d=i.element.data("ajax-url"),d&&d.length>0&&(i.ajax.url=d),i.query=b.call(i.element,i.ajax)):"data"in i?i.query=M(i.data):"tags"in i&&(i.query=Y(i.tags),i.createSearchChoice===t&&(i.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),i.initSelection===t&&(i.initSelection=function(t,n){var r=[];e(o(t.val(),i.separator,i.transformVal)).each(function(){var t={id:this,text:this},n=i.tags;e.isFunction(n)&&(n=n()),e(n).each(function(){if(a(this.id,t.id))return t=this,!1}),r.push(t)}),n(r)}))),"function"!=typeof i.query)throw"query function not defined for Select2 "+i.element.attr("id");if("top"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===i.createSearchChoicePosition)i.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof i.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return i},monitorSource:function(){var i,n=this.opts.element,r=this;n.on("change.select2",this.bind(function(e){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var e=n.prop("disabled");e===t&&(e=!1),this.enable(!e);var i=n.prop("readonly");i===t&&(i=!1),this.readonly(i),this.container&&(v(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(k(this.opts.containerCssClass,this.opts.element))),this.dropdown&&(v(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(this.opts.dropdownCssClass,this.opts.element)))}),n.length&&n[0].attachEvent&&n.each(function(){this.attachEvent("onpropertychange",r._sync)}),(i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new i(function(t){e.each(t,r._sync)}),this.propertyObserver.observe(n.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var i=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,i,n,r,s,a=this.dropdown,o=this.container,d=o.offset(),l=o.outerHeight(!1),c=o.outerWidth(!1),u=a.outerHeight(!1),h=e(window),p=h.width(),m=h.height(),_=h.scrollLeft()+p,f=h.scrollTop()+m,g=d.top+l,v=d.left,y=g+u<=f,w=d.top-u>=h.scrollTop(),b=a.outerWidth(!1),M=a.hasClass("select2-drop-above");M?(i=!0,!w&&y&&(n=!0,i=!1)):(i=!1,!y&&w&&(n=!0,i=!0)),n&&(a.hide(),d=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),u=a.outerHeight(!1),_=h.scrollLeft()+p,f=h.scrollTop()+m,g=d.top+l,v=d.left,b=a.outerWidth(!1),a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(s=e(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),b=a.outerWidth(!1)+(s.scrollHeight===s.clientHeight?0:F.width),b>c?c=b:b=c,u=a.outerHeight(!1)):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),g-=t.top,v-=t.left),!function(){return v+b<=_}()&&function(){return d.left+_+o.outerWidth(!1)>b}()&&(v=d.left+this.container.outerWidth(!1)-b),r={left:v,width:c},i?(r.top=d.top-u,r.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(r.top=g,r.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),r=e.extend(r,k(this.opts.dropdownCss,this.opts.element)),a.css(r)},shouldOpen:function(){var t;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),J.on("mousemove.select2Event",function(e){X.x=e.pageX,X.y=e.pageY}),!0)},opening:function(){var t,n=this.containerEventName,r="scroll."+n,s="resize."+n,a="orientationchange."+n;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=e("#select2-drop-mask"),0===t.length&&(t=e(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body),t.on("mousedown touchstart click",function(n){i(t);var r,s=e("#select2-drop");s.length>0&&(r=s.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),n.preventDefault(),n.stopPropagation())})),this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),t.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var o=this;this.container.parents().add(window).each(function(){e(this).on(s+" "+r+" "+a,function(e){o.opened()&&o.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,i="scroll."+t,n="resize."+t,r="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(i).off(n).off(r)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),J.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return k(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,i,n,r,s,a,o,d,l=this.results;if(!((i=this.highlight())<0)){if(0==i)return void l.scrollTop(0);t=this.findHighlightableChoices().find(".select2-result-label"),n=e(t[i]),d=(n.offset()||{}).top||0,r=d+n.outerHeight(!0),i===t.length-1&&(o=l.find("li.select2-more-results"),o.length>0&&(r=o.offset().top+o.outerHeight(!0))),s=l.offset().top+l.outerHeight(!1),r>s&&l.scrollTop(l.scrollTop()+(r-s)),a=d-l.offset().top,a<0&&"none"!=n.css("display")&&l.scrollTop(l.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var i=this.findHighlightableChoices(),n=this.highlight();n>-1&&n<i.length;){n+=t;var r=e(i[n]);if(r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(n);break}}},highlight:function(t){var i,n,s=this.findHighlightableChoices();if(0===arguments.length)return r(s.filter(".select2-highlighted")[0],s.get());t>=s.length&&(t=s.length-1),t<0&&(t=0),this.removeHighlight(),i=e(s[t]),i.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",i.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(i.text()),(n=i.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(n),choice:n})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var i=e(t.target).closest(".select2-result-selectable");if(i.length>0&&!i.is(".select2-highlighted")){var n=this.findHighlightableChoices();this.highlight(n.index(i))}else 0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),i=this.resultsPage+1,n=this,r=this.search.val(),s=this.context;0!==t.length&&t.offset().top-e.offset().top-e.height()<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:r,page:i,context:s,matcher:this.opts.matcher,callback:this.bind(function(a){n.opened()&&(n.opts.populateResults.call(this,e,a.results,{term:r,page:i,context:s}),n.postprocessResults(a,!1,!1),!0===a.more?(t.detach().appendTo(e).html(n.opts.escapeMarkup(k(n.opts.formatLoadMore,n.opts.element,i+1))),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):t.remove(),n.positionDropdown(),n.resultsPage=i,n.context=a.context,this.opts.element.trigger({type:"select2-loaded",items:a}))})}))},tokenize:function(){},updateResults:function(i){function n(){l.removeClass("select2-active"),h.positionDropdown(),c.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?h.liveRegion.text(c.text()):h.liveRegion.text(h.opts.formatMatches(c.find('.select2-result-selectable:not(".select2-selected")').length))}function r(e){c.html(e),n()}var s,o,d,l=this.search,c=this.results,u=this.opts,h=this,p=l.val(),m=e.data(this.container,"select2-last-term");if((!0===i||!m||!a(p,m))&&(e.data(this.container,"select2-last-term",p),!0===i||!1!==this.showSearchInput&&this.opened())){d=++this.queryCount;var _=this.getMaximumSelectionSize();if(_>=1&&(s=this.data(),e.isArray(s)&&s.length>=_&&L(u.formatSelectionTooBig,"formatSelectionTooBig")))return void r("<li class='select2-selection-limit'>"+k(u.formatSelectionTooBig,u.element,_)+"</li>");if(l.val().length<u.minimumInputLength)return r(L(u.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+k(u.formatInputTooShort,u.element,l.val(),u.minimumInputLength)+"</li>":""),void(i&&this.showSearch&&this.showSearch(!0));if(u.maximumInputLength&&l.val().length>u.maximumInputLength)return void r(L(u.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+k(u.formatInputTooLong,u.element,l.val(),u.maximumInputLength)+"</li>":"");u.formatSearching&&0===this.findHighlightableChoices().length&&r("<li class='select2-searching'>"+k(u.formatSearching,u.element)+"</li>"),l.addClass("select2-active"),this.removeHighlight(),o=this.tokenize(),o!=t&&null!=o&&l.val(o),this.resultsPage=1,u.query({element:u.element,term:l.val(),page:this.resultsPage,context:null,matcher:u.matcher,callback:this.bind(function(s){var o;if(d==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(s.hasError!==t&&L(u.formatAjaxError,"formatAjaxError"))return void r("<li class='select2-ajax-error'>"+k(u.formatAjaxError,u.element,s.jqXHR,s.textStatus,s.errorThrown)+"</li>");if(this.context=s.context===t?null:s.context,this.opts.createSearchChoice&&""!==l.val()&&(o=this.opts.createSearchChoice.call(h,l.val(),s.results))!==t&&null!==o&&h.id(o)!==t&&null!==h.id(o)&&0===e(s.results).filter(function(){return a(h.id(this),h.id(o))}).length&&this.opts.createSearchChoicePosition(s.results,o),0===s.results.length&&L(u.formatNoMatches,"formatNoMatches"))return void r("<li class='select2-no-results'>"+k(u.formatNoMatches,u.element,l.val())+"</li>");c.empty(),h.opts.populateResults.call(this,c,s.results,{term:l.val(),page:this.resultsPage,context:null}),!0===s.more&&L(u.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+u.escapeMarkup(k(u.formatLoadMore,u.element,this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(s,i),n(),this.opts.element.trigger({type:"select2-loaded",items:s})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(e){if(this._touchMoved)return void this.clearTouchMoved();var t=this.highlight(),i=this.results.find(".select2-highlighted"),n=i.closest(".select2-result").data("select2-data");n?(this.highlight(t),this.onSelect(n,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var i=this.select.children("option").first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&i||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===e.trim(i.text())&&""===i.val())return i}},initContainerWidth:function(){function i(){var i,n,r,s,a,o;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((i=this.opts.element.attr("style"))!==t)for(n=i.split(";"),s=0,a=n.length;s<a;s+=1)if(o=n[s].replace(/\s/g,""),null!==(r=o.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&r.length>=1)return r[1];return"resolve"===this.opts.width?(i=this.opts.element.css("width"),i.indexOf("%")>0?i:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var n=i.call(this);null!==n&&this.container.css("width",n)}}),H=x(C,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,n,r;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),i=this.search.get(0),i.createTextRange?(n=i.createTextRange(),n.collapse(!1),n.select()):i.setSelectionRange&&(r=this.search.val().length,i.setSelectionRange(r,r))),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),S.call(this,"selection","focusser")},initContainer:function(){var t,n,r=this.container,s=this.dropdown,a=Z();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),n=e("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.focus(this.bind(function(){this.focus()})),this.focusser.prev().text(n.text()).attr("for",this.focusser.attr("id"));var o=this.opts.element.attr("title");this.opts.element.attr("title",o||n.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&229!=e.keyCode){if(e.which===E.PAGE_UP||e.which===E.PAGE_DOWN)return void _(e);switch(e.which){case E.UP:case E.DOWN:return this.moveHighlight(e.which===E.UP?-1:1),void _(e);case E.ENTER:return this.selectHighlighted(),void _(e);case E.TAB:return void this.selectHighlighted({noFocus:!0});case E.ESC:return this.cancel(e),void _(e)}}})),this.search.on("blur",this.bind(function(e){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==E.TAB&&!E.isControl(e)&&!E.isFunctionKey(e)&&e.which!==E.ESC){if(!1===this.opts.openOnEnter&&e.which===E.ENTER)return void _(e);if(e.which==E.DOWN||e.which==E.UP||e.which==E.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void _(e)}return e.which==E.DELETE||e.which==E.BACKSPACE?(this.opts.allowClear&&this.clear(),void _(e)):void 0}})),l(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),f(e),this.close(),this.selection&&this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(n){i(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),_(n)})),s.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){_(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.hide(),this.setPlaceholder()},clear:function(t){var i=this.selection.data("select2-data");if(i){var n=e.Event("select2-clearing");if(this.opts.element.trigger(n),n.isDefaultPrevented())return;var r=this.getPlaceholderOption();this.opts.element.val(r?r.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==t&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(e.updateSelection(i),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(i,e.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()!==t&&((e=this.getPlaceholderOption())!==t&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val())},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var n=e.find("option").filter(function(){return this.selected&&!this.disabled});t(i.optionToData(n))}:"data"in t&&(t.initSelection=t.initSelection||function(i,n){var r=i.val(),s=null;t.query({matcher:function(e,i,n){var o=a(r,t.id(n));return o&&(s=n),o},callback:e.isFunction(n)?function(){n(s)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,i){var n=0,r=this;if(this.findHighlightableChoices().each2(function(e,t){if(a(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),!1!==i&&(!0===t&&n>=0?this.highlight(n):this.highlight(0)),!0===t){var s=this.opts.minimumResultsForSearch;s>=0&&this.showSearch(T(e.results)>=s)}},
showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(e,t){if(this.triggerSelect(e)){var i=this.opts.element.val(),n=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),a(i,this.id(e))||this.triggerChange({added:e,removed:n})}},updateSelection:function(e){var i,n,r=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),r.empty(),null!==e&&(i=this.opts.formatSelection(e,r,this.opts.escapeMarkup)),i!==t&&r.append(i),n=this.opts.formatSelectionCssClass(e,r),n!==t&&r.addClass(n),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,i=!1,n=null,r=this,s=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],arguments.length>1&&(i=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return n=r.optionToData(t),!1}),this.updateSelection(n),this.setPlaceholder(),i&&this.triggerChange({added:n,removed:s});else{if(!e&&0!==e)return void this.clear(i);if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){r.opts.element.val(e?r.id(e):""),r.updateSelection(e),r.setPlaceholder(),i&&r.triggerChange({added:e,removed:s})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var i,n=!1;if(0===arguments.length)return i=this.selection.data("select2-data"),i==t&&(i=null),i;arguments.length>1&&(n=arguments[1]),e?(i=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),n&&this.triggerChange({added:e,removed:i})):this.clear(n)}}),j=x(C,{createContainer:function(){return e(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <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(""))},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var n=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){n.push(i.optionToData(t))}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(i,n){var r=o(i.val(),t.separator,t.transformVal),s=[];t.query({matcher:function(i,n,o){var d=e.grep(r,function(e){return a(e,t.id(o))}).length;return d&&s.push(o),d},callback:e.isFunction(n)?function(){for(var e=[],i=0;i<r.length;i++)for(var o=r[i],d=0;d<s.length;d++){var l=s[d];if(a(o,t.id(l))){e.push(l),s.splice(d,1);break}}n(e)}:e.noop})}),t},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");t.length&&e&&e[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e)))},destroy:function(){e("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),S.call(this,"searchContainer","selection")},initContainer:function(){var t,i=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=t=this.container.find(i);var n=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(t){n.search[0].focus(),n.selectChoice(e(this))}),this.search.attr("id","s2id_autogen"+Z()),this.search.prev().text(e("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.opts.element.focus(this.bind(function(){this.focus()})),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var i=t.find(".select2-search-choice-focus"),n=i.prev(".select2-search-choice:not(.select2-locked)"),r=i.next(".select2-search-choice:not(.select2-locked)"),s=m(this.search);if(i.length&&(e.which==E.LEFT||e.which==E.RIGHT||e.which==E.BACKSPACE||e.which==E.DELETE||e.which==E.ENTER)){var a=i;return e.which==E.LEFT&&n.length?a=n:e.which==E.RIGHT?a=r.length?r:null:e.which===E.BACKSPACE?this.unselect(i.first())&&(this.search.width(10),a=n.length?n:r):e.which==E.DELETE?this.unselect(i.first())&&(this.search.width(10),a=r.length?r:null):e.which==E.ENTER&&(a=null),this.selectChoice(a),_(e),void(a&&a.length||this.open())}if((e.which===E.BACKSPACE&&1==this.keydowns||e.which==E.LEFT)&&0==s.offset&&!s.length)return this.selectChoice(t.find(".select2-search-choice:not(.select2-locked)").last()),void _(e);if(this.selectChoice(null),this.opened())switch(e.which){case E.UP:case E.DOWN:return this.moveHighlight(e.which===E.UP?-1:1),void _(e);case E.ENTER:return this.selectHighlighted(),void _(e);case E.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case E.ESC:return this.cancel(e),void _(e)}if(e.which!==E.TAB&&!E.isControl(e)&&!E.isFunctionKey(e)&&e.which!==E.BACKSPACE&&e.which!==E.ESC){if(e.which===E.ENTER){if(!1===this.opts.openOnEnter)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),e.which!==E.PAGE_UP&&e.which!==E.PAGE_DOWN||_(e),e.which===E.ENTER&&_(e)}}})),this.search.on("keyup",this.bind(function(e){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(e.Event("select2-blur"))})),this.container.on("click",i,this.bind(function(t){this.isInterfaceEnabled()&&(e(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",i,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.hide(),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(e.updateSelection(i),e.close(),e.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),i=this.getMaxSearchWidth();e!==t&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(e).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){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.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var i=[],n=[],s=this;e(t).each(function(){r(s.id(this),i)<0&&(i.push(s.id(this)),n.push(this))}),t=n,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){s.addSelectedChoice(this)}),s.postprocessResults()},tokenize:function(){var e=this.search.val();null!=(e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts))&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,i){this.triggerSelect(e)&&""!==e.text&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(e,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),i&&i.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(i){var n,r,s=!i.locked,a=e("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),o=e("<li class='select2-search-choice select2-locked'><div></div></li>"),d=s?a:o,l=this.id(i),c=this.getVal();n=this.opts.formatSelection(i,d.find("div"),this.opts.escapeMarkup),n!=t&&d.find("div").replaceWith(e("<div></div>").html(n)),r=this.opts.formatSelectionCssClass(i,d.find("div")),r!=t&&d.addClass(r),s&&d.find(".select2-search-choice-close").on("mousedown",_).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),_(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),d.data("select2-data",i),d.insertBefore(this.searchContainer),c.push(l),this.setVal(c)},unselect:function(t){var i,n,s=this.getVal();if(t=t.closest(".select2-search-choice"),0===t.length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(i=t.data("select2-data")){var a=e.Event("select2-removing");if(a.val=this.id(i),a.choice=i,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(n=r(this.id(i),s))>=0;)s.splice(n,1),this.setVal(s),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}),!0}},postprocessResults:function(e,t,i){var n=this.getVal(),s=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),o=this;s.each2(function(e,t){r(o.id(t.data("select2-data")),n)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&!1!==i&&!0===this.opts.closeOnSelect&&o.highlight(0),!this.opts.createSearchChoice&&!s.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&L(o.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+k(o.opts.formatNoMatches,o.opts.element,o.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-d(this.search)},resizeSearch:function(){var e,t,i,n,r,s=d(this.search);e=g(this.search)+10,t=this.search.offset().left,i=this.selection.width(),n=this.selection.offset().left,r=i-(t-n)-s,r<e&&(r=i-s),r<40&&(r=i-s),r<=0&&(r=e),this.search.width(Math.floor(r))},getVal:function(){var e;return this.select?(e=this.select.val(),null===e?[]:e):(e=this.opts.element.val(),o(e,this.opts.separator,this.opts.transformVal))},setVal:function(t){var i;this.select?this.select.val(t):(i=[],e(t).each(function(){r(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(e,t){for(var t=t.slice(0),e=e.slice(0),i=0;i<t.length;i++)for(var n=0;n<e.length;n++)a(this.opts.id(t[i]),this.opts.id(e[n]))&&(t.splice(i,1),i>0&&i--,e.splice(n,1),n--);return{added:t,removed:e}},val:function(i,n){var r,s=this;if(0===arguments.length)return this.getVal();if(r=this.data(),r.length||(r=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(n&&this.triggerChange({added:this.data(),removed:r}));if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),n&&this.triggerChange(this.buildChangeDetails(r,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var i=e.map(t,s.id);s.setVal(i),s.updateSelection(t),s.clearSearch(),n&&s.triggerChange(s.buildChangeDetails(r,s.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 t=[],i=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(i.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,i){var n,r,s=this;if(0===arguments.length)return this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();r=this.data(),t||(t=[]),n=e.map(t,function(e){return s.opts.id(e)}),this.setVal(n),this.updateSelection(t),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(r,this.data()))}}),e.fn.select2=function(){var i,n,s,a,o,d=Array.prototype.slice.call(arguments,0),l=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],c=["opened","isFocused","container","dropdown"],u=["val","data"],h={search:"externalSearch"};return this.each(function(){if(0===d.length||"object"==typeof d[0])i=0===d.length?{}:e.extend({},d[0]),i.element=e(this),"select"===i.element.get(0).tagName.toLowerCase()?o=i.element.prop("multiple"):(o=i.multiple||!1,"tags"in i&&(i.multiple=o=!0)),n=o?new window.Select2.class.multi:new window.Select2.class.single,n.init(i);else{if("string"!=typeof d[0])throw"Invalid arguments to select2 plugin: "+d;if(r(d[0],l)<0)throw"Unknown method: "+d[0];if(a=t,(n=e(this).data("select2"))===t)return;if(s=d[0],"container"===s?a=n.container:"dropdown"===s?a=n.dropdown:(h[s]&&(s=h[s]),a=n[s].apply(n,d.slice(1))),r(d[0],c)>=0||r(d[0],u)>=0&&1==d.length)return!1}}),a===t?this:a},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,i,n){var r=[];return y(this.text(e),i.term,r,n),r.join("")},transformVal:function(t){return e.trim(t)},formatSelection:function(e,i,n){return e?n(this.text(e)):t},sortResults:function(e,t,i){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(e,i){return t},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},text:function(t){return t&&this.data&&this.data.text?e.isFunction(this.data.text)?this.data.text(t):t[this.data.text]:t.text},matcher:function(e,t){return n(""+t).toUpperCase().indexOf(n(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:D,escapeMarkup:w,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null},nextSearchTerm:function(e,i){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){return!(("ontouchstart"in window||navigator.msMaxTouchPoints>0)&&e.opts.minimumResultsForSearch<0)}},e.fn.select2.locales=[],e.fn.select2.locales.en={formatMatches:function(e){return 1===e?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(e,t,i){return"Loading failed"},formatInputTooShort:function(e,t){var i=t-e.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(e,t){var i=e.length-t;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(e){return"Loading more results…"},formatSearching:function(){return"Searching…"}},e.extend(e.fn.select2.defaults,e.fn.select2.locales.en),e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:b,local:M,tags:Y},util:{debounce:u,markMatch:y,escapeMarkup:w,stripDiacritics:n},class:{abstract:C,single:H,multi:j}}}}(jQuery),define("select2",function(){}),define("app/views/folder-perm",["jquery","underscore","backbone","common","jquery.ui","select2","app/views/repo-folder-perm-item"],function(e,t,i,n,r,s,a){"use strict";return i.View.extend({tagName:"div",id:"folder-perm-popup",template:t.template(e("#folder-perm-popup-tmpl").html()),initialize:function(t){this.repo_id=t.repo_id,this.obj_name=t.obj_name,this.path=t.dir_path,this.is_group_owned_repo=t.is_group_owned_repo,this.group_id=t.group_id,this.render(),e(window).width()<768&&this.$el.css({width:e(window).width()-50,height:e(window).height()-50,overflow:"auto"}),this.$el.modal({focus:!1}),e(window).width()>=768&&e("#simplemodal-container").css({width:"auto",height:"auto"}),this.$("#folder-perm-tabs").tabs(),this.panelsInit(),this.$add_user_perm=this.$("#add-user-folder-perm"),this.$add_group_perm=this.$("#add-group-folder-perm");var i=this;e(document).on("click",function(e){var t=e.target||event.srcElement;i.$(".perm-edit-icon, .perm-toggle-select").is(t)||(i.$(".perm").removeClass("hide"),i.$(".perm-toggle-select").addClass("hide"))})},render:function(){return this.$el.html(this.template({title:gettext("Set {placeholder}'s permission").replace("{placeholder}",'<span class="op-target ellipsis ellipsis-op-target" title="'+n.HTMLescape(this.obj_name)+'">'+n.HTMLescape(this.obj_name)+"</span>")})),this},panelsInit:function(){var t=this;n.ajaxGet({get_url:n.getUrl({name:this.is_group_owned_repo?"group-owned-library-user-folder-permission":"repo_user_folder_perm",repo_id:this.repo_id}),data:{folder_path:this.path},after_op_success:function(i){e(i).each(function(i,n){var r=new a({item_data:e.extend(n,{is_group_owned_repo:t.is_group_owned_repo,for_user:!0})});t.$add_user_perm.after(r.el)})}}),n.ajaxGet({get_url:n.getUrl({name:this.is_group_owned_repo?"group-owned-library-group-folder-permission":"repo_group_folder_perm",repo_id:this.repo_id}),data:{folder_path:this.path},after_op_success:function(i){e(i).each(function(i,n){var r=new a({item_data:e.extend(n,{is_group_owned_repo:t.is_group_owned_repo,for_user:!1})});t.$add_group_perm.after(r.el)})}});e('[name="email"]',this.$add_user_perm).select2(n.contactInputOptionsForSelect2());var i,r=function(i){for(var n="",r=0,s=i.length;r<s;r++)n+='<option value="'+i[r].id+'" data-index="'+r+'">'+i[r].name+"</option>";e('[name="group"]',t.$add_group_perm).html(n).select2({placeholder:gettext("Select groups"),escapeMarkup:function(e){return e}})};e.ajax({url:n.getUrl({name:"shareable_groups"}),cache:!1,dataType:"json",success:function(e){i=e},error:function(e){i=[]},complete:function(){r(i)}})},events:{"click #add-user-folder-perm .submit":"addFolderPerm","click #add-group-folder-perm .submit":"addFolderPerm"},addFolderPerm:function(t){var i,r,s,o,d;if("add-user-folder-perm"==e(t.currentTarget).closest("tr").attr("id")){i=this.$add_user_perm,r=e("#user-folder-perm .error"),s=n.getUrl({name:this.is_group_owned_repo?"group-owned-library-user-folder-permission":"repo_user_folder_perm",repo_id:this.repo_id});var l=e('[name="email"]',i),c=l.val(),u=e('[name="permission"]',i).val();if(!c||!u)return!1;o={folder_path:this.path,user_email:c.split(","),permission:u},d={is_group_owned_repo:this.is_group_owned_repo,for_user:!0}}else{i=this.$add_group_perm,r=e("#group-folder-perm .error"),s=n.getUrl({name:this.is_group_owned_repo?"group-owned-library-group-folder-permission":"repo_group_folder_perm",repo_id:this.repo_id});var l=e('[name="group"]',i),h=l.val().join(","),u=e('[name="permission"]',i).val();if(!h||!u)return!1;o={folder_path:this.path,group_id:h.split(","),permission:u},d={is_group_owned_repo:this.is_group_owned_repo,for_user:!1}}var p=i.children('[type="submit"]');n.disableButton(p),e.ajax({url:s,dataType:"json",method:"POST",beforeSend:n.prepareCSRFToken,traditional:!0,data:o,success:function(t){if(t.success.length>0&&(e(t.success).each(function(t,n){var r=new a({item_data:e.extend(n,d)});i.closest("tr").after(r.el)}),l.select2("val",""),r.addClass("hide")),t.failed.length>0){var s="";e(t.failed).each(function(e,t){s+=n.HTMLescape(t.user_email||t.group_id)+": "+n.HTMLescape(t.error_msg)+"<br />"}),r.html(s).removeClass("hide")}},error:function(e){var t=n.prepareAjaxErrorMsg(e);r.html(t).show()}})}})}),define("app/views/dirent",["jquery","underscore","backbone","common","file-tree","app/views/share","app/views/dialogs/dirent-mvcp","app/views/dialogs/dirent-smart-link","app/views/folder-perm","app/views/widgets/hl-item-view","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o,d,l,c){"use strict";return l.extend({tagName:"tr",attributes:{draggable:"true"},fileTemplate:t.template(e("#dirent-file-tmpl").html()),fileMobileTemplate:t.template(e("#dirent-file-mobile-tmpl").html()),dirTemplate:t.template(e("#dirent-dir-tmpl").html()),dirMobileTemplate:t.template(e("#dirent-dir-mobile-tmpl").html()),renameTemplate:t.template(e("#rename-form-template").html()),initialize:function(e){l.prototype.initialize.call(this),this.dirView=e.dirView,this.dir=this.dirView.dir,this.listenTo(this.model,"change",this.render),this.listenTo(this.model,"remove",this.remove)},render:function(){var t,i=this.dir,r=n.pathJoin([i.path,this.model.get("obj_name")]),s=n.isHiDPI()?48:24;t=this.model.get("is_dir")?e(window).width()<768?this.dirMobileTemplate:this.dirTemplate:e(window).width()<768?this.fileMobileTemplate:this.fileTemplate;var a=!1;return app.pageOptions.folder_perm_enabled&&!i.is_virtual&&(i.is_repo_owner&&i.has_been_shared_out||i.is_admin||i.user_can_set_folder_perm)&&(a=!0),this.$el.html(t({dirent:this.model.attributes,dirent_path:r,encoded_path:n.encodePath(r),icon_url:this.model.getIconUrl(s),url:this.model.getWebUrl(),download_url:this.model.getDownloadUrl(),category:i.category,repo_id:i.repo_id,is_repo_owner:i.is_repo_owner,is_admin:i.is_admin,repo_encrypted:i.encrypted,can_set_folder_perm:a,can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link,is_pro:app.pageOptions.is_pro,file_audit_enabled:app.pageOptions.file_audit_enabled})),this.$(".file-locked-icon").attr("title",gettext("locked by {placeholder}").replace("{placeholder}",this.model.get("lock_owner_name"))),this.dropdown=new c({el:this.$(".sf-dropdown"),right:"0"}),this.mobileMenu=this.$(".mobile-menu-container"),this.$(".img-name-link").magnificPopup(this.dirView.magnificPopupOptions),this},events:{click:"clickItem","click .select":"select","click .file-star":"starFile","click .dirent-name":"visitDirent","click .img-name-link":"viewImageWithPopup","click .dirent-smart-link":"getSmartLink",dragstart:"itemDragstart",dragover:"itemDragover",dragenter:"itemDragenter",dragleave:"itemDragleave",drop:"itemDrop","click .download-dir":"downloadDir","click .share":"share","click .delete":"del","click .rename":"rename","click .mv":"mvcp","click .cp":"mvcp","click .set-folder-permission":"setFolderPerm","click .lock-file":"lockFile","click .unlock-file":"unlockFile","click .view-details":"viewDetails","click .file-comment":"viewFileComments","click .open-via-client":"open_via_client","click .mobile-menu-control":"showMobileMenu","click .mobile-menu-mask":"closeMobileMenu","click .download-close-menu":"hideMobileMenu"},getSmartLink:function(){return new o({dir:this.dir,attributes:this.model.attributes}),!1},_hideMenu:function(){this.dropdown.hide()},clickItem:function(e){var t=e.target||event.srcElement;this.$("td").is(t)&&(this.dirView.direntDetailsView.$el.is(":visible")&&this.viewDetails(),this.model.get("is_file")&&this.dirView.fileCommentsView.$el.is(":visible")&&this.viewFileComments())},select:function(){this.$("[type=checkbox]").prop("checked")?this.model.set({selected:!0},{silent:!0}):this.model.set({selected:!1},{silent:!0});var t=this.dirView,i=t.$("#multi-dirents-op"),n=t.$("th [type=checkbox]"),r=0;t.$("tr:gt(0) [type=checkbox]").each(function(){e(this).prop("checked")&&(r+=1)});var s=t.$("#cur-dir-ops");r>0?(i.css({display:"inline-block"}),s.hide()):(i.hide(),s.show()),r==t.$("tr:gt(0)").length?n.prop("checked",!0):n.prop("checked",!1)},itemDragstart:function(e){if("rw"!=this.model.get("perm"))return!1;var t=e.originalEvent;t.dataTransfer.setData("text/cid",this.model.cid),t.dataTransfer.setData("text/is_dir",this.model.get("is_dir")),t.dataTransfer.setData("text/plain",this.model.get("obj_name")),t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(this.$(".dirent-icon img")[0],0,0)},itemDragover:function(e){var t=e.originalEvent;if(t.preventDefault(),!t.dataTransfer.types.length||-1!=t.dataTransfer.types.indexOf("text/cid"))return"rw"==this.model.get("perm")&&(!!this.model.get("is_dir")&&void(t.dataTransfer.dropEffect="move"))},itemDragenter:function(e){var t=e.originalEvent;if(t.preventDefault(),!t.dataTransfer.types.length||-1!=t.dataTransfer.types.indexOf("text/cid"))return"rw"==this.model.get("perm")&&(!!this.model.get("is_dir")&&void this.$el.css({"background-color":"#f8f8f8"}))},itemDragleave:function(e){var t=e.originalEvent;if(t.preventDefault(),!t.dataTransfer.types.length||-1!=t.dataTransfer.types.indexOf("text/cid"))return"rw"==this.model.get("perm")&&(!!this.model.get("is_dir")&&void this.$el.removeAttr("style"))},itemDrop:function(t){var i=t.originalEvent;if(i.preventDefault(),!i.dataTransfer.types.length||-1!=i.dataTransfer.types.indexOf("text/cid")){if("rw"!=this.model.get("perm"))return!1;if(!this.model.get("is_dir"))return!1;this.$el.removeAttr("style");var r=i.dataTransfer.getData("text/cid"),s=i.dataTransfer.getData("text/is_dir"),a=i.dataTransfer.getData("text/plain");if("true"==s&&a==this.model.get("obj_name"))return!1;var o=this.dir,d=o.repo_id,l=o.path,c=n.pathJoin([l,this.model.get("obj_name")]);e.ajax({url:n.getUrl({name:"copy_move_task"}),type:"post",cache:!1,dataType:"json",data:{src_repo_id:d,src_parent_dir:l,src_dirent_name:a,dst_repo_id:d,dst_parent_dir:c,operation:"move",dirent_type:"true"==s?"dir":"file"},beforeSend:n.prepareCSRFToken,success:function(){var e=gettext("Successfully moved %(name)s").replace("%(name)s",a);n.feedback(e,"success"),o.remove(r)},error:function(e){n.ajaxErrorHandler(e)}})}},downloadDir:function(){this.hideMobileMenu();var e=this.dirView.dir,t=this.model.get("obj_name");return n.zipDownload(e.repo_id,e.path,t),!1},starFile:function(){var t=this,i=this.dirView.dir,r=this.model.get("starred"),s=n.pathJoin([i.path,this.model.get("obj_name")]);return r?e.ajax({url:n.getUrl({name:"starred_files"})+"?repo_id="+i.repo_id+"&p="+encodeURIComponent(s),type:"DELETE",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){t.model.set({starred:!1})},error:function(e){n.ajaxErrorHandler(e)}}):e.ajax({url:n.getUrl({name:"starred_files"}),type:"POST",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,data:{repo_id:i.repo_id,p:s},success:function(){t.model.set({starred:!0})},error:function(e){n.ajaxErrorHandler(e)}}),!1},visitDirent:function(){if(e(window).width()<768&&!this.model.get("is_img"))return location.href=this.$(".dirent-name a").attr("href"),!1},viewImageWithPopup:function(){var t=e(".img-name-link",this.dirView.$table).index(this.$(".img-name-link"));e.magnificPopup.open(this.dirView.magnificPopupOptions,t)},share:function(){this.hideMobileMenu();var t=this.dir,i=this.model.get("obj_name"),r=n.pathJoin([t.path,i]),a={is_repo_owner:t.is_repo_owner,is_virtual:t.is_virtual,user_perm:this.model.get("perm"),repo_id:t.repo_id,repo_encrypted:!1,is_dir:!!this.model.get("is_dir"),dirent_path:r,obj_name:i};return app.pageOptions.is_pro&&(a.is_admin=t.is_admin,this.dirView.is_address_book_group_admin&&e.extend(a,{is_address_book_group_admin:!0,is_group_owned_repo:this.dirView.is_group_owned_repo})),new s(a),this._hideMenu(),!1},del:function(){this.hideMobileMenu();var t=this;if(this.model.get("is_img"))var i=e(".img-name-link",this.dirView.$table).index(this.$(".img-name-link"));var r=this.model.get("obj_name");return this.model.deleteFromServer({success:function(e){var s=gettext("Successfully deleted %(name)s").replace("%(name)s",r);n.feedback(s,"success"),t._hideMenu(),t.model.get("is_img")&&t.dirView.updateMagnificPopupOptions({op:"delete-item",index:i})},error:function(e){n.ajaxErrorHandler(e)}}),!1},rename:function(){this.hideMobileMenu();var t=this,i=this.model.get("obj_name"),r=e(this.renameTemplate({dirent_name:i})),s=this.$(".dirent-name"),a=this.$(".dirent-op"),o=s.closest("td"),d=this.$(".dirent-smart-link");o.attr("colspan",2).css({width:s.width()+a.outerWidth(),height:s.height()}).append(r),a.hide(),d.hide(),s.hide(),this.$el.attr("draggable",!1);var l=e('[name="newname"]',r),c=i.lastIndexOf(".");this.model.get("is_dir")||-1==c?l.trigger("select"):(l.trigger("focus"),l[0].setSelectionRange(0,c)),this._hideMenu(),app.ui.freezeItemHightlight=!0;var u=function(i){if(app.ui.freezeItemHightlight=!1,app.ui.currentHighlightedItem&&app.ui.currentHighlightedItem.rmHighlight(),t.$el.attr("draggable",!0),t.model.get("is_img")){var n=e(".img-name-link",t.dirView.$table).index(t.$(".img-name-link"));t.dirView.updateMagnificPopupOptions({op:"update-item",index:n,model:t.model})}},h=function(){return app.ui.freezeItemHightlight=!1,app.ui.currentHighlightedItem&&app.ui.currentHighlightedItem.rmHighlight(),r.remove(),a.show(),s.show(),d.removeAttr("style"),o.attr("colspan",1).css({width:s.width()}),t.$el.attr("draggable",!0),!1};e(".cancel",r).on("click",h);var t=this;return r.on("submit",function(){var s,a=e.trim(e('[name="newname"]',r).val());if(!a)return s=gettext("It is required."),n.feedback(s,"error"),!1
;if(-1!=a.indexOf("/"))return s=gettext("Name should not include '/'."),n.feedback(s,"error"),!1;if(a==i)return h(),!1;var o=e('[type="submit"]',r);n.disableButton(o);var d=function(e){var t=n.prepareAjaxErrorMsg(e);n.feedback(t,"error"),n.enableButton(o)};return t.model.rename({newname:a,success:u,error:d}),!1}),!1},mvcp:function(t){this.hideMobileMenu();var i=e(t.currentTarget).hasClass("mv")?"mv":"cp",n={dirView:this.dirView,dir:this.dir,dirent:this.model,op_type:i};if(this.model.get("is_img")&&"mv"==i){var r=e(".img-name-link",this.dirView.$table).index(this.$(".img-name-link"));e.extend(n,{imgIndex:r})}return this._hideMenu(),new a(n),!1},setFolderPerm:function(){this.hideMobileMenu();var e=this.model.get("obj_name"),t={obj_name:e,dir_path:n.pathJoin([this.dir.path,e]),repo_id:this.dir.repo_id,is_group_owned_repo:!!this.dir.user_can_set_folder_perm};return t.is_group_owned_repo&&(t.group_id=this.dirView.contextOptions.group_id),this._hideMenu(),new d(t),!1},lockFile:function(){this.hideMobileMenu();var e=this;return this._hideMenu(),this.model.lockFile({success:function(){e.$el.removeClass("hl")},error:function(e){n.ajaxErrorHandler(e)}}),!1},unlockFile:function(){this.hideMobileMenu();var e=this;return this._hideMenu(),this.model.unlockFile({success:function(){e.$el.removeClass("hl")},error:function(e){n.ajaxErrorHandler(e)}}),!1},viewDetails:function(){this.hideMobileMenu(),this.dirView.fileCommentsView.$el.is(":visible")&&this.dirView.fileCommentsView.hide();var t=this,i=this.dirView.direntDetailsView,r=n.isHiDPI()?48:24,s={repo_id:this.dir.repo_id,dir_path:this.dir.path,icon_url:this.model.getIconUrl(r),big_icon_url:this.model.getIconUrl(192),dirent:this.model.attributes,thumbnail_url:"",path:this.dir.repo_name+this.dir.path};return app.pageOptions.enable_thumbnail&&!this.dir.encrypted&&(this.model.get("is_img")||this.model.get("is_video"))&&(s.thumbnail_url=n.getUrl({name:"thumbnail_get",repo_id:this.dir.repo_id,path:n.encodePath(n.pathJoin([this.dir.path,this.model.get("obj_name")])),size:1024})),i.show(s),"rw"==this.model.get("perm")&&(this.getTags=function(){e.ajax({url:n.getUrl({name:"tags",repo_id:this.dir.repo_id}),cache:!1,data:{path:n.pathJoin([this.dir.path,this.model.get("obj_name")]),is_dir:!!this.model.get("is_dir")},dataType:"json",success:function(e){i.updateTags(e)},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.updateTags({error_msg:t})}})},this.model.get("is_file")&&this.getTags()),this.model.get("is_dir")&&e.ajax({url:n.getUrl({name:"dir-details",repo_id:this.dir.repo_id}),cache:!1,data:{path:n.pathJoin([this.dir.path,this.model.get("obj_name")])},dataType:"json",success:function(e){i.update({dir_count:e.dir_count,file_count:e.file_count,size:n.fileSizeFormat(e.size,1)}),"rw"==t.model.get("perm")&&t.getTags()},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.update({error_msg:t})}}),this._hideMenu(),!1},viewFileComments:function(){this.hideMobileMenu(),this.dirView.direntDetailsView.$el.is(":visible")&&this.dirView.direntDetailsView.hide();var e=n.isHiDPI()?48:24;return this.dirView.fileCommentsView.show({is_repo_owner:this.dir.is_repo_owner,repo_id:this.dir.repo_id,path:n.pathJoin([this.dir.path,this.model.get("obj_name")]),icon_url:this.model.getIconUrl(e),file_name:this.model.get("obj_name")}),this._hideMenu(),!1},open_via_client:function(){return this.hideMobileMenu(),this._hideMenu(),!0},showMobileMenu:function(e){var t=this.mobileMenu.length?this.mobileMenu:null;return t&&t.slideDown("fast"),!1},hideMobileMenu:function(){var e=this.mobileMenu.length?this.mobileMenu:null;e&&e.slideUp("fast")},closeMobileMenu:function(){return this.hideMobileMenu(),!1}})}),define("app/views/dialogs/dirent-rename",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({template:t.template(e("#dirent-rename-dialog-template").html()),initialize:function(t){this.dirent=t.dirent,this.dir=t.dir,this.dirView=t.dirView,this.imgIndex=t.imgIndex,this.render(),this.$el.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"});var i=this.$('[name="newname"]'),n=this.dirent.get("obj_name").lastIndexOf(".");this.dirent.get("is_dir")||-1==n?i.trigger("select"):(i.trigger("focus"),i[0].setSelectionRange(0,n)),this.$error=this.$(".error"),this.$form=this.$("form")},render:function(){var e=this.dirent.get("is_dir")?gettext("Rename Folder"):gettext("Rename File");return this.$el.html(this.template({form_title:e,dirent_name:this.dirent.get("obj_name")})),this},events:{"submit form":"formSubmit"},formSubmit:function(){var t,i=this,r=e.trim(this.$('[name="newname"]').val());if(!r)return t=gettext("It is required."),this.$error.html(t).removeClass("hide"),!1;if(-1!=r.indexOf("/"))return t=gettext("Name should not include '/'."),this.$error.html(t).removeClass("hide"),!1;if(r==this.dirent.get("obj_name"))return e.modal.close(),!1;var s=this.$('[type="submit"]');return n.disableButton(s),this.dirent.rename({newname:r,success:function(){e.modal.close(),i.dirent.get("is_img")&&i.dirView.updateMagnificPopupOptions({op:"update-item",index:i.imgIndex,model:i.dirent})},error:function(e,t,r){var a=n.prepareAjaxErrorMsg(e);i.$error.html(a).removeClass("hide"),n.enableButton(s)}}),!1}})}),define("app/views/dirent-grid",["jquery","underscore","backbone","common","file-tree","app/views/share","app/views/folder-perm","app/views/dialogs/dirent-mvcp","app/views/dialogs/dirent-rename"],function(e,t,i,n,r,s,a,o,d){"use strict";return app=app||{},app.globalState=app.globalState||{},i.View.extend({tagName:"li",className:"grid-item",dirTemplate:t.template(e("#grid-view-dir-item-tmpl").html()),dirOpTemplate:t.template(e("#grid-view-dir-op-tmpl").html()),fileTemplate:t.template(e("#grid-view-file-item-tmpl").html()),fileOpTemplate:t.template(e("#grid-view-file-op-tmpl").html()),renameTemplate:t.template(e("#dirent-rename-dialog-template").html()),initialize:function(e){this.dirView=e.dirView,this.dir=this.dirView.dir,this.listenTo(this.model,"change",this.render),this.listenTo(this.model,"remove",this.remove)},render:function(){var e,t=this.dir,i=this.model.getPath();return e=this.model.get("is_dir")?this.dirTemplate:this.fileTemplate,this.$el.html(e({dirent:this.model.attributes,dirent_path:i,icon_url:this.model.getIconUrl(192),url:this.model.getWebUrl(),category:t.category,repo_id:t.repo_id,is_repo_owner:t.is_repo_owner,is_pro:app.pageOptions.is_pro,repo_encrypted:t.encrypted})),this.$(".file-locked-icon").attr("title",gettext("locked by {placeholder}").replace("{placeholder}",this.model.get("lock_owner_name"))),this.$el.attr("title",this.model.get("obj_name")),this.model.get("is_img")&&(this.$(".img-link, .text-link").magnificPopup(this.dirView.magnificPopupOptions),this.$el.addClass("img-grid-item")),this},events:{mouseenter:"highlight",mouseleave:"rmHighlight",click:"closeMenu","click .img-link":"viewImageWithPopup","click .text-link":"viewImageWithPopup",contextmenu:"showPopupMenu"},highlight:function(){this.$(".img-link").addClass("hl"),this.$(".text-link").addClass("hl")},rmHighlight:function(){this.$(".img-link").removeClass("hl"),this.$(".text-link").removeClass("hl")},showPopupMenu:function(i){e(".grid-item-op",this.dirView.$gridViewContainer).remove();var n,r=this.dir;n=this.model.get("is_dir")?this.dirOpTemplate:this.fileOpTemplate,this.$(".img-link").addClass("hl"),this.$(".text-link").addClass("hl");var s=!1;app.pageOptions.folder_perm_enabled&&!r.is_virtual&&(r.is_repo_owner&&r.has_been_shared_out||r.is_admin||r.user_can_set_folder_perm)&&(s=!0);var a=n({dirent:this.model.attributes,dirent_path:this.model.getPath(),download_url:this.model.getDownloadUrl(),category:r.category,repo_id:r.repo_id,is_repo_owner:r.is_repo_owner,is_admin:r.is_admin,can_set_folder_perm:s,can_generate_share_link:app.pageOptions.can_generate_share_link,can_generate_upload_link:app.pageOptions.can_generate_upload_link,is_pro:app.pageOptions.is_pro,file_audit_enabled:app.pageOptions.file_audit_enabled,repo_encrypted:r.encrypted});this.$el.append(a);var o=this.$el.offset();return this.$(".grid-item-op").css({position:"absolute",left:i.pageX-o.left,top:i.pageY-o.top}),this.$(".download-dir").on("click",t.bind(this.download,this)),this.$(".delete").on("click",t.bind(this.del,this)),this.$(".share").on("click",t.bind(this.share,this)),this.$(".mv").on("click",t.bind(this.mvcp,this)),this.$(".cp").on("click",t.bind(this.mvcp,this)),this.$(".rename").on("click",t.bind(this.rename,this)),this.$(".open-via-client").on("click",t.bind(this.open_via_client,this)),this.$(".lock-file").on("click",t.bind(this.lockFile,this)),this.$(".unlock-file").on("click",t.bind(this.unlockFile,this)),this.$(".view-details").on("click",t.bind(this.viewDetails,this)),this.$(".file-comment").on("click",t.bind(this.viewFileComments,this)),this.$(".set-folder-permission").on("click",t.bind(this.setFolderPerm,this)),!1},viewImageWithPopup:function(){if(this.model.get("is_img")){var t=e(".img-grid-item",this.dirView.$gridViewContainer).index(this.$el);e.magnificPopup.open(this.dirView.magnificPopupOptions,t)}},closeMenu:function(){this.$(".grid-item-op").remove()},download:function(){this.closeMenu();var e=this.dir,t=this.model.get("obj_name");return n.zipDownload(e.repo_id,e.path,t),!1},del:function(){var t=this;if(this.model.get("is_img"))var i=e(".img-grid-item",this.dirView.$gridViewContainer).index(this.$el);this.closeMenu();var r=this.model.get("obj_name");return this.model.deleteFromServer({success:function(e){var s=gettext("Successfully deleted %(name)s").replace("%(name)s",r);n.feedback(s,"success"),t.model.get("is_img")&&t.dirView.updateMagnificPopupOptions({op:"delete-item",index:i})},error:function(e){n.ajaxErrorHandler(e)}}),!1},share:function(){var t=this.dir,i=this.model.get("obj_name"),n=this.model.getPath(),r={is_repo_owner:t.is_repo_owner,is_virtual:t.is_virtual,user_perm:this.model.get("perm"),repo_id:t.repo_id,repo_encrypted:!1,is_dir:!!this.model.get("is_dir"),dirent_path:n,obj_name:i};return app.pageOptions.is_pro&&(r.is_admin=t.is_admin,this.dirView.is_address_book_group_admin&&e.extend(r,{is_address_book_group_admin:!0,is_group_owned_repo:this.dirView.is_group_owned_repo})),new s(r),this.closeMenu(),!1},mvcp:function(t){var i=e(t.currentTarget).hasClass("mv")?"mv":"cp",n={dirView:this.dirView,dir:this.dir,dirent:this.model,op_type:i};if(this.model.get("is_img")&&"mv"==i){var r=e(".img-grid-item",this.dirView.$gridViewContainer).index(this.$el);e.extend(n,{imgIndex:r})}return new o(n),this.closeMenu(),!1},rename:function(){this.closeMenu();var t={dir:this.dir,dirent:this.model};if(this.model.get("is_img")){var i=e(".img-grid-item",this.dirView.$gridViewContainer).index(this.$el);e.extend(t,{dirView:this.dirView,imgIndex:i})}return new d(t),!1},setFolderPerm:function(){var e=this.model.get("obj_name"),t={obj_name:e,dir_path:n.pathJoin([this.dir.path,e]),repo_id:this.dir.repo_id,is_group_owned_repo:!!this.dir.user_can_set_folder_perm};return t.is_group_owned_repo&&(t.group_id=this.dirView.contextOptions.group_id),new a(t),!1},lockFile:function(){return this.closeMenu(),this.model.lockFile({success:function(){},error:function(e){n.ajaxErrorHandler(e)}}),!1},unlockFile:function(){return this.closeMenu(),this.model.unlockFile({success:function(){},error:function(e){n.ajaxErrorHandler(e)}}),!1},viewDetails:function(){this.dirView.fileCommentsView.$el.is(":visible")&&this.dirView.fileCommentsView.hide();var t=this,i=this.dirView.direntDetailsView,r=n.isHiDPI()?48:24,s={repo_id:this.dir.repo_id,dir_path:this.dir.path,icon_url:this.model.getIconUrl(r),big_icon_url:this.model.getIconUrl(192),dirent:this.model.attributes,thumbnail_url:"",path:this.dir.repo_name+this.dir.path};return app.pageOptions.enable_thumbnail&&!this.dir.encrypted&&(this.model.get("is_img")||this.model.get("is_video"))&&(s.thumbnail_url=n.getUrl({name:"thumbnail_get",repo_id:this.dir.repo_id,path:n.encodePath(n.pathJoin([this.dir.path,this.model.get("obj_name")])),size:1024})),i.show(s),"rw"==this.model.get("perm")&&(this.getTags=function(){e.ajax({url:n.getUrl({name:"tags",repo_id:this.dir.repo_id}),cache:!1,data:{path:n.pathJoin([this.dir.path,this.model.get("obj_name")]),is_dir:!!this.model.get("is_dir")},dataType:"json",success:function(e){i.updateTags(e)},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.updateTags({error_msg:t})}})},this.model.get("is_file")&&this.getTags()),this.model.get("is_dir")&&e.ajax({url:n.getUrl({name:"dir-details",repo_id:this.dir.repo_id}),cache:!1,data:{path:n.pathJoin([this.dir.path,this.model.get("obj_name")])},dataType:"json",success:function(e){i.update({dir_count:e.dir_count,file_count:e.file_count,size:n.fileSizeFormat(e.size,1)}),"rw"==t.model.get("perm")&&t.getTags()},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.update({error_msg:t})}}),this.closeMenu(),!1},viewFileComments:function(){this.dirView.direntDetailsView.$el.is(":visible")&&this.dirView.direntDetailsView.hide();var e=n.isHiDPI()?48:24;return this.dirView.fileCommentsView.show({is_repo_owner:this.dir.is_repo_owner,repo_id:this.dir.repo_id,path:n.pathJoin([this.dir.path,this.model.get("obj_name")]),icon_url:this.model.getIconUrl(e),file_name:this.model.get("obj_name")}),this.closeMenu(),!1},open_via_client:function(){return this.closeMenu(),!0}})}),define("app/views/dirent-details",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({id:"dirent-details",className:"details-panel",template:t.template(e("#dirent-details-tmpl").html()),initialize:function(t){this.dirView=t.dirView;var i=this;e(document).on("keydown",function(e){27==e.which&&i.hide()})},events:{"click .js-close":"close","click .tags-edit-icon":"switchToEditTags","click .tags-submit-btn":"submitTags"},render:function(){this.$el.html(this.template(this.data));var e=this;this.$(".details-panel-img-container img").on("load",function(){e.showImg()}),this.$(".thumbnail").on("error",function(){e.getBigIcon()})},update:function(t){var i=this.$(".details-panel-text-info-container");e(".loading-tip",i).hide(),t.error_msg?e(".error",i).html(t.error_msg).show():(this.$(".dir-folder-counts").html(t.dir_count),this.$(".dir-file-counts").html(t.file_count),this.$(".dir-size").html(t.size),e("table",i).show())},updateTags:function(t){var i=this.$(".tags-container");if(e(".loading-icon",i).hide(),t.error_msg)e(".error",i).html(t.error_msg).show();else{for(var r=t.tags,s="",a=[],o=0,d=r.length;o<d;o++)s+='<li class="cur-tag fleft">'+n.HTMLescape(r[o].name)+"</li>",a.push({id:r[o].name,text:r[o].name});this.s2_tags=a,e(".cur-tags",i).html(s).show(),e(".tags-edit-icon",i).show()}},switchToEditTags:function(){this.$(".cur-tags, .tags-edit-icon").hide(),this.$(".tags-submit-btn").show();var e=this.$("input.tags-input"),t=this.$(".tags-input.select2-container");return t.length?(e.select2("data",this.s2_tags),t.show()):e.show().select2({tags:[],formatNoMatches:gettext("No matches")}).select2("data",this.s2_tags),!1},submitTags:function(){for(var t,i=this,r=this.$(".tags-input"),s=r.select2("val"),a=this.$(".tags-submit-btn"),o=this.$(".tags-container .error"),d=0,l=s.length;d<l;d++)if(-1!=s[d].indexOf(",")){t=gettext("Tag should not include ','.");break}if(t)return o.html(t).show(),!1;n.disableButton(a),e.ajax({url:n.getUrl({name:"tags",repo_id:this.data.repo_id}),type:"PUT",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,data:{path:n.pathJoin([this.data.dir_path,this.data.dirent.obj_name]),is_dir:!!this.data.dirent.is_dir,names:s.join(",")},success:function(e){for(var t=e.tags,r="",s=[],o=0,d=t.length;o<d;o++)r+='<li class="cur-tag fleft">'+n.HTMLescape(t[o].name)+"</li>",s.push({id:t[o].name,text:t[o].name});i.s2_tags=s,i.$(".tags-input").hide(),a.hide(),i.$(".cur-tags").html(r).show(),i.$(".tags-edit-icon").show()},error:function(e){var t=n.prepareAjaxErrorMsg(e);o.html(t).show()},complete:function(){n.enableButton(a)}})},hide:function(){this.$el.hide()},close:function(){return this.hide(),!1},show:function(t){this.data=t,this.render(),0==e("#"+this.id).length?(this.dirView.$mainCon.append(this.$el),this.$el.is(":visible")||this.$el.show()):this.$el.show()},showImg:function(){var t=this.$(".details-panel-img-container");e(".loading-icon",t).hide(),e("img",t).show()},getBigIcon:function(){this.$(".thumbnail").attr({src:this.data.big_icon_url,width:96}).removeClass("thumbnail")}})}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.iframe-transport",["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery)}(function(e){"use strict";var t=0;e.ajaxTransport("iframe",function(i){if(i.async){var n,r,s,a=i.initialIframeSrc||"javascript:false;";return{send:function(o,d){n=e('<form style="display:none;"></form>'),n.attr("accept-charset",i.formAcceptCharset),s=/\?/.test(i.url)?"&":"?","DELETE"===i.type?(i.url=i.url+s+"_method=DELETE",i.type="POST"):"PUT"===i.type?(i.url=i.url+s+"_method=PUT",i.type="POST"):"PATCH"===i.type&&(i.url=i.url+s+"_method=PATCH",i.type="POST"),t+=1,r=e('<iframe src="'+a+'" name="iframe-transport-'+t+'"></iframe>').bind("load",function(){var t,s=e.isArray(i.paramName)?i.paramName:[i.paramName];r.unbind("load").bind("load",function(){var t;try{if(t=r.contents(),!t.length||!t[0].firstChild)throw new Error}catch(e){t=void 0}d(200,"success",{iframe:t}),e('<iframe src="'+a+'"></iframe>').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",r.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&e.each(i.formData,function(t,i){e('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(n)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(t=i.fileInput.clone(),i.fileInput.after(function(e){return t[e]}),i.paramName&&i.fileInput.each(function(t){e(this).prop("name",s[t]||i.paramName)}),n.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),i.fileInput.removeAttr("form")),n.submit(),t&&t.length&&i.fileInput.each(function(i,n){var r=e(t[i]);e(n).prop("name",r.prop("name")).attr("form",r.attr("form")),r.replaceWith(n)})}),n.append(r).appendTo(document.body)},abort:function(){r&&r.unbind("load").prop("src",a),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var i=t&&t[0];return i&&e.isXMLDoc(i)?i:e.parseXML(i.XMLDocument&&i.XMLDocument.xml||e(i.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})}),function(e){"use strict";var t=function(e,i){var n=/[^\w\-\.:]/.test(e)?new Function(t.arg+",tmpl","var _e=tmpl.encode"+t.helper+",_s='"+e.replace(t.regexp,t.func)+"';return _s;"):t.cache[e]=t.cache[e]||t(t.load(e));return i?n(i,t):function(e){return n(e,t)}};t.cache={},t.load=function(e){return document.getElementById(e).innerHTML},t.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,t.func=function(e,t,i,n,r,s){return t?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[e]||"\\"+e:i?"="===i?"'+_e("+n+")+'":"'+("+n+"||'')+'":r?"';":s?"_s+='":void 0},t.encReg=/[<>&"'\x00]/g,t.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},t.encode=function(e){return String(e||"").replace(t.encReg,function(e){return t.encMap[e]||""})},t.arg="o",t.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define("tmpl",[],function(){return t}):e.tmpl=t}(this),function(e){"function"==typeof define&&define.amd?define("jquery.ui.widget",["jquery"],e):e(jQuery)}(function(e){var t=0,i=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,r,s;for(s=0;null!=(r=i[s]);s++)try{n=e._data(r,"events"),n&&n.remove&&e(r).triggerHandler("remove")}catch(e){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var r,s,a,o,d={},l=t.split(".")[0];return t=t.split(".")[1],r=l+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][r.toLowerCase()]=function(t){return!!e.data(t,r)},e[l]=e[l]||{},s=e[l][t],a=e[l][t]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,s,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),o=new i,o.options=e.widget.extend({},o.options),e.each(n,function(t,n){if(!e.isFunction(n))return void(d[t]=n);d[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},r=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,s=this._superApply;return this._super=e,this._superApply=r,t=n.apply(this,arguments),this._super=i,this._superApply=s,t}}()}),a.prototype=e.widget.extend(o,{widgetEventPrefix:s?o.widgetEventPrefix||t:t},d,{constructor:a,namespace:l,widgetName:t,widgetFullName:r}),s?(e.each(s._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete s._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var n,r,s=i.call(arguments,1),a=0,o=s.length;a<o;a++)for(n in s[a])r=s[a][n],s[a].hasOwnProperty(n)&&void 0!==r&&(e.isPlainObject(r)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],r):e.widget.extend({},r):t[n]=r);return t},e.widget.bridge=function(t,n){var r=n.prototype.widgetFullName||t;e.fn[t]=function(s){var a="string"==typeof s,o=i.call(arguments,1),d=this;return s=!a&&o.length?e.widget.extend.apply(null,[s].concat(o)):s,a?this.each(function(){var i,n=e.data(this,r);return"instance"===s?(d=n,!1):n?e.isFunction(n[s])&&"_"!==s.charAt(0)?(i=n[s].apply(n,o),i!==n&&void 0!==i?(d=i&&i.jquery?d.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var t=e.data(this,r);t?(t.option(s||{}),t._init&&t._init()):e.data(this,r,new n(s,this))}),d}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(i,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),i),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,r,s,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},n=t.split("."),t=n.shift(),n.length){for(r=a[t]=e.widget.extend({},this.options[t]),s=0;s<n.length-1;s++)r[n[s]]=r[n[s]]||{},r=r[n[s]];if(t=n.pop(),1===arguments.length)return void 0===r[t]?null:r[t];r[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=i}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,n){var r,s=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=r=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),e.each(n,function(n,a){function o(){if(t||!0!==s.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?s[a]:a).apply(s,arguments)}"string"!=typeof a&&(o.guid=a.guid=a.guid||o.guid||e.guid++);var d=n.match(/^([\w:-]*)\s*(.*)$/),l=d[1]+s.eventNamespace,c=d[2];c?r.delegate(c,l,o):i.bind(l,o)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var r,s,a=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(r in s)r in i||(i[r]=s[r]);return this.element.trigger(i,n),!(e.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,r,s){"string"==typeof r&&(r={effect:r});var a,o=r?!0===r||"number"==typeof r?i:r.effect||i:t;r=r||{},"number"==typeof r&&(r={duration:r}),a=!e.isEmptyObject(r),r.complete=s,r.delay&&n.delay(r.delay),a&&e.effects&&e.effects.effect[o]?n[t](r):o!==t&&n[o]?n[o](r.duration,r.easing,s):n.queue(function(i){e(this)[t](),s&&s.call(n[0]),i()})}});e.widget}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.fileupload",["jquery","jquery.ui.widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(e){"use strict";function t(t){var i="dragover"===t;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&-1!==e.inArray("Files",r.types)&&!1!==this._trigger(t,e.Event(t,{delegatedEvent:n}))&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||e('<input type="file">').prop("disabled")),e.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,i){return t=this.messages[t]||t.toString(),i&&e.each(i,function(e,i){t=t.replace("{"+e+"}",i)}),t},formData:function(e){return e.serializeArray()},add:function(t,i){if(t.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&e(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,i){var n=e-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(t-this.loaded)*(1e3/n)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var i;return"function"===e.type(t.formData)?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(i=[],e.each(t.formData,function(e,t){i.push({name:e,value:t})}),i):[]},_getTotal:function(t){var i=0;return e.each(t,function(e,t){i+=t.size||1}),i},_initProgressObject:function(t){var i={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,i):t._progress=i},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(t,i){if(t.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time<i.progressInterval&&t.loaded!==t.total)return;i._time=r,n=Math.floor(t.loaded/t.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(r,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(r,n,i.bitrateInterval),this._trigger("progress",e.Event("progress",{delegatedEvent:t}),i),this._trigger("progressall",e.Event("progressall",{delegatedEvent:t}),this._progress)}},_initProgressListener:function(t){var i=this,n=t.xhr?t.xhr():e.ajaxSettings.xhr();n.upload&&(e(n.upload).bind("progress",function(e){var n=e.originalEvent;e.lengthComputable=n.lengthComputable,e.loaded=n.loaded,e.total=n.total,i._onProgress(e,t)}),t.xhr=function(){return n})},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_initXHRData:function(t){var i,n=this,r=t.files[0],s=t.multipart||!e.support.xhrFileUpload,a="array"===e.type(t.paramName)?t.paramName[0]:t.paramName;t.headers=e.extend({},t.headers),t.contentRange&&(t.headers["Content-Range"]=t.contentRange),s&&!t.blob&&this._isInstanceOf("File",r)||(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(r.name)+'"'),s?e.support.xhrFormDataFileUpload&&(t.postMessage?(i=this._getFormData(t),t.blob?i.push({name:a,value:t.blob}):e.each(t.files,function(n,r){i.push({name:"array"===e.type(t.paramName)&&t.paramName[n]||a,value:r})})):(n._isInstanceOf("FormData",t.formData)?i=t.formData:(i=new FormData,e.each(this._getFormData(t),function(e,t){i.append(t.name,t.value)})),t.blob?i.append(a,t.blob,r.name):e.each(t.files,function(r,s){(n._isInstanceOf("File",s)||n._isInstanceOf("Blob",s))&&i.append("array"===e.type(t.paramName)&&t.paramName[r]||a,s,s.uploadName||s.name)})),t.data=i):(t.contentType=r.type||"application/octet-stream",t.data=t.blob||r),t.blob=null},_initIframeSettings:function(t){var i=e("<a></a>").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&i&&i!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var i=e(t.fileInput),n=t.paramName;return n?e.isArray(n)||(n=[n]):(n=[],i.each(function(){
for(var t=e(this),i=t.prop("name")||"files[]",r=(t.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var i=e.extend({},this.options,t);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,i,n){var r=e.Deferred(),s=r.promise();return i=i||this.options.context||s,!0===t?r.resolveWith(i,n):!1===t&&r.rejectWith(i,n),s.abort=r.promise,this._enhancePromise(s)},_addConvenienceMethods:function(t,i){var n=this,r=function(t){return e.Deferred().resolveWith(n,t).promise()};i.process=function(t,s){return(t||s)&&(i._processQueue=this._processQueue=(this._processQueue||r([this])).then(function(){return i.errorThrown?e.Deferred().rejectWith(n,[i]).promise():r(arguments)}).then(t,s)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",e.Event("submit",{delegatedEvent:t}),this)&&n._onSend(t,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),i=t&&t.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(t,i){t.uploadedBytes=t.uploadedBytes||0;var n,r,s=this,a=t.files[0],o=a.size,d=t.uploadedBytes,l=t.maxChunkSize||o,c=this._blobSlice,u=e.Deferred(),h=u.promise();return!(!(this._isXHRUpload(t)&&c&&(d||l<o))||t.data)&&(!!i||(d>=o?(a.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",a.error])):(r=function(){var i=e.extend({},t),h=i._progress.loaded;i.blob=c.call(a,d,d+l,a.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+d+"-"+(d+i.chunkSize-1)+"/"+o,s._initXHRData(i),s._initProgressListener(i),n=(!1!==s._trigger("chunksend",null,i)&&e.ajax(i)||s._getXHRPromise(!1,i.context)).done(function(n,a,l){d=s._getUploadedBytes(l)||d+i.chunkSize,h+i.chunkSize-i._progress.loaded&&s._onProgress(e.Event("progress",{lengthComputable:!0,loaded:d-i.uploadedBytes,total:d-i.uploadedBytes}),i),t.uploadedBytes=i.uploadedBytes=d,i.result=n,i.textStatus=a,i.jqXHR=l,s._trigger("chunkdone",null,i),s._trigger("chunkalways",null,i),d<o?r():u.resolveWith(i.context,[n,a,l])}).fail(function(e,t,n){i.jqXHR=e,i.textStatus=t,i.errorThrown=n,s._trigger("chunkfail",null,i),s._trigger("chunkalways",null,i),u.rejectWith(i.context,[e,t,n])})},this._enhancePromise(h),h.abort=function(){return n.abort()},r(),h)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,i,n,r){var s=r._progress.total,a=r._response;r._progress.loaded<s&&this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:s,total:s}),r),a.result=r.result=t,a.textStatus=r.textStatus=i,a.jqXHR=r.jqXHR=n,this._trigger("done",null,r)},_onFail:function(e,t,i,n){var r=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),r.jqXHR=n.jqXHR=e,r.textStatus=n.textStatus=t,r.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(e,t,i,n){this._trigger("always",null,n)},_onSend:function(t,i){i.submit||this._addConvenienceMethods(t,i);var n,r,s,a,o=this,d=o._getAJAXSettings(i),l=function(){return o._sending+=1,d._bitrateTimer=new o._BitrateTimer,n=n||((r||!1===o._trigger("send",e.Event("send",{delegatedEvent:t}),d))&&o._getXHRPromise(!1,d.context,r)||o._chunkedUpload(d)||e.ajax(d)).done(function(e,t,i){o._onDone(e,t,i,d)}).fail(function(e,t,i){o._onFail(e,t,i,d)}).always(function(e,t,i){if(o._onAlways(e,t,i,d),o._sending-=1,o._active-=1,d.limitConcurrentUploads&&d.limitConcurrentUploads>o._sending)for(var n=o._slots.shift();n;){if("pending"===o._getDeferredState(n)){n.resolve();break}n=o._slots.shift()}0===o._active&&o._trigger("stop")})};return this._beforeSend(t,d),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(s=e.Deferred(),this._slots.push(s),a=s.then(l)):(this._sequence=this._sequence.then(l,l),a=this._sequence),a.abort=function(){return r=[void 0,"abort","abort"],n?n.abort():(s&&s.rejectWith(d.context,r),l())},this._enhancePromise(a)):l()},_onAdd:function(t,i){var n,r,s,a,o=this,d=!0,l=e.extend({},this.options,i),c=i.files,u=c.length,h=l.limitMultiFileUploads,p=l.limitMultiFileUploadSize,m=l.limitMultiFileUploadSizeOverhead,_=0,f=this._getParamName(l),g=0;if(!u)return!1;if(p&&void 0===c[0].size&&(p=void 0),(l.singleFileUploads||h||p)&&this._isXHRUpload(l))if(l.singleFileUploads||p||!h)if(!l.singleFileUploads&&p)for(s=[],n=[],a=0;a<u;a+=1)_+=c[a].size+m,(a+1===u||_+c[a+1].size+m>p||h&&a+1-g>=h)&&(s.push(c.slice(g,a+1)),r=f.slice(g,a+1),r.length||(r=f),n.push(r),g=a+1,_=0);else n=f;else for(s=[],n=[],a=0;a<u;a+=h)s.push(c.slice(a,a+h)),r=f.slice(a,a+h),r.length||(r=f),n.push(r);else s=[c],n=[f];return i.originalFiles=c,e.each(s||c,function(r,a){var l=e.extend({},i);return l.files=s?a:[a],l.paramName=n[r],o._initResponseObject(l),o._initProgressObject(l),o._addConvenienceMethods(t,l),d=o._trigger("add",e.Event("add",{delegatedEvent:t}),l)}),d},_replaceFileInput:function(t){var i=t.fileInput,n=i.clone(!0),r=i.is(document.activeElement);t.fileInputClone=n,e("<form></form>").append(n)[0].reset(),i.after(n).detach(),r&&n.focus(),e.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===i[0]?n[0]:t}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,i){var n,r=this,s=e.Deferred(),a=function(e){e&&!e.entry&&(e.entry=t),s.resolve([e])},o=function(e){r._handleFileTreeEntries(e,i+t.name+"/").done(function(e){s.resolve(e)}).fail(a)},d=function(){n.readEntries(function(e){e.length?(l=l.concat(e),d()):o(l)},a)},l=[];return i=i||"",t.isFile?t._file?(t._file.relativePath=i,s.resolve(t._file)):t.file(function(e){e.relativePath=i,s.resolve(e)},a):t.isDirectory?(n=t.createReader(),d()):s.resolve([]),s.promise()},_handleFileTreeEntries:function(t,i){var n=this;return e.when.apply(e,e.map(t,function(e){return n._handleFileTreeEntry(e,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var i=t.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(e.map(i,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var i,n,r=t.prop("webkitEntries")||t.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if(i=e.makeArray(t.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&e.each(i,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(n=t.prop("value")))return e.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return e.Deferred().resolve(i).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var i=this,n={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",e.Event("change",{delegatedEvent:t}),n)&&i._onAdd(t,n)})},_onPaste:function(t){var i=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(e.each(i,function(e,t){var i=t.getAsFile&&t.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",e.Event("paste",{delegatedEvent:t}),n)&&this._onAdd(t,n))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var i=this,n=t.dataTransfer,r={};n&&n.files&&n.files.length&&(t.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,!1!==i._trigger("drop",e.Event("drop",{delegatedEvent:t}),r)&&i._onAdd(t,r)}))},_onDragOver:t("dragover"),_onDragEnter:t("dragenter"),_onDragLeave:t("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,i){var n=-1!==e.inArray(t,this._specialOptions);n&&this._destroyEventHandlers(),this._super(t,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;void 0===t.fileInput?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),i=t.pop();return t.shift(),new RegExp(t.join("/"),i)},_isRegExpOption:function(t,i){return"url"!==t&&"string"===e.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var t=this,i=this.options,n=this.element.data();e.each(this.element[0].attributes,function(e,r){var s,a=r.name.toLowerCase();/^data-/.test(a)&&(a=a.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),s=n[a],t._isRegExpOption(a,s)&&(s=t._getRegExp(s)),i[a]=s)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,n,r=this,s=e.Deferred(),a=s.promise();return a.abort=function(){return n=!0,i?i.abort():(s.reject(null,"abort","abort"),a)},this._getFileInputFiles(t.fileInput).always(function(e){if(!n){if(!e.length)return void s.reject();t.files=e,i=r._onSend(null,t),i.then(function(e,t,i){s.resolve(e,t,i)},function(e,t,i){s.reject(e,t,i)})}}),this._enhancePromise(a)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.fileupload-process",["jquery","./jquery.fileupload"],e):e("object"==typeof exports?require("jquery"):window.jQuery)}(function(e){"use strict";var t=e.blueimp.fileupload.prototype.options.add;e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{processQueue:[],add:function(i,n){var r=e(this);n.process(function(){return r.fileupload("process",n)}),t.call(this,i,n)}},processActions:{},_processFile:function(t,i){var n=this,r=e.Deferred().resolveWith(n,[t]),s=r.promise();return this._trigger("process",null,t),e.each(t.processQueue,function(t,r){var a=function(t){return i.errorThrown?e.Deferred().rejectWith(n,[i]).promise():n.processActions[r.action].call(n,t,r)};s=s.then(a,r.always&&a)}),s.done(function(){n._trigger("processdone",null,t),n._trigger("processalways",null,t)}).fail(function(){n._trigger("processfail",null,t),n._trigger("processalways",null,t)}),s},_transformProcessQueue:function(t){var i=[];e.each(t.processQueue,function(){var n={},r=this.action,s=!0===this.prefix?r:this.prefix;e.each(this,function(i,r){"string"===e.type(r)&&"@"===r.charAt(0)?n[i]=t[r.slice(1)||(s?s+i.charAt(0).toUpperCase()+i.slice(1):i)]:n[i]=r}),i.push(n)}),t.processQueue=i},processing:function(){return this._processing},process:function(t){var i=this,n=e.extend({},this.options,t);return n.processQueue&&n.processQueue.length&&(this._transformProcessQueue(n),0===this._processing&&this._trigger("processstart"),e.each(t.files,function(r){var s=r?e.extend({},n):n,a=function(){return t.errorThrown?e.Deferred().rejectWith(i,[t]).promise():i._processFile(s,t)};s.index=r,i._processing+=1,i._processingQueue=i._processingQueue.then(a,a).always(function(){i._processing-=1,0===i._processing&&i._trigger("processstop")})})),this._processingQueue},_create:function(){this._super(),this._processing=0,this._processingQueue=e.Deferred().resolveWith(this).promise()}})}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.fileupload-validate",["jquery","./jquery.fileupload-process"],e):e("object"==typeof exports?require("jquery"):window.jQuery)}(function(e){"use strict";e.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{getNumberOfFiles:e.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(t,i){if(i.disabled)return t;var n,r=e.Deferred(),s=this.options,a=t.files[t.index];return(i.minFileSize||i.maxFileSize)&&(n=a.size),"number"===e.type(i.maxNumberOfFiles)&&(s.getNumberOfFiles()||0)+t.files.length>i.maxNumberOfFiles?a.error=s.i18n("maxNumberOfFiles"):!i.acceptFileTypes||i.acceptFileTypes.test(a.type)||i.acceptFileTypes.test(a.name)?n>i.maxFileSize?a.error=s.i18n("maxFileSize"):"number"===e.type(n)&&n<i.minFileSize?a.error=s.i18n("minFileSize"):delete a.error:a.error=s.i18n("acceptFileTypes"),a.error||t.files.error?(t.files.error=!0,r.rejectWith(this,[t])):r.resolveWith(this,[t]),r.promise()}}})}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.fileupload-ui",["jquery","tmpl","./jquery.fileupload-validate"],e):"object"==typeof exports?e(require("jquery"),require("tmpl")):e(window.jQuery,window.tmpl)}(function(e,t){"use strict";e.blueimp.fileupload.prototype._specialOptions.push("filesContainer","uploadTemplateId","downloadTemplateId"),e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{autoUpload:!1,uploadTemplateId:"template-upload",downloadTemplateId:"template-download",filesContainer:void 0,prependFiles:!1,dataType:"json",messages:{unknownError:"Unknown error"},getNumberOfFiles:function(){return this.filesContainer.children().not(".processing").length},getFilesFromResponse:function(t){return t.result&&e.isArray(t.result.files)?t.result.files:[]},add:function(t,i){if(t.isDefaultPrevented())return!1;var n=e(this),r=n.data("blueimp-fileupload")||n.data("fileupload"),s=r.options;i.context=r._renderUpload(i.files).data("data",i).addClass("processing"),s.filesContainer[s.prependFiles?"prepend":"append"](i.context),r._forceReflow(i.context),r._transition(i.context),i.process(function(){return n.fileupload("process",i)}).always(function(){i.context.each(function(t){e(this).find(".size").text(r._formatFileSize(i.files[t].size))}).removeClass("processing"),r._renderPreviews(i)}).done(function(){i.context.find(".start").prop("disabled",!1),!1!==r._trigger("added",t,i)&&(s.autoUpload||i.autoUpload)&&!1!==i.autoUpload&&i.submit()}).fail(function(){i.files.error&&i.context.each(function(t){var n=i.files[t].error;n&&e(this).find(".error").text(n)})})},send:function(t,i){if(t.isDefaultPrevented())return!1;var n=e(this).data("blueimp-fileupload")||e(this).data("fileupload");return i.context&&i.dataType&&"iframe"===i.dataType.substr(0,6)&&i.context.find(".progress").addClass(!e.support.transition&&"progress-animated").attr("aria-valuenow",100).children().first().css("width","100%"),n._trigger("sent",t,i)},done:function(t,i){if(t.isDefaultPrevented())return!1;var n,r,s=e(this).data("blueimp-fileupload")||e(this).data("fileupload"),a=i.getFilesFromResponse||s.options.getFilesFromResponse,o=a(i);i.context?i.context.each(function(a){var d=o[a]||{error:"Empty file upload result"};r=s._addFinishedDeferreds(),s._transition(e(this)).done(function(){var a=e(this);n=s._renderDownload([d]).replaceAll(a),s._forceReflow(n),s._transition(n).done(function(){i.context=e(this),s._trigger("completed",t,i),s._trigger("finished",t,i),r.resolve()})})}):(n=s._renderDownload(o)[s.options.prependFiles?"prependTo":"appendTo"](s.options.filesContainer),s._forceReflow(n),r=s._addFinishedDeferreds(),s._transition(n).done(function(){i.context=e(this),s._trigger("completed",t,i),s._trigger("finished",t,i),r.resolve()}))},fail:function(t,i){if(t.isDefaultPrevented())return!1;var n,r,s=e(this).data("blueimp-fileupload")||e(this).data("fileupload");i.context?i.context.each(function(a){if("abort"!==i.errorThrown){var o=i.files[a];o.error=o.error||i.errorThrown||i.i18n("unknownError"),r=s._addFinishedDeferreds(),s._transition(e(this)).done(function(){var a=e(this);n=s._renderDownload([o]).replaceAll(a),s._forceReflow(n),s._transition(n).done(function(){i.context=e(this),s._trigger("failed",t,i),s._trigger("finished",t,i),r.resolve()})})}else r=s._addFinishedDeferreds(),s._transition(e(this)).done(function(){e(this).remove(),s._trigger("failed",t,i),s._trigger("finished",t,i),r.resolve()})}):"abort"!==i.errorThrown?(i.context=s._renderUpload(i.files)[s.options.prependFiles?"prependTo":"appendTo"](s.options.filesContainer).data("data",i),s._forceReflow(i.context),r=s._addFinishedDeferreds(),s._transition(i.context).done(function(){i.context=e(this),s._trigger("failed",t,i),s._trigger("finished",t,i),r.resolve()})):(s._trigger("failed",t,i),s._trigger("finished",t,i),s._addFinishedDeferreds().resolve())},progress:function(t,i){if(t.isDefaultPrevented())return!1;var n=Math.floor(i.loaded/i.total*100);i.context&&i.context.each(function(){e(this).find(".progress").attr("aria-valuenow",n).children().first().css("width",n+"%")})},progressall:function(t,i){if(t.isDefaultPrevented())return!1;var n=e(this),r=Math.floor(i.loaded/i.total*100),s=n.find(".fileupload-progress"),a=s.find(".progress-extended");a.length&&a.html((n.data("blueimp-fileupload")||n.data("fileupload"))._renderExtendedProgress(i)),s.find(".progress").attr("aria-valuenow",r).children().first().css("width",r+"%")},start:function(t){if(t.isDefaultPrevented())return!1;var i=e(this).data("blueimp-fileupload")||e(this).data("fileupload");i._resetFinishedDeferreds(),i._transition(e(this).find(".fileupload-progress")).done(function(){i._trigger("started",t)})},stop:function(t){if(t.isDefaultPrevented())return!1;var i=e(this).data("blueimp-fileupload")||e(this).data("fileupload"),n=i._addFinishedDeferreds();e.when.apply(e,i._getFinishedDeferreds()).done(function(){i._trigger("stopped",t)}),i._transition(e(this).find(".fileupload-progress")).done(function(){e(this).find(".progress").attr("aria-valuenow","0").children().first().css("width","0%"),e(this).find(".progress-extended").html("&nbsp;"),n.resolve()})},processstart:function(t){if(t.isDefaultPrevented())return!1;e(this).addClass("fileupload-processing")},processstop:function(t){if(t.isDefaultPrevented())return!1;e(this).removeClass("fileupload-processing")},destroy:function(t,i){if(t.isDefaultPrevented())return!1;var n=e(this).data("blueimp-fileupload")||e(this).data("fileupload"),r=function(){n._transition(i.context).done(function(){e(this).remove(),n._trigger("destroyed",t,i)})};i.url?(i.dataType=i.dataType||n.options.dataType,e.ajax(i).done(r).fail(function(){n._trigger("destroyfailed",t,i)})):r()}},_resetFinishedDeferreds:function(){this._finishedUploads=[]},_addFinishedDeferreds:function(t){return t||(t=e.Deferred()),this._finishedUploads.push(t),t},_getFinishedDeferreds:function(){return this._finishedUploads},_enableDragToDesktop:function(){var t=e(this),i=t.prop("href"),n=t.prop("download");t.bind("dragstart",function(e){try{e.originalEvent.dataTransfer.setData("DownloadURL",["application/octet-stream",n,i].join(":"))}catch(e){}})},_formatFileSize:function(e){return"number"!=typeof e?"":e>=1e9?(e/1e9).toFixed(2)+" GB":e>=1e6?(e/1e6).toFixed(2)+" MB":(e/1e3).toFixed(2)+" KB"},_formatBitrate:function(e){return"number"!=typeof e?"":e>=1e9?(e/1e9).toFixed(2)+" Gbit/s":e>=1e6?(e/1e6).toFixed(2)+" Mbit/s":e>=1e3?(e/1e3).toFixed(2)+" kbit/s":e.toFixed(2)+" bit/s"},_formatTime:function(e){var t=new Date(1e3*e),i=Math.floor(e/86400);return(i=i?i+"d ":"")+("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)},_formatPercentage:function(e){return(100*e).toFixed(2)+" %"},_renderExtendedProgress:function(e){return this._formatBitrate(e.bitrate)+" | "+this._formatTime(8*(e.total-e.loaded)/e.bitrate)+" | "+this._formatPercentage(e.loaded/e.total)+" | "+this._formatFileSize(e.loaded)+" / "+this._formatFileSize(e.total)},_renderTemplate:function(t,i){if(!t)return e();var n=t({files:i,formatFileSize:this._formatFileSize,options:this.options});return n instanceof e?n:e(this.options.templatesContainer).html(n).children()},_renderPreviews:function(t){t.context.find(".preview").each(function(i,n){e(n).append(t.files[i].preview)})},_renderUpload:function(e){return this._renderTemplate(this.options.uploadTemplate,e)},_renderDownload:function(e){return this._renderTemplate(this.options.downloadTemplate,e).find("a[download]").each(this._enableDragToDesktop).end()},_startHandler:function(t){t.preventDefault();var i=e(t.currentTarget),n=i.closest(".template-upload"),r=n.data("data");i.prop("disabled",!0),r&&r.submit&&r.submit()},_cancelHandler:function(t){t.preventDefault();var i=e(t.currentTarget).closest(".template-upload,.template-download"),n=i.data("data")||{};n.context=n.context||i,n.abort?n.abort():(n.errorThrown="abort",this._trigger("fail",t,n))},_deleteHandler:function(t){t.preventDefault();var i=e(t.currentTarget);this._trigger("destroy",t,e.extend({context:i.closest(".template-download"),type:"DELETE"},i.data()))},_forceReflow:function(t){return e.support.transition&&t.length&&t[0].offsetWidth},_transition:function(t){var i=e.Deferred();return e.support.transition&&t.hasClass("fade")&&t.is(":visible")?t.bind(e.support.transition.end,function(n){n.target===t[0]&&(t.unbind(e.support.transition.end),i.resolveWith(t))}).toggleClass("in"):(t.toggleClass("in"),i.resolveWith(t)),i},_initButtonBarEventHandlers:function(){var t=this.element.find(".fileupload-buttonbar"),i=this.options.filesContainer;this._on(t.find(".start"),{click:function(e){e.preventDefault(),i.find(".start").click()}}),this._on(t.find(".cancel"),{click:function(e){e.preventDefault(),i.find(".cancel").click()}}),this._on(t.find(".delete"),{click:function(e){e.preventDefault(),i.find(".toggle:checked").closest(".template-download").find(".delete").click(),t.find(".toggle").prop("checked",!1)}}),this._on(t.find(".toggle"),{change:function(t){i.find(".toggle").prop("checked",e(t.currentTarget).is(":checked"))}})},_destroyButtonBarEventHandlers:function(){this._off(this.element.find(".fileupload-buttonbar").find(".start, .cancel, .delete"),"click"),this._off(this.element.find(".fileupload-buttonbar .toggle"),"change.")},_initEventHandlers:function(){this._super(),this._on(this.options.filesContainer,{"click .start":this._startHandler,"click .cancel":this._cancelHandler,"click .delete":this._deleteHandler}),this._initButtonBarEventHandlers()},_destroyEventHandlers:function(){this._destroyButtonBarEventHandlers(),this._off(this.options.filesContainer,"click"),this._super()},_enableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!1).parent().removeClass("disabled")},_disableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!0).parent().addClass("disabled")},_initTemplates:function(){var e=this.options;e.templatesContainer=this.document[0].createElement(e.filesContainer.prop("nodeName")),t&&(e.uploadTemplateId&&(e.uploadTemplate=t(e.uploadTemplateId)),e.downloadTemplateId&&(e.downloadTemplate=t(e.downloadTemplateId)))},_initFilesContainer:function(){var t=this.options;void 0===t.filesContainer?t.filesContainer=this.element.find(".files"):t.filesContainer instanceof e||(t.filesContainer=e(t.filesContainer))},_initSpecialOptions:function(){this._super(),this._initFilesContainer(),this._initTemplates()},_create:function(){this._super(),this._resetFinishedDeferreds(),e.support.fileInput||this._disableFileInputButton()},enable:function(){var e=!1;this.options.disabled&&(e=!0),this._super(),e&&(this.element.find("input, button").prop("disabled",!1),this._enableFileInputButton())},disable:function(){this.options.disabled||(this.element.find("input, button").prop("disabled",!0),this._disableFileInputButton()),this._super()}})}),define("app/views/fileupload",["common","backbone","jquery.iframe-transport","jquery.fileupload-ui"],function(e,t,i){return window.locale={fileupload:{errors:{maxFileSize:gettext("File is too big"),minFileSize:gettext("File is too small"),acceptFileTypes:gettext("Filetype not allowed"),maxNumberOfFiles:gettext("Maximum number of files exceeded"),uploadedBytes:gettext("Uploaded bytes exceed file size"),emptyResult:gettext("Empty file upload result")},error:gettext("Error"),uploaded:gettext("uploaded"),canceled:gettext("canceled"),start:gettext("Start"),cancel:gettext("Cancel"),destroy:gettext("Delete")}},t.View.extend({el:$("#upload-file-dialog"),fileupdateConfirmTemplate:_.template($("#fileupdate-confirm-template").html()),initialize:function(t){var i=this.dirView=t.dirView,n=i.dir,r=this.$el.addClass("fixed-upload-file-dialog");this.popup_height="200px";var s=$(".status",r),a=$(".total-progress",r),o=$(".fileupload-buttonbar .cancel",r),d=$(".sf-close",r),l=$(".saving-tip",r),c={uploading:gettext("File Uploading..."),complete:gettext("File Upload complete"),canceled:gettext("File Upload canceled"),failed:gettext("File Upload failed")},u=[],h=[],p=app.pageOptions.enable_upload_folder,m=app.pageOptions.enable_resumable_fileupload,_=[],f=[],g=function(e){var t;return"number"!=typeof e?"":(t=e/8,t>=1e9?(t/1e9).toFixed(2)+" GB/s":t>=1e6?(t/1e6).toFixed(2)+" MB/s":t>=1e3?(t/1e3).toFixed(2)+" kB/s":t.toFixed(2)+" B/s")},v=this;r.fileupload({paramName:"file",getFilesFromResponse:function(e){if(e.result)return e.result},autoUpload:!0,maxNumberOfFiles:app.pageOptions.max_number_of_files_for_fileupload,sequentialUploads:!0}).bind("fileuploadadd",function(e,t){if(!$("#dir-view").is(":visible"))return!1;if(n.user_perm&&"rw"!=n.user_perm)return!1;r.removeClass("hide"),o.removeClass("hide"),d.addClass("hide"),r.height(parseInt(v.popup_height)),$(".fileupload-buttonbar, table",r).removeClass("hide");var s=n.path;if(r.fileupload("option",{formData:{parent_dir:"/"==s?s:s+"/"},maxChunkSize:void 0,uploadedBytes:void 0}),p){var a=i.$("#upload-menu");a.hasClass("hide")||a.addClass("hide");var l=t.files[0];if("."==l.name)return void t.files.shift();t.fileInput?l.webkitRelativePath&&(l.relative_path=l.webkitRelativePath):l.relativePath&&(l.relative_path=l.relativePath+l.name)}}).bind("fileuploadstart",function(){s.html(c.uploading)}).bind("fileuploadsubmit",function(t,i){if(0==i.files.length)return!1;var s=i.files[0];if(s.error)return!1;var a=function(){var t,a;n.is_system_library?(t=e.getUrl({name:"admin-system-library-upload-link",repo_id:n.repo_id}),a={from:"web",path:n.path}):(t=e.getUrl({name:"repo_upload_link",repo_id:n.repo_id}),a={from:"web",p:n.path}),$.ajax({url:t,data:a,cache:!1,dataType:"json",success:function(t){if(n.is_system_library&&(t=t.upload_link),p&&s.relative_path){var a=s.relative_path,o=a.substring(0,a.lastIndexOf("/")+1),d=r.fileupload("option","formData");d.relative_path=o,r.fileupload("option",{formData:d}),i.url=t,i.jqXHR=r.fileupload("send",i)}else{m&&s.size&&s.size>1048576?(r.fileupload("option","maxChunkSize",1048576),$.ajax({url:e.getUrl({name:"repo_file_uploaded_bytes",repo_id:n.repo_id}),data:{parent_dir:n.path,file_name:s.name},cache:!1,dataType:"json",success:function(e){r.fileupload("option","uploadedBytes",e.uploadedBytes),i.url=t,i.jqXHR=r.fileupload("send",i)}})):(i.url=t,i.jqXHR=r.fileupload("send",i))}},error:function(e){var t;t=e.responseJSON?e.responseJSON.error_msg:gettext("Error"),i.abort(),v.$(".total-error").html(t).show()}})};if(s.relative_path||i.originalFiles.length>1)return a(),!1;var o=function(){$.ajax({url:e.getUrl({name:"repo_update_link",repo_id:n.repo_id}),data:{from:"web",p:n.path},cache:!1,dataType:"json",success:function(e){var t=r.fileupload("option","formData");t.target_file=t.parent_dir+s.name,r.fileupload("option","formData",t),s.to_update=!0,i.url=e,i.jqXHR=r.fileupload("send",i)},error:function(e){var t;t=e.responseJSON?e.responseJSON.error_msg:gettext("Error"),i.abort(),v.$(".total-error").html(t).show()}})},d=n.where({is_file:!0}),l=[];if($(d).each(function(){l.push(this.get("obj_name"))}),n.is_system_library||-1==l.indexOf(s.name))a();else{var c=gettext("Replace file {filename}?").replace("{filename}",'<span class="op-target">'+e.HTMLescape(s.name)+"</span>"),u=$(v.fileupdateConfirmTemplate({title:c}));u.modal({onClose:function(){$.modal.close(),s.choose_to_update?o():s.choose_to_upload?a():(i.jqXHR=r.fileupload("send",i),i.jqXHR.abort())}}),$("#simplemodal-container").css({width:"auto",height:"auto"}),$(".yes",u).on("click",function(){var t=n.findWhere({obj_name:s.name});t.get("is_locked")?t.get("locked_by_me")?(s.choose_to_update=!0,$.modal.close()):($(".error",u).html(gettext("File is locked")).removeClass("hide"),e.disableButton($(this))):(s.choose_to_update=!0,$.modal.close())}),$(".no",u).on("click",function(){s.choose_to_upload=!0,$.modal.close()})}return!1}).bind("fileuploadprogressall",function(e,t){a.html(parseInt(t.loaded/t.total*100,10)+'% <span style="font-size:14px;color:#555;">('+g(t.bitrate)+")</span>").removeClass("hide"),t.loaded>0&&t.loaded==t.total&&l.show()}).bind("fileuploaddone",function(e,t){if("success"==t.textStatus){var i=t.files[0],s=i.relative_path,a=t.result[0];a.uploaded=!0,s&&(a.relative_path=s.substring(0,s.lastIndexOf("/")+1)+a.name);var o=n.path;o="/"==o?o:o+"/";if(r.fileupload("option","formData").parent_dir==o){if(!s)return void(i.to_update?h.push(a):u.push(a));if(p){var d=s.substring(0,s.indexOf("/"));n.where({is_dir:!0,obj_name:d}).length>0?-1==f.indexOf(d)&&f.push(d):-1==_.indexOf(d)&&_.push(d)}}}}).bind("fileuploadstop",function(){
o.addClass("hide"),d.removeClass("hide");var t=n.path;if(t="/"==t?t:t+"/",r.fileupload("option","formData").parent_dir==t){var s=parseInt((new Date).getTime()/1e3);u.length>0&&($(u).each(function(t,r){var a=n.add({is_file:!0,is_img:e.imageCheck(r.name),obj_name:r.name,last_modified:s,file_size:e.fileSizeFormat(r.size,1),obj_id:r.id,file_icon:"file.png",perm:"rw",last_update:gettext("Just now"),starred:!1},{silent:!0});i.addNewFile(a)}),u=[]),_.length>0&&($(_).each(function(e,r){var a=n.add({is_dir:!0,obj_name:r,perm:"rw",last_modified:s,last_update:gettext("Just now"),p_dpath:t+r},{silent:!0});i.addNewDir(a)}),_=[]),f.length>0&&($(f).each(function(e,t){n.where({is_dir:!0,obj_name:t})[0].set({last_modified:s,last_update:gettext("Just now")})}),f=[]),h.length>0&&($(h).each(function(t,i){n.where({is_file:!0,obj_name:i.name})[0].set({obj_id:i.id,file_size:e.fileSizeFormat(i.size,1),last_modified:s,last_update:gettext("Just now")})}),h=[])}}).bind("fileuploadfail",function(e,t){var i=t.files[0];!i.error&&t.jqXHR&&(t.jqXHR.responseJSON||(i.error=gettext("Network error")),t.jqXHR.responseJSON&&t.jqXHR.responseJSON.error&&(i.error=t.jqXHR.responseJSON.error))}).bind("fileuploadcompleted",function(){0==$(".files .cancel",r).length&&(l.hide(),a.addClass("hide"),s.html(c.complete))}).bind("fileuploadfailed",function(e,t){0==$(".files .cancel",r).length&&(o.addClass("hide"),d.removeClass("hide"),a.addClass("hide"),l.hide(),"abort"==t.errorThrown?s.html(c.canceled):s.html(c.failed))});var y=app.pageOptions.max_upload_file_size;y&&r.fileupload("option","maxFileSize",y),r.fileupload("option","redirect",location.protocol+"//"+location.host+app.config.mediaUrl+"cors/result.html?%s")},events:{"click .fold-switch":"foldAndUnfoldPopup","click .sf-close":"closePopup"},foldAndUnfoldPopup:function(){var e=this.$el,t=parseInt(this.popup_height),i=$(".fileupload-buttonbar, table",e);e.height()==t?(e.height($(".hd",e).outerHeight(!0)),i.addClass("hide")):(e.height(t),i.removeClass("hide"))},closePopup:function(){var e=this.$el;e.addClass("hide"),$(".files",e).empty()}})}),define("app/collections/file-comments",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Collection.extend({url:function(){return i.getUrl({name:"file-comments",repo_id:this.repo_id})},parse:function(e){return e.comments},setData:function(e){this.repo_id=e}})}),define("app/views/file-comment",["jquery","underscore","backbone","common","marked","moment"],function(e,t,i,n,r,s){"use strict";return i.View.extend({tagName:"li",className:"msg ovhd",template:t.template(e("#file-comment-tmpl").html()),initialize:function(e){this.listenTo(this.model,"destroy",this.remove),this.is_repo_owner=e.is_repo_owner,this.parentView=e.parentView},events:{mouseenter:"highlight",mouseleave:"rmHighlight","click .js-del-msg":"delMsg","click .js-reply-msg":"reply"},highlight:function(){this.$el.addClass("hl"),this.$(".msg-ops").removeClass("vh")},rmHighlight:function(){this.$el.removeClass("hl"),this.$(".msg-ops").addClass("vh")},delMsg:function(){return this.model.destroy({wait:!0,success:function(){},error:function(e,t){var i=n.prepareAjaxErrorMsg(t);n.feedback(i,"error")}}),!1},reply:function(){return this.parentView.replyTo(this.model.get("user_name")),!1},render:function(){var t=this.model.get("user_email"),i=!1;(this.is_repo_owner||t==app.pageOptions.username)&&(i=!0);var a=n.getUrl({name:"user_profile",username:encodeURIComponent(t)}),o=this.model.attributes,d=s(o.created_at),l=e.extend({},o,{content_marked:r(o.comment,{breaks:!0,sanitize:!0}),time:d.format("LLLL"),time_from_now:n.getRelativeTimeStr(d),can_delete_msg:i,user_profile_url:a});return this.$el.html(this.template(l)),this}})}),define("app/views/file-comments",["jquery","underscore","backbone","common","app/collections/file-comments","app/views/file-comment"],function(e,t,i,n,r,s){"use strict";return i.View.extend({id:"file-comments",className:"comments-panel",template:t.template(e("#file-comment-panel-tmpl").html()),initialize:function(t){this.dirView=t.dirView,this.collection=new r,this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"reset",this.reset);var i=this;e(document).on("keydown",function(e){27==e.which&&i.hide()})},events:{"click .js-close":"close","submit .msg-form":"formSubmit"},close:function(){return this.hide(),!1},render:function(t){this.$el.html(this.template(t)),this.$listContainer=e(".file-discussion-list",this.$el),this.$emptyTip=e(".no-discussion-tip",this.$el),this.$loadingTip=e(".loading-tip",this.$el),this.$conError=e(".file-discussions-con .error",this.$el),this.$msgInput=e('[name="message"]',this.$el)},show:function(t){this.is_repo_owner=t.is_repo_owner,this.repo_id=t.repo_id,this.path=t.path,this.collection.setData(this.repo_id),this.render({icon_url:t.icon_url,file_name:t.file_name}),0==e("#"+this.id).length?(this.dirView.$mainCon.append(this.$el),this.$el.is(":visible")||this.$el.show()):this.$el.show(),this.getContent()},hide:function(){this.$el.hide()},reset:function(){this.$conError.hide(),this.$loadingTip.hide(),this.$listContainer.empty(),this.collection.length?(this.$emptyTip.hide(),this.collection.each(this.addOne,this),this.$listContainer.show(),this.scrollConToBottom()):(this.$emptyTip.show(),this.$listContainer.hide())},getContent:function(){var e=this;this.collection.fetch({cache:!1,data:{p:this.path,avatar_size:64},reset:!0,success:function(){},error:function(t,i,r){var s=n.prepareCollectionFetchErrorMsg(t,i,r);e.$conError.html(s).show(),e.$loadingTip.hide()}})},formSubmit:function(){var t=this,i=e(".msg-form .error",this.$el),r=e('[type="submit"]',this.$el),s=e.trim(this.$msgInput.val());return!!s&&(i.hide(),n.disableButton(r),e.ajax({url:n.getUrl({name:"file-comments",repo_id:this.repo_id})+"?p="+encodeURIComponent(this.path)+"&avatar_size=64",type:"POST",cache:!1,dataType:"json",beforeSend:n.prepareCSRFToken,data:{comment:s},success:function(e){t.$msgInput.val(""),t.collection.add(e),t.$emptyTip.is(":visible")&&(t.$emptyTip.hide(),t.$listContainer.show()),t.scrollConToBottom()},error:function(e){var t=n.prepareAjaxErrorMsg(e);i.html(t).show()},complete:function(){n.enableButton(r)}}),!1)},addOne:function(e){var t=new s({model:e,is_repo_owner:this.is_repo_owner,parentView:this});this.$listContainer.append(t.render().el)},scrollConToBottom:function(){var e=this.$(".file-discussions-con");e.scrollTop(e[0].scrollHeight-e[0].clientHeight)},replyTo:function(e){var t="@"+e+" ",i=this.$msgInput.val(t);n.setCaretPos(i[0],t.length),i.trigger("focus")}})}),define("app/views/dir",["jquery","jquery.ui","jquery.magnific-popup","simplemodal","underscore","backbone","common","file-tree","js.cookie","app/collections/dirents","app/views/dirent","app/views/dirent-grid","app/views/dirent-details","app/views/fileupload","app/views/share","app/views/file-comments","app/views/widgets/dropdown"],function(e,t,i,n,r,s,a,o,d,l,c,u,h,p,m,_,f){"use strict";return s.View.extend({el:".main-panel",template:r.template(e("#dir-view-tmpl").html()),toolbarTemplate:r.template(e("#dir-view-toolbar-tmpl").html()),toolbar2Template:r.template(e("#dir-view-toolbar2-tmpl").html()),pathTemplate:r.template(e("#dir-view-path-tmpl").html()),theadTemplate:r.template(e("#dir-view-thead-tmpl").html()),theadMobileTemplate:r.template(e("#dir-view-thead-mobile-tmpl").html()),newDirTemplate:r.template(e("#add-new-dir-form-template").html()),newFileTemplate:r.template(e("#add-new-file-form-template").html()),mvcpTemplate:r.template(e("#mvcp-form-template").html()),mvProgressTemplate:r.template(e("#mv-progress-popup-template").html()),topSearchFormTemplate:r.template(e("#top-search-form-tmpl").html()),repoDecryptFormTemplate:r.template(e("#repo-decrypt-form-template").html()),initialize:function(t){var i=d.get("view_mode");this.view_mode="grid"==i?"grid":"list",this.contextOptions={},this.magnificPopupOptions={type:"image",tClose:gettext("Close (Esc)"),tLoading:gettext("Loading..."),gallery:{enabled:!0,tPrev:gettext("Previous (Left arrow key)"),tNext:gettext("Next (Right arrow key)"),tCounter:gettext("%curr% of %total%")},image:{titleSrc:function(e){return a.HTMLescape(e.data.name)+'<br /><a href="'+e.data.url+'" target="_blank">'+gettext("Open in New Tab")+"</a>"},tError:gettext('<a href="%url%" target="_blank">The image</a> could not be loaded.')}},this.dir=new l,this.listenTo(this.dir,"add",this.addOne),this.listenTo(this.dir,"reset",this.reset),this.fileUploadView=new p({dirView:this}),this.direntDetailsView=new h({dirView:this}),this.fileCommentsView=new _({dirView:this}),e(document).on("click",function(t){var i=t.target||event.srcElement,n=e("#rename-form");if(n.length&&!n.find("*").is(i)){n.closest("tr");e(".cancel",n).trigger("click")}}),e(document).on("click",function(t){var i=t.target||event.srcElement,n=e(".grid-item-op");!(n.length>0)||n.is(i)||n.find("*").is(i)||n.closest(".grid-item").is(i)||n.closest(".grid-item").find("*").is(i)||n.remove()})},renderMainCon:function(){if(!e("#dir-view").length){this.$mainCon=e('<div class="main-panel-main main-panel-main-with-side" id="dir-view"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$loadingTip=this.$(".loading-tip"),this.$con=this.$(".js-dir-content"),this.$error=this.$(".error"),this.$table=this.$(".repo-file-list"),this.$tbody=e("tbody",this.$table),this.$gridViewContainer=this.$(".grid-view");var t=this;e(".cur-view-main-con",this.$mainCon).on("scroll",function(){t.getMore()})}},showDir:function(t,i,n,r){e("#top-search-form").html(this.topSearchFormTemplate({search_repo_id:i})),this.contextOptions=r,this.renderMainCon(),this.dir.setPath(t,i,n),this.dir.dirent_more=!1,this.renderDir()},hide:function(){e("#top-search-form").html(this.topSearchFormTemplate({search_repo_id:""})),this.$toolbar&&this.$toolbar.detach(),this.$mainCon.detach(),this.fileUploadView.closePopup()},addOne:function(e){var t;"list"==this.view_mode?(t=new c({model:e,dirView:this}),this.$tbody.append(t.render().el)):(t=new u({model:e,dirView:this}),this.$gridViewContainer.append(t.render().el))},addListOne:function(e){var t=new c({model:e,dirView:this});this.$tbody.append(t.render().el)},addGridOne:function(e){var t=new u({model:e,dirView:this});this.$gridViewContainer.append(t.render().el)},reset:function(){this.renderToolbar(),this.renderPath(),this.$con.hide(),this.$table.hide(),this.$tbody.empty(),this.$gridViewContainer.hide().empty(),this.$con.show(),"list"==this.view_mode?(this.renderThead(),a.updateSortIconByMode({context:this.$table}),this.$table.show()):this.$gridViewContainer.show(),this.sortDirents(),this.dir.last_start=0,this.dir.limit=100,this.render_dirents_slice(this.dir.last_start,this.dir.limit),this.getThumbnail()},updateMagnificPopupOptions:function(t){var i=this.dir.repo_id,n=this.dir.path,r=!0;app.pageOptions.enable_thumbnail&&!this.dir.encrypted||(r=!1);var s=function(t){var s,o=t.get("obj_name"),d=a.pathJoin([n,o]),l={repo_id:i,path:a.encodePath(d)},c=o.substr(o.lastIndexOf(".")+1).toLowerCase(),u="gif"==c;return s=r&&!u?a.getUrl(e.extend(l,{name:"thumbnail_get",size:app.pageOptions.thumbnail_size_for_original})):a.getUrl(e.extend(l,{name:"view_raw_file"})),{name:o,url:t.getWebUrl(),src:s}},o=this;switch(t?t.op:"get-items"){case"get-items":!function(){var t=o.dir.where({is_img:!0}),i=[];e(t).each(function(e,t){var n=s(t);i.push(n)}),o.magnificPopupOptions.items=i}();break;case"add-new-item":!function(e){var t=s(e);o.magnificPopupOptions.items.unshift(t)}(t.model);break;case"update-item":!function(e,t){var i=s(t);o.magnificPopupOptions.items[e]=i}(t.index,t.model);break;case"delete-item":!function(e){o.magnificPopupOptions.items.splice(e,1)}(t.index)}},setFileInput:function(){var t=this.dir;if(t.user_perm&&"rw"==t.user_perm&&!t.no_quota){var i=this.fileUploadView.$el;app.pageOptions.enable_upload_folder?"webkitdirectory"in e(".basic-upload-input")[0]?(this.$("#basic-upload").remove(),this.$("#advanced-upload").show(),this.upload_dropdown=new f({el:this.$("#advanced-upload")}),i.fileupload("option",{fileInput:this.$('#advanced-upload input[type="file"]'),replaceFileInput:-1==navigator.userAgent.indexOf("Firefox")})):(this.$("#advanced-upload").remove(),i.fileupload("option","fileInput",this.$(".basic-upload-input:eq(0)"))):i.fileupload("option","fileInput",this.$(".basic-upload-input:eq(0)"))}},getThumbnail:function(){if(!app.pageOptions.enable_thumbnail||this.dir.encrypted)return!1;var t=this.dir.filter(function(e){return(e.get("is_img")||e.get("is_video"))&&!e.get("encoded_thumbnail_src")});if(0!=t.length){var i=t.length,n=this.dir.repo_id,r=this.dir.path,s=this,o=app.pageOptions.thumbnail_default_size;"grid"==this.view_mode&&(o=app.pageOptions.thumbnail_size_for_grid);var d=function(l){var c=t[l],u=a.pathJoin([r,c.get("obj_name")]);e.ajax({url:a.getUrl({name:"thumbnail_create",repo_id:n}),data:{path:u,size:o},cache:!1,dataType:"json",success:function(e){c.set({encoded_thumbnail_src:e.encoded_thumbnail_src})},complete:function(){l<i-1&&s.dir.repo_id==n&&s.dir.path==r&&d(++l)}})};d(0)}},_showLibDecryptDialog:function(){var t=this,i=e(this.repoDecryptFormTemplate()),n=!1;i.modal({containerCss:{padding:"1px"},onClose:function(){e.modal.close(),n||app.router.navigate(t.dir.category+"/",{trigger:!0})}}),e("#simplemodal-container").css({height:"auto"}),i.on("submit",function(){var r=e.trim(e('[name="password"]',i).val());return r?(a.ajaxPost({form:i,form_id:i.attr("id"),post_url:a.getUrl({name:"api_v2.1_repo_set_password",repo_id:t.dir.repo_id}),post_data:{password:r},after_op_success:function(){n=!0,e.modal.close(),t.renderDir()}}),!1):(e(".error",i).html(gettext("Password is required.")).removeClass("hide"),!1)})},renderDir:function(){this.$loadingTip.show(),this.$con.hide(),this.$error.hide();var e=this,t=app.pageOptions.thumbnail_default_size;"grid"==this.view_mode&&(t=app.pageOptions.thumbnail_size_for_grid);var i=this.dir;i.fetch({cache:!1,data:{p:i.path,thumbnail_size:t},success:function(t,n,r){n.next_url&&window.open(n.next_url,"_self"),e.dir.user_can_set_folder_perm=!1,e.is_address_book_group_admin=!1,e.is_group_owned_repo=!1,e.contextOptions&&e.contextOptions.group_id&&-1!=i.repo_owner.indexOf("@seafile_group")?(e.is_group_owned_repo=!0,e.getGroupInfo()):e.reset()},error:function(t,i,n){var r;if(i.responseText){if(i.responseJSON.lib_need_decrypt)return void e._showLibDecryptDialog();r=a.HTMLescape(i.responseJSON.error)}else r=gettext("Please check the network.");e.$error.html(r).show()},complete:function(){e.$loadingTip.hide()}})},getGroupInfo:function(){var t=this,i=this.dir.repo_owner,n=i.substring(0,i.indexOf("@"));e.ajax({url:a.getUrl({name:"group",group_id:n}),cache:!1,dataType:"json",success:function(i){-1!=e.inArray(app.pageOptions.username,i.admins)&&(t.dir.user_can_set_folder_perm=!0,t.is_address_book_group_admin=!0)},error:function(e){},complete:function(){t.reset()}})},renderPath:function(){var t=this.dir,i=t.path,n="my",r=t.category.split("/")[0];"org"==r?n="org":"group"==r?n="group":"common"==r&&(n="common");var s={path:i,repo_name:t.repo_name,category:t.category,context:n};e.extend(s,this.contextOptions);var o=i.substr(1).split("/"),d=a.encodePath(i.substr(1)).split("/");"/"!=i&&e.extend(s,{path_list:o,path_list_encoded:d,repo_id:t.repo_id}),this.$(".dir-path").html(this.pathTemplate(s))},renderToolbar:function(){var t=this.dir,i={user_perm:t.user_perm,no_quota:t.no_quota,encrypted:t.encrypted,mode:this.view_mode,path:t.path,repo_id:t.repo_id,is_repo_owner:t.is_repo_owner,is_admin:t.is_admin,site_root:app.pageOptions.site_root};e("#dir-view-toolbar").length?this.$toolbar.html(this.toolbarTemplate(i)):(this.$toolbar=e('<div class="cur-view-toolbar d-flex" id="dir-view-toolbar"></div>').html(this.toolbarTemplate(i)),this.$(".common-toolbar").before(this.$toolbar)),this.$(".dir-toolbar-2").html(this.toolbar2Template(i)),this.setFileInput(),"rw"==t.user_perm&&(this.new_dropdown=new f({el:this.$("#add-new")}))},renderThead:function(){var t=e(window).width()<768?this.theadMobileTemplate:this.theadTemplate;this.$("thead").html(t())},render_dirents_slice:function(e,t){var i=this.dir,n="list"==this.view_mode?this.addListOne:this.addGridOne;r.each(i.slice(e,e+t),n,this),i.length>e+t?(i.dirent_more=!0,i.last_start=e+t):i.dirent_more=!1},events:{"click #dir-view-toolbar .basic-upload-btn":"uploadFile","click #dir-view-toolbar .advanced-upload-file":"advancedUploadFile","click #dir-view-toolbar .advanced-upload-folder":"advancedUploadFolder","click #add-new li a":"closeNewDropdown","click #add-new-dir":"newDir","click #add-new-file":"newCommonFile","click #add-new-md-file":"newMdFile","click #add-new-excel-file":"newExcelFile","click #add-new-ppt-file":"newPPTFile","click #add-new-word-file":"newWordFile","click #share-cur-dir":"share","click #js-switch-grid-view":"switchToGridView","click #js-switch-list-view":"switchToListView","click #mv-dirents":"mv","click #cp-dirents":"cp","click #del-dirents":"del","click #download-dirents":"download","click #dir-view th.select":"select","click #dir-view .by-name":"sortByName","click #dir-view .by-time":"sortByTime"},uploadFile:function(){this.$(".basic-upload-input").trigger("click")},advancedUploadFile:function(){return this.$("#advanced-upload-file-input").trigger("click"),!1},advancedUploadFolder:function(){return this.$("#advanced-upload-folder-input").trigger("click"),!1},closeNewDropdown:function(){this.new_dropdown.hide()},newDir:function(){var t=e(this.newDirTemplate()),i=t.attr("id"),n=this.dir,r=this;return t.modal(),e("#simplemodal-container").css({height:"auto"}),t.on("submit",function(){var s=e.trim(e('input[name="name"]',t).val());if(!s)return a.showFormError(i,gettext("It is required.")),!1;if(-1!=s.indexOf("/"))return a.showFormError(i,gettext("Name should not include '/'.")),!1;var o={operation:"mkdir"},d=a.getUrl({name:"new_dir",repo_id:n.repo_id})+"?p="+encodeURIComponent(a.pathJoin([n.path,s])),l=function(t){e.modal.close();var i=n.add({is_dir:!0,obj_name:t.obj_name,perm:"rw",last_modified:(new Date).getTime()/1e3,last_update:gettext("Just now"),p_dpath:a.pathJoin([n.path,t.obj_name])},{silent:!0});r.addNewDir(i)};return a.ajaxPost({form:t,form_id:i,post_url:d,post_data:o,after_op_success:l}),!1}),!1},newFile:function(t){var i=e(this.newFileTemplate(t)),n=i.attr("id"),r=e('input[name="name"]',i),s=this.dir,o=this;i.modal({focus:!1,containerCss:{padding:"20px 25px"}}),e("#simplemodal-container").css({height:"auto"}),a.setCaretPos(r[0],0),r.trigger("focus"),i.on("submit",function(){var t=e.trim(r.val());if(!t)return a.showFormError(n,gettext("It is required.")),!1;if(-1!=t.indexOf("/"))return a.showFormError(n,gettext("Name should not include '/'.")),!1;if(-1!=t.lastIndexOf(".")&&0==t.substr(0,t.lastIndexOf(".")).length)return a.showFormError(n,gettext("Only an extension there, please input a name.")),!1;var d={operation:"create"},l=a.getUrl({name:"new_file",repo_id:s.repo_id})+"?p="+encodeURIComponent(a.pathJoin([s.path,t])),c=function(t){e.modal.close();var i=s.add({is_file:!0,is_img:a.imageCheck(t.obj_name),obj_name:t.obj_name,file_size:a.fileSizeFormat(t.size),obj_id:t.obj_id,file_icon:"file.png",starred:!1,perm:"rw",last_modified:(new Date).getTime()/1e3,last_update:gettext("Just now")},{silent:!0});o.addNewFile(i)};return a.ajaxPost({form:i,form_id:n,post_url:l,post_data:d,after_op_success:c}),!1})},newCommonFile:function(){return this.newFile({title:gettext("New File"),initial_file_name:""}),!1},newMdFile:function(){return this.newFile({title:gettext("New Markdown File"),initial_file_name:".md"}),!1},newExcelFile:function(){return this.newFile({title:gettext("New Excel File"),initial_file_name:".xlsx"}),!1},newPPTFile:function(){return this.newFile({title:gettext("New PowerPoint File"),initial_file_name:".pptx"}),!1},newWordFile:function(){return this.newFile({title:gettext("New Word File"),initial_file_name:".docx"}),!1},addNewFile:function(t){var i,n;if("list"==this.view_mode)if(i=new c({model:t,dirView:this}),n=i.render().el,0==e("tr",this.$tbody).length)this.$tbody.append(n);else{var r=this.dir.where({is_dir:!0});0==r.length?this.$tbody.prepend(n):e(e("tr",this.$tbody)[r.length-1]).after(n)}else if(i=new u({model:t,dirView:this}),n=i.render().el,0==e(".grid-item",this.$gridViewContainer).length)this.$gridViewContainer.append(n);else{var r=this.dir.where({is_dir:!0});0==r.length?this.$gridViewContainer.prepend(n):e(e(".grid-item",this.$gridViewContainer)[r.length-1]).after(n)}t.get("is_img")&&this.updateMagnificPopupOptions({op:"add-new-item",model:t})},addNewDir:function(e){var t;"list"==this.view_mode?(t=new c({model:e,dirView:this}),this.$tbody.prepend(t.render().el)):(t=new u({model:e,dirView:this}),this.$gridViewContainer.prepend(t.render().el))},share:function(){var t=this.dir,i=t.path,n={is_repo_owner:t.is_repo_owner,is_virtual:t.is_virtual,user_perm:t.user_perm,repo_id:t.repo_id,is_dir:!0,dirent_path:i,obj_name:"/"==i?t.repo_name:i.substr(i.lastIndexOf("/")+1)};app.pageOptions.is_pro&&(n.is_admin=t.is_admin,this.is_address_book_group_admin&&e.extend(n,{is_address_book_group_admin:!0,is_group_owned_repo:this.is_group_owned_repo})),new m(n)},switchToGridView:function(){"grid"!=this.view_mode&&(this.view_mode="grid",d.set("view_mode","grid"),this.$(".list-view-icon-btn").removeClass("active"),this.$(".grid-view-icon-btn").addClass("active"),this.renderDir())},switchToListView:function(){"list"!=this.view_mode&&(this.view_mode="list",d.set("view_mode","list"),this.$(".grid-view-icon-btn").removeClass("active"),this.$(".list-view-icon-btn").addClass("active"),this.renderDir())},sortDirents:function(){switch(app.pageOptions.sort_mode){case"name_up":this.dir.comparator=function(e,t){return e.get("is_dir")&&t.get("is_file")?-1:e.get("is_file")&&t.get("is_dir")?1:a.compareTwoWord(e.get("obj_name"),t.get("obj_name"))};break;case"name_down":this.dir.comparator=function(e,t){return e.get("is_dir")&&t.get("is_file")?-1:e.get("is_file")&&t.get("is_dir")?1:-a.compareTwoWord(e.get("obj_name"),t.get("obj_name"))};break;case"time_up":this.dir.comparator=function(e,t){return e.get("is_dir")&&t.get("is_file")?-1:e.get("is_file")&&t.get("is_dir")?1:e.get("last_modified")<t.get("last_modified")?-1:1};break;case"time_down":this.dir.comparator=function(e,t){return e.get("is_dir")&&t.get("is_file")?-1:e.get("is_file")&&t.get("is_dir")?1:e.get("last_modified")<t.get("last_modified")?1:-1}}this.dir.sort(),this.updateMagnificPopupOptions()},sortByName:function(){return a.toggleSortByNameMode(),a.updateSortIconByMode({context:this.$table}),this.sortDirents(),this.$tbody.empty(),this.render_dirents_slice(0,this.dir.limit),this.dir.comparator=null,!1},sortByTime:function(){return a.toggleSortByTimeMode(),a.updateSortIconByMode({context:this.$table}),this.sortDirents(),this.$tbody.empty(),this.render_dirents_slice(0,this.dir.limit),this.dir.comparator=null,!1},select:function(){var e=this.$("th [type=checkbox]"),t=this.dir,i=this.$("[type=checkbox]"),n=this.$("#multi-dirents-op"),r=this.$("#cur-dir-ops");e.prop("checked")?(i.prop("checked",!0),t.each(function(e){e.set({selected:!0},{silent:!0})}),n.show(),r.hide()):(i.prop("checked",!1),t.each(function(e){e.set({selected:!1},{silent:!0})}),n.hide(),r.show())},download:function(){var t=this.dir,i=t.where({selected:!0}),n=[];if(1==i.length&&i[0].get("is_file"))return void(location.href=i[0].getDownloadUrl());e(i).each(function(){n.push(this.get("obj_name"))}),a.zipDownload(t.repo_id,t.path,n)},del:function(){var t=this.dir,i=this,n=function(){e("#confirm-popup").append('<p style="color:red;">'+gettext("Processing...")+"</p>");var n=t.where({selected:!0}),r=[];e(n).each(function(){r.push(this.get("obj_name"))}),e.ajax({url:a.getUrl({name:"del_dirents",repo_id:t.repo_id})+"?parent_dir="+encodeURIComponent(t.path),type:"POST",dataType:"json",beforeSend:a.prepareCSRFToken,traditional:!0,data:{dirents_names:r},success:function(s){var o,d,l=s.deleted.length,c=s.undeleted.length;l>0&&(l==r.length?(t.remove(n),e("th [type=checkbox]",i.$table).prop("checked",!1),i.$("#multi-dirents-op").hide(),i.$("#cur-dir-ops").show()):e(n).each(function(){-1!=s.deleted.indexOf(this.get("obj_name"))&&t.remove(this)}),o=1==l?gettext("Successfully deleted %(name)s."):2==l?gettext("Successfully deleted %(name)s and 1 other item."):gettext("Successfully deleted %(name)s and %(amount)s other items."),o=o.replace("%(name)s",s.deleted[0]).replace("%(amount)s",l-1),a.feedback(o,"success"),i.updateMagnificPopupOptions()),c>0&&(d=1==c?gettext("Failed to delete %(name)s."):2==c?gettext("Failed to delete %(name)s and 1 other item."):gettext("Failed to delete %(name)s and %(amount)s other items."),d=d.replace("%(name)s",s.undeleted[0]).replace("%(amount)s",c-1),a.feedback(d,"error")),e.modal.close()},error:function(t,i,n){e.modal.close(),a.ajaxErrorHandler(t,i,n)}})};a.showConfirm(gettext("Delete Items"),gettext("Are you sure you want to delete these selected items?"),n)},mv:function(){this.mvcp({op:"mv"})},cp:function(){this.mvcp({op:"cp"})},mvcp:function(t){var i=this.dir,n=t.op,r="mv"==n?gettext("Move selected item(s) to:"):gettext("Copy selected item(s) to:"),s=!0;"r"==i.user_perm&&(s=!1);var d=e(this.mvcpTemplate({form_title:r,op_type:n,obj_type:"",obj_name:"",show_cur_repo:s,show_other_repos:!i.encrypted}));d.modal({autoResize:!0,focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"}),s&&o.renderTreeForPath({$form:d,$container:e("#current-repo-dirs"),repo_name:i.repo_name,repo_id:i.repo_id,path:i.path}),i.encrypted||o.prepareOtherReposTree({cur_repo_id:i.repo_id});var l=this,c=this.dir,u=c.where({is_dir:!0,selected:!0}),h=c.where({is_file:!0,selected:!0}),p=[],m=[];e(u).each(function(){p.push(this.get("obj_name"))}),e(h).each(function(){m.push(this.get("obj_name"))}),d.on("submit",function(){var t=e('[name="dst_repo"]',d).val(),i=e('[name="dst_path"]',d).val(),r=c.path,s={repo_id:c.repo_id};if(!e.trim(t)||!e.trim(i))return e(".error",d).removeClass("hide"),!1;if(t==c.repo_id&&"mv"==n&&i==r)return e(".error",d).html(gettext("Invalid destination path")).removeClass("hide"),!1;if(a.disableButton(e('[type="submit"]',d)),d.append('<p style="color:red;">'+gettext("Processing...")+"</p>"),t==c.repo_id)s.name="mv"==n?"mv_dirents":"cp_dirents",e.ajax({url:a.getUrl(s)+"?parent_dir="+encodeURIComponent(r),type:"POST",dataType:"json",beforeSend:a.prepareCSRFToken,traditional:!0,data:{file_names:m,dir_names:p,dst_repo:t,dst_path:i},success:function(t){var s,o,d=t.success.length;t.url;e.modal.close(),d>0&&("mv"==n?(d==h.length+u.length?(c.remove(u),c.remove(h),l.$("th .checkbox").removeClass("checkbox-checked"),l.$("#multi-dirents-op").hide(),l.$("#cur-dir-ops").show()):(e(u).each(function(){-1!=t.success.indexOf(this.get("obj_name"))&&c.remove(this)}),e(h).each(function(){-1!=t.success.indexOf(this.get("obj_name"))&&c.remove(this)})),s=1==d?gettext("Successfully moved %(name)s."):2==d?gettext("Successfully moved %(name)s and 1 other item."):gettext("Successfully moved %(name)s and %(amount)s other items."),l.updateMagnificPopupOptions()):(s=1==d?gettext("Successfully copied %(name)s."):2==d?gettext("Successfully copied %(name)s and 1 other item."):gettext("Successfully copied %(name)s and %(amount)s other items."),i==r&&l.renderDir()),s=s.replace("%(name)s",t.success[0]).replace("%(amount)s",d-1),a.feedback(s,"success")),t.failed.length>0&&(o="mv"==n?t.failed.length>1?gettext("Internal error. Failed to move %(name)s and %(amount)s other item(s)."):gettext("Internal error. Failed to move %(name)s."):t.failed.length>1?gettext("Internal error. Failed to copy %(name)s and %(amount)s other item(s)."):gettext("Internal error. Failed to copy %(name)s."),o=o.replace("%(name)s",t.failed[0]).replace("%(amount)s",t.failed.length-1),a.feedback(o,"error"))},error:function(t,i,n){e.modal.close(),a.ajaxErrorHandler(t,i,n)}});else{var o,_=c.where({selected:!0}),f=0,g=0,v=e(l.mvProgressTemplate()),y=e("#mv-details",v),w=e("#cancel-mv",v),b=e("#mv-other-info",v),M=function(){var s,l,u=_[f],h=u.get("is_dir")?"dir":"file",p=u.get("obj_name");s=a.getUrl({name:"copy_move_task"}),l={src_repo_id:c.repo_id,src_parent_dir:r,src_dirent_name:p,dst_repo_id:t,dst_parent_dir:i,operation:"mv"==n?"move":"copy",dirent_type:h};var m=function(t){var i="mv"==n?gettext("Moving file %(index)s of %(total)s"):gettext("Copying file %(index)s of %(total)s");y.html(i.replace("%(index)s",f+1).replace("%(total)s",_.length)).removeClass("vh"),w.removeClass("hide");var r=function(){var i=t.task_id;w.data("task_id",i),e.ajax({url:a.getUrl({name:"query_copy_move_progress"})+"?task_id="+encodeURIComponent(i),dataType:"json",success:function(t){var i=e(".ui-progressbar-value",e("#mv-progress"));if(t.failed||t.canceled||t.successful){if(t.successful)i.css("width",parseInt((f+1)/_.length*100,10)+"%").show(),"mv"==n&&c.remove(u),g+=1,1==g&&(o=p),Y();else if(t.failed){var s="mv"==n?gettext("Failed to move %(name)s"):gettext("Failed to copy %(name)s");w.after('<p class="error">'+s.replace("%(name)s",a.HTMLescape(p))+"</p>"),L()}}else setTimeout(r,1e3)},error:function(e,t,i){var n=a.prepareAjaxErrorMsg(e);w.after('<p class="error">'+n+"</p>"),L()}})};0==f?(e.modal.close(),setTimeout(function(){v.modal({containerCss:{width:300,height:150,paddingTop:50},focus:!1}),e("#mv-progress").progressbar(),r()},100)):r()};e.ajax({url:s,type:"POST",dataType:"json",beforeSend:a.prepareCSRFToken,data:l,success:m,error:function(t){var i=a.prepareAjaxErrorMsg(t);d.is(":visible")?e(".error",d).html(i).show():(w.after('<p class="error">'+i+"</p>"),w.hide())}})},Y=function(){if(f==_.length-1){if(setTimeout(function(){e.modal.close()},500),"mv"==n&&l.updateMagnificPopupOptions(),g>0){var t;t="mv"==n?1==g?gettext("Successfully moved %(name)s."):2==g?gettext("Successfully moved %(name)s and 1 other item."):gettext("Successfully moved %(name)s and %(amount)s other items."):1==g?gettext("Successfully copied %(name)s."):2==g?gettext("Successfully copied %(name)s and 1 other item."):gettext("Successfully copied %(name)s and %(amount)s other items."),t=t.replace("%(name)s",o).replace("%(amount)s",g-1),setTimeout(function(){a.feedback(t,"success")},600)}}else M(++f)},L=function(){setTimeout(function(){e.modal.close()},500),"mv"==n&&l.updateMagnificPopupOptions()};M(),w.on("click",function(){a.disableButton(w);var t=e(this).data("task_id");e.ajax({url:a.getUrl({name:"copy_move_task"}),type:"DELETE",dataType:"json",beforeSend:a.prepareCSRFToken,data:{task_id:t},success:function(e){b.html(gettext("Canceled.")).removeClass("hide"),w.addClass("hide"),L()},error:function(e,t,i){var n=a.prepareAjaxErrorMsg(e);b.html(n).removeClass("hide"),a.enableButton(w)}})})}return!1})},getMore:function(){var e=this.$(".cur-view-main-con")[0];this.dir.dirent_more&&e.scrollTop>0&&e.clientHeight+e.scrollTop+1>=e.scrollHeight&&(this.render_dirents_slice(this.dir.last_start,this.dir.limit),this.getThumbnail())}})}),define("app/views/starred-file-item",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view"],function(e,t,i,n,r){"use strict";return r.extend({tagName:"tr",template:t.template(e("#starred-file-item-tmpl").html()),mobileTemplate:t.template(e("#starred-file-item-mobile-tmpl").html()),events:{"click .unstar":"removeShare"},initialize:function(){r.prototype.initialize.call(this),this.listenTo(this.model,"change",this.render)},render:function(){var t=this.model.toJSON(),i=n.isHiDPI()?48:24;t.file_icon_url=n.getFileIconUrl(t.file_name,i),t.is_img=n.imageCheck(t.file_name),t.encoded_path=n.encodePath(t.path),t.encoded_thumbnail_src=this.model.get("encoded_thumbnail_src")||"";var r=e(window).width()>=768?this.template:this.mobileTemplate;if(this.$el.html(r(t)),t.is_img){var s=this.model.get("file_name"),a=s.substr(s.lastIndexOf(".")+1).toLowerCase(),o="gif"==a;app.pageOptions.enable_thumbnail&&!o&&this.$(".img-name-link").attr("data-mfp-src",n.getUrl({name:"thumbnail_get",repo_id:t.repo_id,size:app.pageOptions.thumbnail_size_for_original,path:t.encoded_path}))}return this},removeShare:function(){
var t=this,i=this.model.get("repo_id"),r=this.model.get("file_name"),s=this.model.get("path");return e.ajax({url:n.getUrl({name:"starred_files"})+"?p="+encodeURIComponent(s)+"&repo_id="+encodeURIComponent(i),type:"DELETE",beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully unstared {placeholder}").replace("{placeholder}",r),"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1}})}),define("app/models/starred-file",["underscore","backbone"],function(e,t){"use strict";return t.Model.extend({})}),define("app/collections/starred-files",["underscore","backbone","common","app/models/starred-file"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"starred_files"})}})}),define("app/views/starred-file",["jquery","underscore","backbone","common","jquery.magnific-popup","app/views/starred-file-item","app/collections/starred-files"],function(e,t,i,n,r,s,a){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#starred-file-tmpl").html()),theadTemplate:t.template(e("#starred-file-thead-tmpl").html()),initialize:function(){this.starredFiles=new a,this.listenTo(this.starredFiles,"reset",this.reset)},addOne:function(e){var t=new s({model:e});this.$tableBody.append(t.render().el)},reset:function(){this.$tableBody.empty(),this.$loadingTip.hide(),this.starredFiles.length?(this.$emptyTip.hide(),this.renderThead(),this.starredFiles.each(this.addOne,this),this.$table.show(),this.getThumbnail()):(this.$emptyTip.show(),this.$table.hide())},getThumbnail:function(){if(!app.pageOptions.enable_thumbnail)return!1;var t=this.starredFiles.filter(function(e){return n.imageCheck(e.get("file_name"))||n.videoCheck(e.get("file_name"))});if(0!=t.length){var i=t.length,r=app.pageOptions.thumbnail_default_size,s=function(a){var o=t[a];e.ajax({url:n.getUrl({name:"thumbnail_create",repo_id:o.get("repo_id")}),data:{path:o.get("path"),size:r},cache:!1,dataType:"json",success:function(e){o.set({encoded_thumbnail_src:e.encoded_thumbnail_src})},complete:function(){a<i-1&&s(++a)}})};s(0)}},showStarredFiles:function(){this.$table.hide(),this.$loadingTip.show(),this.starredFiles.fetch({reset:!0})},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="org-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableBody=this.$("tbody"),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips"),this.$el.magnificPopup({type:"image",delegate:".img-name-link",tClose:gettext("Close (Esc)"),tLoading:gettext("Loading..."),gallery:{enabled:!0,tPrev:gettext("Previous (Left arrow key)"),tNext:gettext("Next (Right arrow key)"),tCounter:gettext("%curr% of %total%")},image:{titleSrc:function(e){var t=e.el;return t[0].innerHTML+'<br /><a href="'+t.attr("href")+'" target="_blank">'+gettext("Open in New Tab")+"</a>"},tError:gettext('<a href="%url%" target="_blank">The image</a> could not be loaded.')}})},renderThead:function(){this.$("thead").html(this.theadTemplate())},show:function(){this.renderMainCon(),this.showStarredFiles()},hide:function(){this.$mainCon.detach()}})}),define("app/models/activity",["underscore","backbone"],function(e,t){"use strict";return t.Model.extend({})}),define("app/collections/activities",["underscore","backbone","common","app/models/activity"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"events"})}})}),define("app/views/details",["jquery","underscore","backbone","common"],function(e,t,i,n){"use strict";return i.View.extend({id:"ls-ch",template:t.template(e("#details-popup-tmpl").html()),detailItemTemplate:t.template(e("#detail-item-tmpl").html()),initialize:function(t){this.repo_id=t.repo_id,this.cmmt_id=t.cmmt_id,this.$el.html(this.template()).modal({autoResize:!0}),e("#simplemodal-container").css({width:"auto",height:"auto"}),this.getDetails()},getDetails:function(){var t=this;n.ajaxGet({get_url:n.getUrl({name:"get_history_changes",repo_id:this.repo_id}),data:{commit_id:this.cmmt_id},after_op_success:function(i){t.$(".loading-tip").hide(),t.$(".commit-time").html(i.date_time);var r=function(e){t.$el.append(t.detailItemTemplate({details_title:e.title,details:e.content}))};i.new.length>0&&r({title:gettext("New files"),content:i.new}),i.removed.length>0&&r({title:gettext("Deleted files"),content:i.removed}),i.renamed.length>0&&r({title:gettext("Renamed or Moved files"),content:i.renamed}),i.modified.length>0&&r({title:gettext("Modified files"),content:i.modified}),i.newdir.length>0&&r({title:gettext("New directories"),content:i.newdir}),i.deldir.length>0&&r({title:gettext("Deleted directories"),content:i.deldir}),i.cmt_desc&&t.$el.append("<p>"+n.HTMLescape(i.cmt_desc)+"</p>"),e(window).trigger("resize")},after_op_error:function(i){var r=n.prepareAjaxErrorMsg(i);t.$el.html('<p class="error">'+r+"</p>"),setTimeout(function(){e.modal.close()},2500)}})}})}),define("app/views/activity-item",["jquery","underscore","backbone","common","app/views/details"],function(e,t,i,n,r){"use strict";return i.View.extend({tagName:"li",className:"event-item",template:t.template(e("#activity-item-tmpl").html()),events:{"click .lsch":"showDetails"},initialize:function(e){this.activity=e,"clean-up-repo-trash"==e.etype&&(0==e.days?this.activity.desc=gettext("Removed all items from trash."):this.activity.desc=gettext("Removed items older than {n} days from trash.").replace("{n}",this.activity.days))},showDetails:function(){var e={repo_id:this.activity.repo_id,cmmt_id:this.activity.commit_id};new r(e)},render:function(){return this.$el.html(this.template({activity:this.activity})),this}})}),define("app/views/activities",["jquery","underscore","backbone","common","app/collections/activities","app/views/activity-item"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#activities-tmpl").html()),activityGroupHdTemplate:t.template(e("#activity-group-hd-tmpl").html()),activityGroupBdTemplate:t.template(e("#activity-group-bd-tmpl").html()),initialize:function(){this.activities=new r,this.moreOffset=0},events:{"click #activities-more":"getMoreActivities"},getMoreActivities:function(){var e=this;this.$loadingTip.show(),this.$activitiesMore.hide(),this.activities.fetch({remove:!1,data:{start:e.moreOffset},success:function(){e.renderActivities()}})},renderActivities:function(){var i=this.activities.toJSON(),n=i.length,r=i[n-1].more,a=[];this.$loadingTip.hide(),this.$activitiesMore.hide(),this.moreOffset=i[n-1].more_offset,this.$activitiesBody.empty().show();for(var o=0;o<n;o++)a=a.concat(i[o].events);var d,l,c=t.groupBy(a,"date");for(var u in c)d=e(this.activityGroupHdTemplate({date:u})),l=e(this.activityGroupBdTemplate()),t.each(c[u],function(e){var t=new s(e);l.append(t.render().el)}),this.$activitiesBody.append(d).append(l);r&&this.$activitiesMore.show()},showActivities:function(){this.$activitiesBody.hide(),this.$activitiesMore.hide(),this.$loadingTip.show();var e=this;this.activities.fetch({data:{start:0},success:function(){e.renderActivities()}})},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="activities"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$activitiesBody=this.$("#activities-body"),this.$activitiesMore=this.$("#activities-more"),this.$loadingTip=this.$(".loading-tip")},show:function(){this.renderMainCon(),this.showActivities()},hide:function(){this.$mainCon.detach()}})}),define("app/views/device",["jquery","underscore","backbone","common","moment","app/views/widgets/hl-item-view"],function(e,t,i,n,r,s){"use strict";return s.extend({tagName:"tr",template:t.template(e("#device-item-tmpl").html()),events:{"click .unlink-device":"unlinkDeviceWithConfirm"},initialize:function(){s.prototype.initialize.call(this)},render:function(){var e=this.model.toJSON(),t=r(e.last_accessed);return e.time=t.format("LLLL"),e.time_from_now=n.getRelativeTimeStr(t),this.$el.html(this.template(e)),this},unlinkDeviceWithConfirm:function(){var t=this,i=this.model.get("is_desktop_client"),r=this.model.get("device_name");if(!i)return t.model.unlink({wipe_device:!0,success:function(){t.remove();var e=gettext("Successfully unlink %(name)s.").replace("%(name)s",r);n.feedback(e,"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1;var s=gettext("Unlink device"),a=gettext("Are you sure you want to unlink this device?"),o=gettext("Delete files from this device the next time it comes online."),d=function(i){return t.model.unlink({wipe_device:i,success:function(){t.remove();var e=gettext("Successfully unlink %(name)s.").replace("%(name)s",r);n.feedback(e,"success")},error:function(e){n.ajaxErrorHandler(e)},complete:function(){e.modal.close()}}),!1};n.showConfirmWithExtraOption(s,a,o,d)}})}),define("app/models/device",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({unlink:function(e){var t={platform:this.get("platform"),device_id:this.get("device_id")};e.wipe_device&&(t.wipe_device="true"),$.ajax({url:i.getUrl({name:"devices"}),type:"DELETE",dataType:"json",beforeSend:i.prepareCSRFToken,data:t,success:function(){e.success&&e.success()},error:function(t){e.error&&e.error(t)},complete:function(t){e.complete&&e.complete(t)}})}})}),define("app/collections/devices",["underscore","backbone","common","app/models/device"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"devices"})}})}),define("app/views/devices",["jquery","underscore","backbone","common","app/views/device","app/collections/devices"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#devices-tmpl").html()),initialize:function(){this.devices=new s,this.listenTo(this.devices,"reset",this.reset)},addOne:function(e){var t=new r({model:e});this.$tableBody.append(t.render().el)},reset:function(){this.$tableBody.empty(),this.$loadingTip.hide(),this.devices.each(this.addOne,this),this.devices.length?(this.$emptyTip.hide(),this.$table.show()):(this.$emptyTip.show(),this.$table.hide())},renderMainCon:function(){return this.$mainCon=e('<div class="main-panel-main" id="devices"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableBody=this.$("tbody"),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips"),this},show:function(){this.renderMainCon(),this.devices.fetch({reset:!0})},hide:function(){this.$mainCon.detach()}})}),define("app/views/invitation",["jquery","underscore","backbone","common","moment","app/views/widgets/hl-item-view"],function(e,t,i,n,r,s){"use strict";return s.extend({tagName:"tr",template:t.template(e("#invitation-item-tmpl").html()),initialize:function(){s.prototype.initialize.call(this)},events:{"click .rm-invitation":"removeInvitation"},removeInvitation:function(){var t=this;return e.ajax({url:n.getUrl({name:"invitation",token:this.model.get("token")}),type:"DELETE",cache:!1,beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully deleted 1 item."),"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1},render:function(){var e=this.model.toJSON(),t=r(e.invite_time),i=r(e.expire_time);return e.invite_time_format=t.format("LLLL"),e.expire_time_format=i.format("LLLL"),e.invite_time_from_now=t.format("YYYY-MM-DD"),e.expire_time_from_now=i.format("YYYY-MM-DD"),this.$el.html(this.template(e)),this}})}),define("app/models/invitation",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({})}),define("app/collections/invitations",["underscore","backbone","common","app/models/invitation"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"invitations"})}})}),define("app/views/invitations",["jquery","underscore","backbone","common","app/views/invitation","app/collections/invitations"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#invitations-tmpl").html()),toolbarTemplate:t.template(e("#invitations-toolbar-tmpl").html()),inviteFormTemplate:t.template(e("#invitation-form-tmpl").html()),initialize:function(){this.collection=new s,this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"reset",this.reset)},renderToolbar:function(){this.$toolbar=e('<div class="cur-view-toolbar" id="invitations-toolbar"></div>').html(this.toolbarTemplate()),this.$(".common-toolbar").before(this.$toolbar)},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="invitations"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$loadingTip=this.$(".loading-tip"),this.$table=this.$("table"),this.$tableBody=e("tbody",this.$table),this.$emptyTip=this.$(".empty-tips"),this.$error=this.$(".error")},events:{"click #invite-people":"invitePeople"},invitePeople:function(){var t=this,i=e(this.inviteFormTemplate());i.attr("id");i.modal(),e("#simplemodal-container").css({height:"auto"}),i.on("submit",function(){var r,s=e.trim(e('input[name="accepter"]',i).val()),a=[],o=e(".error",i),d=e('[type="submit"]',i),l=e(".loading-icon",i);if(!s)return o.html(gettext("It is required.")).show(),!1;s=s.split(",");for(var c=0,u=s.length;c<u;c++)(r=e.trim(s[c]))&&a.push(r);return!!a.length&&(o.hide(),n.disableButton(d),l.show(),e.ajax({url:n.getUrl({name:"invitations_batch"}),type:"POST",cache:!1,data:{type:"guest",accepter:a},traditional:!0,beforeSend:n.prepareCSRFToken,success:function(i){var r=[];if(i.success.length){var s;t.collection.add(i.success,{prepend:!0}),t.collection.length==i.success.length&&t.reset(),s=1==i.success.length?gettext("Successfully invited %(email).").replace("%(email)",i.success[0].accepter):gettext("Successfully invited %(email) and %(num) other people.").replace("%(email)",i.success[0].accepter).replace("%(num)",i.success.length-1),r.push({msg:s,type:"success"})}i.failed.length&&e(i.failed).each(function(e,t){var i=t.email+": "+t.error_msg;r.push({msg:i,type:"error"})}),r.length&&n.feedback(r),e.modal.close()},error:function(e){var t=n.prepareAjaxErrorMsg(e);o.html(t).show(),n.enableButton(d)},complete:function(){l.hide()}}),!1)})},addOne:function(e,t,i){var n=new r({model:e});i.prepend?this.$tableBody.prepend(n.render().el):this.$tableBody.append(n.render().el)},initPage:function(){this.$loadingTip.show(),this.$table.hide(),this.$tableBody.empty(),this.$emptyTip.hide(),this.$error.hide()},reset:function(){this.$error.hide(),this.collection.length?(this.$tableBody.empty(),this.collection.each(this.addOne,this),this.$emptyTip.hide(),this.$table.show()):(this.$emptyTip.show(),this.$table.hide())},show:function(){this.renderToolbar(),this.renderMainCon(),this.showContent()},showContent:function(){var e=this;this.initPage(),this.collection.fetch({cache:!1,reset:!0,error:function(t,i,r){var s=n.prepareCollectionFetchErrorMsg(t,i,r);e.$error.html(s).show()},complete:function(){e.$loadingTip.hide()}})},hide:function(){this.$toolbar.detach(),this.$mainCon.detach()}})}),define("app/models/share-admin-repo",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({getWebUrl:function(){return"#common/lib/"+this.get("repo_id")+"/"},getIconUrl:function(e){var t="r"==this.get("share_permission");return i.getLibIconUrl(!1,t,e)},getIconTitle:function(){return"rw"==this.get("share_permission")?gettext("Read-Write"):gettext("Read-Only")}})}),define("app/collections/share-admin-repos",["underscore","backbone","common","app/models/share-admin-repo"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"share_admin_repos"})}})}),define("app/views/share-admin-repo",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view"],function(e,t,i,n,r){"use strict";return r.extend({tagName:"tr",template:t.template(e("#share-admin-repo-tmpl").html()),events:{"click .perm-edit-icon":"showPermSelect","change .perm-select":"updatePermission","click .unshare":"removeShare"},initialize:function(e){r.prototype.initialize.call(this),this.listenTo(this.model,"change",this.render)},showPermSelect:function(){return this.$el.closest("table").find(".perm-select").hide().end().find(".cur-perm, .perm-edit-icon").show(),this.$(".cur-perm, .perm-edit-icon").hide(),this.$(".perm-select").show(),!1},updatePermission:function(){var t=this,i=n.getUrl({name:"share_admin_repo",repo_id:this.model.get("repo_id")}),r=this.model.get("share_type"),s=this.$(".perm-select").val(),a={share_type:r,permission:s};"personal"==r?a.user=this.model.get("user_email"):"group"==r&&(a.group_id=this.model.get("group_id")),e.ajax({url:i,method:"PUT",cache:!1,dataType:"json",data:a,beforeSend:n.prepareCSRFToken,success:function(){"admin"==s?t.model.set({share_permission:"rw",is_admin:!0}):t.model.set({share_permission:s,is_admin:!1}),n.feedback(gettext("Successfully modified permission"),"success")},error:function(e){n.ajaxErrorHandler(e)}})},removeShare:function(){var t=this,i=this.model.get("share_type"),r=n.getUrl({name:"share_admin_repo",repo_id:this.model.get("repo_id")});return"personal"==i?r+="?share_type=personal&user="+encodeURIComponent(this.model.get("user_email")):"group"==i?r+="?share_type=group&group_id="+this.model.get("group_id"):"public"==i&&(r+="?share_type=public"),e.ajax({url:r,type:"DELETE",beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully deleted 1 item"),"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1},render:function(){var e=this.model.toJSON(),i=n.isHiDPI()?48:24,r=this.model.getIconUrl(i),s=this.model.get("share_type");return this.show_admin=!1,app.pageOptions.is_pro&&"public"!=s&&(this.show_admin=!0),t.extend(e,{icon_url:r,icon_title:this.model.getIconTitle(),url:this.model.getWebUrl(),name:this.model.get("repo_name"),show_admin:this.show_admin}),this.$el.html(this.template(e)),this}})}),define("app/views/share-admin-repos",["jquery","underscore","backbone","common","app/collections/share-admin-repos","app/views/share-admin-repo"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#share-admin-repos-tmpl").html()),initialize:function(){this.repos=new r,this.listenTo(this.repos,"add",this.addOne),this.listenTo(this.repos,"reset",this.reset);var t=this;e(document).on("click",function(e){var i=e.target||event.srcElement,n=t.$(".perm-select:visible");n.length&&!n.is(i)&&(n.hide(),n.closest("tr").find(".cur-perm, .perm-edit-icon").show())})},events:{"click #share-admin-repos .by-name":"sortByName"},sortByName:function(){var e=this.repos,t=this.$sortIcon;return t.hasClass("icon-caret-up")?e.comparator=function(e,t){return-n.compareTwoWord(e.get("repo_name"),t.get("repo_name"))}:e.comparator=function(e,t){return n.compareTwoWord(e.get("repo_name"),t.get("repo_name"))},e.sort(),this.$tableBody.empty(),e.each(this.addOne,this),t.toggleClass("icon-caret-up icon-caret-down").show(),e.comparator=null,!1},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="share-admin-repos"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$sortIcon=e(".by-name .sort-icon",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},hide:function(){this.$mainCon.detach()},show:function(){this.renderMainCon(),this.showContent()},showContent:function(){var e=this;this.initPage(),this.repos.fetch({cache:!1,reset:!0,error:function(t,i,r){e.$loadingTip.hide();var s=e.$(".error"),a=n.prepareCollectionFetchErrorMsg(t,i,r);s.html(a).show()}})},initPage:function(){this.$table.hide(),this.$sortIcon.attr("class","sort-icon icon-caret-down").hide(),this.$tableBody.empty(),this.$loadingTip.show(),this.$emptyTip.hide(),this.$(".error").hide()},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.repos.length?(this.$emptyTip.hide(),this.$tableBody.empty(),this.repos.each(this.addOne,this),this.$table.show()):(this.$table.hide(),this.$emptyTip.show())},addOne:function(e){var t=new s({model:e});this.$tableBody.append(t.render().el)}})}),define("app/models/share-admin-folder",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({getWebUrl:function(){var e=this.get("path");return"#my-libs/lib/"+this.get("repo_id")+i.encodePath(e)},getIconUrl:function(e){var t="r"==this.get("share_permission");return i.getDirIconUrl(t,e)},getIconTitle:function(){return"rw"==this.get("share_permission")?gettext("Read-Write"):gettext("Read-Only")}})}),define("app/collections/share-admin-folders",["underscore","backbone","common","app/models/share-admin-folder"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"share_admin_folders"})}})}),define("app/views/share-admin-folder",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view"],function(e,t,i,n,r){"use strict";return r.extend({tagName:"tr",template:t.template(e("#share-admin-folder-tmpl").html()),events:{"click .perm-edit-icon":"showPermSelect","change .perm-select":"updatePermission","click .unshare":"removeShare"},initialize:function(e){r.prototype.initialize.call(this),this.listenTo(this.model,"change",this.render)},showPermSelect:function(){return this.$el.closest("table").find(".perm-select").hide().end().find(".cur-perm, .perm-edit-icon").show(),this.$(".cur-perm, .perm-edit-icon").hide(),this.$(".perm-select").show(),!1},updatePermission:function(){var t=this,i=this.model.get("share_type"),r=this.$(".perm-select").val(),s=n.getUrl({name:"dir_shared_items",repo_id:this.model.get("repo_id")})+"?p="+encodeURIComponent(this.model.get("path"));"personal"==i?s+="&share_type=user&username="+encodeURIComponent(this.model.get("user_email")):"group"==i&&(s+="&share_type=group&group_id="+this.model.get("group_id")),e.ajax({url:s,method:"POST",dataType:"json",beforeSend:n.prepareCSRFToken,data:{permission:r},success:function(){t.model.set({share_permission:r}),n.feedback(gettext("Successfully modified permission"),"success")},error:function(e){n.ajaxErrorHandler(e)}})},removeShare:function(){var t=this,i=this.model.get("share_type"),r=n.getUrl({name:"dir_shared_items",repo_id:this.model.get("repo_id")})+"?p="+n.encodePath(this.model.get("path"));return"personal"==i?r+="&share_type=user&username="+n.encodePath(this.model.get("user_email")):"group"==i&&(r+="&share_type=group&group_id="+this.model.get("group_id")),e.ajax({url:r,type:"DELETE",beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully deleted 1 item"),"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1},render:function(){var e=this.model.toJSON(),i=n.isHiDPI()?96:24,r=this.model.getIconUrl(i);return t.extend(e,{icon_url:r,icon_title:this.model.getIconTitle(),url:this.model.getWebUrl(),name:this.model.get("folder_name")}),this.$el.html(this.template(e)),this}})}),define("app/views/share-admin-folders",["jquery","underscore","backbone","common","app/collections/share-admin-folders","app/views/share-admin-folder"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#share-admin-folders-tmpl").html()),initialize:function(){this.folders=new r,this.listenTo(this.folders,"add",this.addOne),this.listenTo(this.folders,"reset",this.reset);var t=this;e(document).on("click",function(e){var i=e.target||event.srcElement,n=t.$(".perm-select:visible");n.length&&!n.is(i)&&(n.hide(),n.closest("tr").find(".cur-perm, .perm-edit-icon").show())})},events:{"click #share-admin-folders .by-name":"sortByName"},sortByName:function(){var e=this.folders,t=this.$sortIcon;return t.hasClass("icon-caret-up")?e.comparator=function(e,t){return-n.compareTwoWord(e.get("folder_name"),t.get("folder_name"))}:e.comparator=function(e,t){return n.compareTwoWord(e.get("folder_name"),t.get("folder_name"))},e.sort(),this.$tableBody.empty(),e.each(this.addOne,this),t.toggleClass("icon-caret-up icon-caret-down").show(),e.comparator=null,!1},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="share-admin-folders"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$sortIcon=e(".by-name .sort-icon",this.$table),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},hide:function(){this.$mainCon.detach()},show:function(){this.renderMainCon(),this.showContent()},showContent:function(){this.initPage(),this.folders.fetch({cache:!1,reset:!0,error:function(e,t,i){_this.$loadingTip.hide();var r=_this.$(".error"),s=n.prepareCollectionFetchErrorMsg(e,t,i);r.html(s).show()}})},initPage:function(){this.$table.hide(),this.$sortIcon.attr("class","sort-icon icon-caret-down").hide(),this.$tableBody.empty(),this.$loadingTip.show(),this.$emptyTip.hide(),this.$(".error").hide()},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.folders.length?(this.$emptyTip.hide(),this.$tableBody.empty(),this.folders.each(this.addOne,this),this.$table.show()):(this.$table.hide(),this.$emptyTip.show())},addOne:function(e){var t=new s({model:e});this.$tableBody.append(t.render().el)}})}),define("app/models/share-admin-share-link",["underscore","backbone","common","moment"],function(e,t,i,n){"use strict";return t.Model.extend({parse:function(t){var i=e.clone(t),r=t.expire_date;return i.expire_date_timestamp=r?n(r).format("X"):0,i},getIconUrl:function(e){return this.get("is_dir")?i.getDirIconUrl(!1,e):i.getFileIconUrl(this.get("obj_name"),e)},getWebUrl:function(){var e=this.get("repo_id"),t=this.get("path");return this.get("is_dir")?"#common/lib/"+e+i.encodePath(t):app.config.siteRoot+"lib/"+e+"/file"+i.encodePath(t)}})}),define("app/collections/share-admin-share-links",["underscore","backbone","common","app/models/share-admin-share-link"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"share_admin_share_links"})}})}),define("app/views/share-admin-share-link",["jquery","underscore","backbone","common","moment","app/views/widgets/hl-item-view"],function(e,t,i,n,r,s){"use strict";return s.extend({tagName:"tr",template:t.template(e("#share-admin-download-link-tmpl").html()),linkPopupTemplate:t.template(e("#share-admin-link-popup-tmpl").html()),events:{"click .rm-link":"removeLink","click .view-link":"viewLink"},initialize:function(e){s.prototype.initialize.call(this)},viewLink:function(){var t=e(this.linkPopupTemplate({link:this.model.get("link")}));t.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"});var i=e("p",t),n=e("input",t);return n.css({width:i.width()+2}),i.hide(),n.show(),n.on("click",function(){e(this).trigger("select")}),!1},removeLink:function(){var t=this;return e.ajax({url:n.getUrl({name:"share_admin_share_link",token:this.model.get("token")}),type:"DELETE",beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully deleted 1 item"),"success")},error:function(e){n.ajaxErrorHandler(e)}}),!1},render:function(){var e=this.model.toJSON(),i=n.isHiDPI()?96:24,s=this.model.getIconUrl(i);return t.extend(e,{icon_url:s,dirent_url:this.model.getWebUrl(),time:e.expire_date?r(e.expire_date).format("YYYY-MM-DD"):""}),this.$el.html(this.template(e)),this}})}),define("app/views/share-admin-share-links",["jquery","underscore","backbone","common","app/collections/share-admin-share-links","app/views/share-admin-share-link"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#share-admin-download-links-tmpl").html()),initialize:function(){this.links=new r,this.listenTo(this.links,"add",this.addOne),this.listenTo(this.links,"reset",this.reset)},events:{"click #share-admin-download-links .by-name":"sortByName","click #share-admin-download-links .by-time":"sortByTime"},initialSort:function(e,t){var i=e.get("is_dir"),n=t.get("is_dir");return i&&!n?-1:!i&&n?1:0},sortByName:function(){var e=this,t=this.links,i=this.$sortByNameIcon;return this.$sortByTimeIcon.hide(),i.hasClass("icon-caret-up")?t.comparator=function(t,i){var r=e.initialSort(t,i);return 0!=r?r:-n.compareTwoWord(t.get("obj_name"),i.get("obj_name"))}:t.comparator=function(t,i){var r=e.initialSort(t,i);return 0!=r?r:n.compareTwoWord(t.get("obj_name"),i.get("obj_name"))},t.sort(),this.$tableBody.empty(),t.each(this.addOne,this),i.toggleClass("icon-caret-up icon-caret-down").show(),t.comparator=null,!1},sortByTime:function(){var e=this,t=this.links,i=this.$sortByTimeIcon;return this.$sortByNameIcon.hide(),i.hasClass("icon-caret-down")?t.comparator=function(t,i){var n=e.initialSort(t,i);return 0!=n?n:t.get("expire_date_timestamp")<i.get("expire_date_timestamp")?1:-1}:t.comparator=function(t,i){var n=e.initialSort(t,i);return 0!=n?n:t.get("expire_date_timestamp")<i.get("expire_date_timestamp")?-1:1},t.sort(),this.$tableBody.empty(),t.each(this.addOne,this),i.toggleClass("icon-caret-up icon-caret-down").show(),t.comparator=null,!1},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="share-admin-download-links"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$sortByNameIcon=this.$(".by-name .sort-icon"),this.$sortByTimeIcon=this.$(".by-time .sort-icon"),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},hide:function(){this.$mainCon.detach()},show:function(){this.renderMainCon(),this.showContent()},showContent:function(){var e=this;this.initPage(),this.links.fetch({cache:!1,reset:!0,error:function(t,i,r){var s=e.$(".error"),a=n.prepareCollectionFetchErrorMsg(t,i,r);s.html(a).show(),e.$loadingTip.hide()}})},initPage:function(){this.$table.hide(),this.$sortByNameIcon.attr("class","sort-icon icon-caret-up").show(),this.$sortByTimeIcon.attr("class","sort-icon icon-caret-down").hide(),this.$tableBody.empty(),this.$loadingTip.show(),this.$emptyTip.hide(),this.$(".error").hide()},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.links.length?(this.$emptyTip.hide(),this.$tableBody.empty(),this.links.each(this.addOne,this),this.$table.show()):(this.$emptyTip.show(),this.$table.hide())},addOne:function(e){var t=new s({model:e});this.$tableBody.append(t.render().el)}})}),define("app/models/share-admin-upload-link",["underscore","backbone","common"],function(e,t,i){"use strict";return t.Model.extend({getIconUrl:function(e){return i.getDirIconUrl(!1,e)},getWebUrl:function(){var e=this.get("repo_id"),t=this.get("path");return"#common/lib/"+e+i.encodePath(t)}})}),define("app/collections/share-admin-upload-links",["underscore","backbone","common","app/models/share-admin-upload-link"],function(e,t,i,n){"use strict";return t.Collection.extend({model:n,url:function(){return i.getUrl({name:"share_admin_upload_links"})}})}),define("app/views/share-admin-upload-link",["jquery","underscore","backbone","common","app/views/widgets/hl-item-view"],function(e,t,i,n,r){"use strict";return r.extend({tagName:"tr",template:t.template(e("#share-admin-upload-link-tmpl").html()),linkPopupTemplate:t.template(e("#share-admin-link-popup-tmpl").html()),events:{"click .rm-link":"removeLink","click .view-link":"viewLink"},initialize:function(e){r.prototype.initialize.call(this)},viewLink:function(){var t=e(this.linkPopupTemplate({link:this.model.get("link")}));t.modal({focus:!1}),e("#simplemodal-container").css({width:"auto",height:"auto"});var i=e("p",t),n=e("input",t);return n.css({width:i.width()+2}),i.hide(),n.show(),n.on("click",function(){e(this).trigger("select")}),!1},removeLink:function(){var t=this;return e.ajax({url:n.getUrl({name:"share_admin_upload_link",token:this.model.get("token")}),type:"DELETE",beforeSend:n.prepareCSRFToken,success:function(){t.remove(),n.feedback(gettext("Successfully deleted 1 item"),"success")},
error:function(e){n.ajaxErrorHandler(e)}}),!1},render:function(){var e=this.model.toJSON(),i=n.isHiDPI()?96:24,r=this.model.getIconUrl(i);return t.extend(e,{icon_url:r,dirent_url:this.model.getWebUrl()}),this.$el.html(this.template(e)),this}})}),define("app/views/share-admin-upload-links",["jquery","underscore","backbone","common","app/collections/share-admin-upload-links","app/views/share-admin-upload-link"],function(e,t,i,n,r,s){"use strict";return i.View.extend({el:".main-panel",template:t.template(e("#share-admin-upload-links-tmpl").html()),initialize:function(){this.links=new r,this.listenTo(this.links,"add",this.addOne),this.listenTo(this.links,"reset",this.reset)},renderMainCon:function(){this.$mainCon=e('<div class="main-panel-main" id="share-admin-upload-links"></div>').html(this.template()),this.$el.append(this.$mainCon),this.$table=this.$("table"),this.$tableBody=e("tbody",this.$table),this.$loadingTip=this.$(".loading-tip"),this.$emptyTip=this.$(".empty-tips")},hide:function(){this.$mainCon.detach()},show:function(){this.renderMainCon(),this.showContent()},showContent:function(){var e=this;this.initPage(),this.links.fetch({cache:!1,reset:!0,error:function(t,i,r){var s=e.$(".error"),a=n.prepareCollectionFetchErrorMsg(t,i,r);s.html(a).show(),e.$loadingTip.hide()}})},initPage:function(){this.$table.hide(),this.$tableBody.empty(),this.$loadingTip.show(),this.$emptyTip.hide(),this.$(".error").hide()},reset:function(){this.$(".error").hide(),this.$loadingTip.hide(),this.links.length?(this.$emptyTip.hide(),this.$tableBody.empty(),this.links.each(this.addOne,this),this.$table.show()):(this.$emptyTip.show(),this.$table.hide())},addOne:function(e){var t=new s({model:e});this.$tableBody.append(t.render().el)}})}),define("app/views/notifications",["jquery","underscore","backbone","common","app/views/widgets/popover"],function(e,t,i,n,r){"use strict";return r.extend({id:"notice-popover",className:"sf-popover",template:t.template(e("#notice-popover-tmpl").html()),initialize:function(t){r.prototype.initialize.call(this),this.render(),this.$loadingTip=this.$(".loading-tip"),this.$error=this.$(".error"),this.$noticeList=this.$(".notice-list"),this.$notifications=e("#notifications"),this.$num=e(".num",this.$notifications),this.orig_doc_title=document.title;var i=this,s=function(){e.ajax({url:n.getUrl({name:"notifications"}),dataType:"json",cache:!1,success:function(t){var n=t.unseen_count,r=i.$num;r.html(n),n>0?(r.removeClass("hide"),document.title="("+n+")"+i.orig_doc_title):(r.addClass("hide"),document.title=i.orig_doc_title);var s=e("#network-top-notice");s.is(":visible")&&s.remove()},error:function(t){var i;t.responseText?401==t.status&&(clearInterval(a),i=e('<p class="top-bar fixed-top-bar">'+gettext("You have logged out.")+'<span class="top-bar-click">'+gettext("Log in")+"</span></p>"),e("#wrapper").prepend(i)):0==e("#network-top-notice").length&&(i=e('<p class="top-bar fixed-top-bar" id="network-top-notice">'+gettext("Please check the network.")+'<span class="top-bar-click">'+gettext("Refresh")+"</span></p>"),e("#wrapper").prepend(i)),e(".top-bar-click",i).on("click",function(){location.reload(!0)})}})};s();var a=setInterval(s,1e3*(app.pageOptions.unread_notifications_request_interval||180));e("#notice-icon").on("click",function(){return i.toggle(),!1})},render:function(){return this.$el.html(this.template()),this},events:{"click .detail":"viewDetail","click .unread a":"visitUnread"},viewDetail:function(t){var i=e(t.currentTarget);location.href=e(".brief a",i.parent()).attr("href")},visitUnread:function(t){var i=e(t.currentTarget),r=i.closest(".unread").data("id"),s=i.attr("href");return e.ajax({url:n.getUrl({name:"notification"}),type:"PUT",dataType:"json",data:{notice_id:r},beforeSend:n.prepareCSRFToken,success:function(e){location.href=s,i.closest(".unread").removeClass("unread").addClass("read")},error:function(){location.href=s}}),!1},hide:function(){var t=this;return app.ui.currentPopover=null,this.$el.detach(),this.$(".unread").length>0&&e.ajax({url:n.getUrl({name:"notifications"}),type:"PUT",dataType:"json",beforeSend:n.prepareCSRFToken,success:function(){t.$num.html(0).addClass("hide"),document.title=t.orig_doc_title}}),!1},showContent:function(){var t=this;this.$noticeList.addClass("hide"),this.$error.hide(),this.$loadingTip.show(),e.ajax({url:n.getUrl({name:"get_popup_notices"}),dataType:"json",success:function(e){t.$loadingTip.hide(),t.$noticeList.html(e.notice_html).show()},error:function(e,i,r){t.$loadingTip.hide();var s=n.prepareAjaxErrorMsg(e);t.$error.html(s).show()}}),this.$notifications.append(this.$el)}})}),define("app/views/account",["jquery","underscore","backbone","common","app/views/widgets/popover"],function(e,t,i,n,r){"use strict";return r.extend({id:"user-info-popup",className:"sf-popover account-popup",template:t.template(e("#user-info-popup-tmpl").html()),initialize:function(t){r.prototype.initialize.call(this),this.render(),this.$loadingTip=this.$(".loading-tip"),this.$error=this.$(".error"),this.$space=this.$("#space-traffic"),this.$account=e("#account");var i=this;e(".account-toggle").on("click",function(){return i.toggle(),!1})},render:function(){return this.$el.html(this.template()),this},showContent:function(){var t=this;this.$error.hide(),this.$loadingTip.show(),this.$space.addClass("hide"),e.ajax({url:n.getUrl({name:"space_and_traffic"}),dataType:"json",cache:!1,success:function(e){t.$loadingTip.hide(),t.$space.html(e.html).removeClass("hide")},error:function(e,i,r){t.$loadingTip.hide();var s=n.prepareAjaxErrorMsg(e);t.$error.html(s).show()}}),this.$account.append(this.$el)}})}),define("app/router",["jquery","backbone","common","js.cookie","app/views/side-nav","app/views/myhome-repos","app/views/my-deleted-repos","app/views/myhome-shared-repos","app/views/groups","app/views/group","app/views/organization","app/views/dir","app/views/starred-file","app/views/activities","app/views/devices","app/views/invitations","app/views/share-admin-repos","app/views/share-admin-folders","app/views/share-admin-share-links","app/views/share-admin-upload-links","app/views/notifications","app/views/account"],function(e,t,i,n,r,s,a,o,d,l,c,u,h,p,m,_,f,g,v,y,w,b){"use strict";return t.Router.extend({routes:{"":"showRepos","my-libs/":"showMyRepos","my-libs/deleted/":"showMyDeletedRepos","my-libs/lib/:repo_id(/*path)":"showMyRepoDir","shared-libs/":"showSharedRepos","shared-libs/lib/:repo_id(/*path)":"showSharedRepoDir","groups/":"showGroups","group/:group_id/":"showGroup","group/:group_id/lib/:repo_id(/*path)":"showGroupRepoDir","group/:group_id/discussions/":"showGroupDiscussions","org/":"showOrgRepos","org/lib/:repo_id(/*path)":"showOrgRepoDir","common/lib/:repo_id(/*path)":"showCommonDir","starred/":"showStarredFile","activities/":"showActivities","devices/":"showDevices","invitations/":"showInvitations","share-admin-libs/":"showShareAdminRepos","share-admin-folders/":"showShareAdminFolders","share-admin-share-links/":"showShareAdminShareLinks","share-admin-upload-links/":"showShareAdminUploadLinks","*actions":"showRepos"},initialize:function(){e(".initial-loading").hide(),e(".main-content").removeClass("hide"),i.prepareApiCsrf(),i.initLocale(),this.sideNavView=new r,app.ui.sideNavView=this.sideNavView,this.dirView=new u,this.myReposView=new s,this.myDeletedReposView=new a,this.sharedReposView=new o,this.orgView=new c,this.groupView=new l,this.groupsView=new d,this.starredFileView=new h,this.devicesView=new m,this.invitationsView=new _,this.activitiesView=new p,this.shareAdminReposView=new f,this.shareAdminFoldersView=new g,this.shareAdminShareLinksView=new v,this.shareAdminUploadLinksView=new y,app.ui.notificationsView=this.notificationsView=new w,app.ui.accountView=this.accountView=new b,app.pageOptions.sort_mode=n.get("sort_mode")||"name_up";var t=this,M=e(window).width();e(window).on("resize",function(){var i=e(window).width();t.currentView.reset&&(M<768&&i>=768||M>=768&&i<768)&&t.currentView.reset(),M=i}),e(window).on("resize",function(){var t=e("#share-popup, #repo-share-link-admin-dialog, #repo-folder-perm-popup, #folder-perm-popup");t.is(":visible")&&(e(window).width()<768?(t.css({width:e(window).width()-50,height:e(window).height()-50,overflow:"auto"}),e.modal.update(e(window).height()-50,e(window).width()-50)):(t.removeAttr("style"),e("#simplemodal-container").css({width:"auto",height:"auto"})))}),e("#info-bar .close").on("click",i.closeTopNoticeBar),e("#top-browser-tip-close").on("click",function(){e("#top-browser-tip").addClass("hide")})},switchCurrentView:function(e){this.currentView?this.currentView!=e&&(this.currentView.hide(),this.currentView=e):this.currentView=e},showRepos:function(){app.pageOptions.can_add_repo?this.showMyRepos():this.showSharedRepos()},showMyRepos:function(){this.switchCurrentView(this.myReposView),this.myReposView.show(),this.sideNavView.setCurTab("mine")},showMyDeletedRepos:function(){this.switchCurrentView(this.myDeletedReposView),this.myDeletedReposView.show(),this.sideNavView.setCurTab("mine")},showSharedRepos:function(){this.switchCurrentView(this.sharedReposView),this.sharedReposView.show(),this.sideNavView.setCurTab("shared")},showMyRepoDir:function(e,t){t=t?"/"+t:"/",this.switchCurrentView(this.dirView),this.dirView.showDir("my-libs",e,t),this.sideNavView.setCurTab("mine")},showCommonDir:function(e,t){t=t?"/"+t:"/",this.switchCurrentView(this.dirView),this.dirView.showDir("common",e,t),this.sideNavView.setCurTab("mine")},showSharedRepoDir:function(e,t){t=t?"/"+t:"/",this.switchCurrentView(this.dirView),this.dirView.showDir("shared-libs",e,t),this.sideNavView.setCurTab("shared")},showGroups:function(){this.switchCurrentView(this.groupsView),this.groupsView.show(),this.sideNavView.setCurTab("group",{cur_group_tab:"groups",cur_group_id:""})},showGroup:function(e,t){this.switchCurrentView(this.groupView),this.groupView.show(e,t),this.sideNavView.setCurTab("group",{cur_group_tab:"",cur_group_id:e})},showGroupRepoDir:function(e,t,n){n=n?"/"+n:"/";var r=i.groupId2Name(e);r?(this.switchCurrentView(this.dirView),this.dirView.showDir("group/"+e,t,n,{group_id:e,group_name:r}),this.sideNavView.setCurTab("group",{cur_group_tab:"",cur_group_id:e})):(i.feedback("Group {group_id} not found".replace("{group_id}",e),"error"),app.router.navigate("",{trigger:!0}))},showGroupDiscussions:function(e){app.pageOptions.enable_group_discussion?this.showGroup(e,{showDiscussions:!0}):(this.showGroup(e),app.router.navigate("group/"+e+"/"))},showOrgRepos:function(){this.switchCurrentView(this.orgView),this.orgView.show(),this.sideNavView.setCurTab("org")},showOrgRepoDir:function(e,t){t=t?"/"+t:"/",this.switchCurrentView(this.dirView),this.dirView.showDir("org",e,t),this.sideNavView.setCurTab("org")},showStarredFile:function(){this.switchCurrentView(this.starredFileView),this.starredFileView.show(),this.sideNavView.setCurTab("starred")},showActivities:function(){this.switchCurrentView(this.activitiesView),this.activitiesView.show(),this.sideNavView.setCurTab("activities")},showDevices:function(){this.switchCurrentView(this.devicesView),this.devicesView.show(),this.sideNavView.setCurTab("devices")},showInvitations:function(){this.switchCurrentView(this.invitationsView),this.invitationsView.show(),this.sideNavView.setCurTab("invitations")},showShareAdminRepos:function(){this.switchCurrentView(this.shareAdminReposView),this.shareAdminReposView.show(),this.sideNavView.setCurTab("share-admin-repos",{show_share_admin:!0})},showShareAdminFolders:function(){this.switchCurrentView(this.shareAdminFoldersView),this.shareAdminFoldersView.show(),this.sideNavView.setCurTab("share-admin-folders",{show_share_admin:!0})},showShareAdminShareLinks:function(){this.switchCurrentView(this.shareAdminShareLinksView),this.shareAdminShareLinksView.show(),this.sideNavView.setCurTab("share-admin-links",{show_share_admin:!0})},showShareAdminUploadLinks:function(){this.switchCurrentView(this.shareAdminUploadLinksView),this.shareAdminUploadLinksView.show(),this.sideNavView.setCurTab("share-admin-links",{show_share_admin:!0})}})}),define("app/main",["app/router"],function(e){app.router=new e,Backbone.history.start()}),require(["./common"],function(e){require(["app/main"])}),define("main",function(){});