From 6100ca67cb5633df9dd74a8f13ff11b0030e63fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Edling?= Date: Fri, 26 Apr 2019 11:33:23 +0200 Subject: [PATCH] Added baseUrl to all ajax calls. Fixes #372 --- .../assets/js/piranha.media.js | 6 ++-- core/Piranha.Manager/assets/js/script.js | 31 +++++++++++++------ core/Piranha.Manager/assets/js/script.min.js | 2 +- core/Piranha.Manager/assets/js/ui.js | 10 +++--- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/core/Piranha.Manager/assets/js/piranha.media.js b/core/Piranha.Manager/assets/js/piranha.media.js index c69b292f1..b8fd9cbdb 100644 --- a/core/Piranha.Manager/assets/js/piranha.media.js +++ b/core/Piranha.Manager/assets/js/piranha.media.js @@ -3,7 +3,7 @@ // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core // @@ -92,7 +92,7 @@ piranha.media = new function() { var mediaUrlCtrl = $("#" + self.mediaUrlId); if (mediaUrlCtrl.prop("tagName") == "IMG") { - mediaUrlCtrl.attr("src", "/manager/assets/img/block-img-placeholder.png"); + mediaUrlCtrl.attr("src", baseUrl + "manager/assets/img/block-img-placeholder.png"); } else if (mediaUrlCtrl.prop("tagName") == "VIDEO" || mediaUrlCtrl.prop("tagName") == "AUDIO") { mediaUrlCtrl.attr("src", ""); } @@ -102,7 +102,7 @@ piranha.media = new function() { self.bindDropzone = function() { $("#dropzonemodal").dropzone({ paramName: "Uploads", - url: "/manager/media/modal/add", + url: baseUrl + "manager/media/modal/add", uploadMultiple: true, init: function() { this.on("queuecomplete", diff --git a/core/Piranha.Manager/assets/js/script.js b/core/Piranha.Manager/assets/js/script.js index 772eb2044..f03f42d6d 100644 --- a/core/Piranha.Manager/assets/js/script.js +++ b/core/Piranha.Manager/assets/js/script.js @@ -23242,7 +23242,7 @@ piranha.notifications = new function() { // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. -// +// // http://github.com/piranhacms/piranha.core // @@ -23298,7 +23298,7 @@ piranha.media = new function() { if (self.mediaUrlId) { var mediaUrlCtrl = $("#" + self.mediaUrlId); - if (mediaUrlCtrl.prop("tagName") == "IMG" || mediaUrlCtrl.prop("tagName") == "VIDEO") { + if (mediaUrlCtrl.prop("tagName") == "IMG" || mediaUrlCtrl.prop("tagName") == "VIDEO" || mediaUrlCtrl.prop("tagname") == "AUDIO") { mediaUrlCtrl.attr("src", e.data("url")); } else { mediaUrlCtrl.val(e.data("url")); @@ -23331,8 +23331,8 @@ piranha.media = new function() { var mediaUrlCtrl = $("#" + self.mediaUrlId); if (mediaUrlCtrl.prop("tagName") == "IMG") { - mediaUrlCtrl.attr("src", "/manager/assets/img/block-img-placeholder.png"); - } else if (mediaUrlCtrl.prop("tagName") == "VIDEO") { + mediaUrlCtrl.attr("src", baseUrl + "manager/assets/img/block-img-placeholder.png"); + } else if (mediaUrlCtrl.prop("tagName") == "VIDEO" || mediaUrlCtrl.prop("tagName") == "AUDIO") { mediaUrlCtrl.attr("src", ""); } } @@ -23341,7 +23341,7 @@ piranha.media = new function() { self.bindDropzone = function() { $("#dropzonemodal").dropzone({ paramName: "Uploads", - url: "/manager/media/modal/add", + url: baseUrl + "manager/media/modal/add", uploadMultiple: true, init: function() { this.on("queuecomplete", @@ -23444,19 +23444,30 @@ $("#modalImgPreview").on("show.bs.modal", if (contenttype.startsWith("image")) { modal.find("#previewImage").show(); modal.find("#previewVideo").hide(); + modal.find("#previewAudio").hide(); modal.find("#previewDocument").hide(); modal.find("#imgPreview").attr("alt", filename); modal.find("#imgPreview").attr("src", url); } else if (contenttype.startsWith("video")) { modal.find("#previewImage").hide(); + modal.find("#previewAudio").hide(); modal.find("#previewVideo").show(); modal.find("#previewDocument").hide(); modal.find("video").attr("src", url); modal.find("video").attr("type", contenttype); + } else if (contenttype.startsWith("audio")) { + modal.find("#previewImage").hide(); + modal.find("#previewAudio").show(); + modal.find("#previewVideo").hide(); + modal.find("#previewDocument").hide(); + + modal.find("audio").attr("src", url); + modal.find("audio").attr("type", contenttype); } else if (contenttype === "application/pdf") { modal.find("#previewImage").hide(); + modal.find("#previewAudio").hide(); modal.find("#previewVideo").hide(); modal.find("#previewDocument").show(); @@ -24257,7 +24268,7 @@ var manager = { markdown: function(str) { $.ajax({ - url: "/manager/markdown", + url: baseUrl + "manager/markdown", method: "POST", contentType: "text/plain", data: str, @@ -24270,10 +24281,10 @@ var manager = { addregion: function(targetId, pageTypeId, regionTypeId, regionIndex, itemIndex, contentType, cb) { $.ajax({ url: contentType == "post" - ? "/manager/post/region" + ? baseUrl + "manager/post/region" : contentType == "site" - ? "/manager/site/region" - : "/manager/page/region", + ? baseUrl + "manager/site/region" + : baseUrl + "manager/page/region", method: "POST", contentType: "application/json", dataType: "html", @@ -24339,7 +24350,7 @@ var manager = { addblock: function(target, blockType, contentType, includeGroups, groupType, cb) { $.ajax({ - url: "/manager/block/create", + url: baseUrl + "manager/block/create", method: "POST", contentType: "application/json", dataType: "html", diff --git a/core/Piranha.Manager/assets/js/script.min.js b/core/Piranha.Manager/assets/js/script.min.js index a6e9c4060..fe320522e 100644 --- a/core/Piranha.Manager/assets/js/script.min.js +++ b/core/Piranha.Manager/assets/js/script.min.js @@ -1 +1 @@ -if(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,i=new Array(n);n--;)i[n]=[t[n],e[t[n]]];return i}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),i=n.length>>>0;if(0==i)return!1;var r,o,s=0|t,a=Math.max(0<=s?s:i-Math.abs(s),0);for(;a+~]|"+P+")"+P+"*"),B=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),q=new RegExp(H),U=new RegExp("^"+F+"$"),G={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){k()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{$.apply(t=N.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){$={apply:t.length?function(e,t){A.apply(e,N.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function oe(e,t,n,i){var r,o,s,a,l,c,u,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&((t?t.ownerDocument||t:y)!==C&&k(t),t=t||C,S)){if(11!==h&&(l=Z.exec(e)))if(r=l[1]){if(9===h){if(!(s=t.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(d&&(s=d.getElementById(r))&&v(t,s)&&s.id===r)return n.push(s),n}else{if(l[2])return $.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&f.getElementsByClassName&&t.getElementsByClassName)return $.apply(n,t.getElementsByClassName(r)),n}if(f.qsa&&!E[e+" "]&&(!g||!g.test(e))){if(1!==h)d=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(te,ne):t.setAttribute("id",a=T),o=(c=p(e)).length;o--;)c[o]="#"+a+" "+ve(c[o]);u=c.join(","),d=K.test(e)&&me(t.parentNode)||t}if(u)try{return $.apply(n,d.querySelectorAll(u)),n}catch(e){}finally{a===T&&t.removeAttribute("id")}}}return m(e.replace(W,"$1"),t,n,i)}function se(){var i=[];return function e(t,n){return i.push(t+" ")>w.cacheLength&&delete e[i.shift()],e[t+" "]=n}}function ae(e){return e[T]=!0,e}function le(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&re(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(s){return ae(function(o){return o=+o,ae(function(e,t){for(var n,i=s([],e.length,o),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=oe.support={},r=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=oe.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:y;return i!==C&&9===i.nodeType&&i.documentElement&&(s=(C=i).documentElement,S=!r(C),y!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ie,!1):n.attachEvent&&n.attachEvent("onunload",ie)),f.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=le(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=Q.test(C.getElementsByClassName),f.getById=le(function(e){return s.appendChild(e).id=T,!C.getElementsByName||!C.getElementsByName(T).length}),f.getById?(w.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var n=e.replace(J,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},w.find.CLASS=f.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},a=[],g=[],(f.qsa=Q.test(C.querySelectorAll))&&(le(function(e){s.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(f.matchesSelector=Q.test(u=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&le(function(e){f.disconnectedMatch=u.call(e,"*"),u.call(e,"[s!='']:x"),a.push("!=",H)}),g=g.length&&new RegExp(g.join("|")),a=a.length&&new RegExp(a.join("|")),t=Q.test(s.compareDocumentPosition),v=t||Q.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===y&&v(y,e)?-1:t===C||t.ownerDocument===y&&v(y,t)?1:l?O(l,e)-O(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===C?-1:t===C?1:r?-1:o?1:l?O(l,e)-O(l,t):0;if(r===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ue(s[i],a[i]):s[i]===y?-1:a[i]===y?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&k(e),t=t.replace(B,"='$1']"),f.matchesSelector&&S&&!E[t+" "]&&(!a||!a.test(t))&&(!g||!g.test(t)))try{var n=u.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=p(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=h[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&h(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(e){var t=oe.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===r:"!="===i?t!==r:"^="===i?r&&0===t.indexOf(r):"*="===i?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function L(e,n,i){return T.isFunction(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==i}):n.nodeType?T.grep(e,function(e){return e===n!==i}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||M,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):T.isFunction(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:A.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),E.test(i[1])&&T.isPlainObject(t))for(i in t)T.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=S.getElementById(i[2]))&&(this[0]=r,this.length=1),this}).prototype=T.fn,M=T(S);var $=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,se=/^$|\/(?:java|ecma)script/i,ae={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function le(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T.nodeName(e,t)?T.merge([e],n):n}function ce(e,t){for(var n=0,i=e.length;nx",g.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue;var pe=S.documentElement,me=/^key/,ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ve=/^([^.]*)(?:\.(.+)|)/;function ye(){return!0}function be(){return!1}function we(){try{return S.activeElement}catch(e){}}function xe(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)xe(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=be;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return T().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),e.each(function(){T.event.add(this,t,r,i,n)})}T.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=q.get(t);if(g)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&T.find.matchesSelector(pe,r),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(I)||[""]).length;c--;)f=m=(a=ve.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=T.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=T.event.special[f]||{},u=T.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&T.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),T.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=q.hasData(e)&&q.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(I)||[""]).length;c--;)if(f=m=(a=ve.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=T.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||T.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)T.event.remove(e,f+t[c],n,i,!0);T.isEmptyObject(l)&&q.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=T.event.fix(e),l=new Array(arguments.length),c=(q.get(this,"events")||{})[a.type]||[],u=T.event.special[a.type]||{};for(l[0]=a,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/\s*$/g;function Ee(e,t){return T.nodeName(e,"table")&&T.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){var t=Te.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Me(e,t){var n,i,r,o,s,a,l,c;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),c=o.events))for(r in delete s.handle,s.events={},c)for(n=0,i=c[r].length;n")},clone:function(e,t,n){var i,r,o,s,a,l,c,u=e.cloneNode(!0),d=T.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(s=le(u),i=0,r=(o=le(e)).length;i").prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(e){i.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(i[0])},abort:function(){r&&r()}}});var Pt,Ft=[],Rt=/(=)\?(?=&|$)|\?\?/;function Ht(e){return T.isWindow(e)?e:9===e.nodeType&&e.defaultView}T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ft.pop()||T.expando+"_"+pt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,o,s=!1!==e.jsonp&&(Rt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=T.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Rt,"$1"+i):!1!==e.jsonp&&(e.url+=(mt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||T.error(i+" was not called"),o[0]},e.dataTypes[0]="json",r=C[i],C[i]=function(){o=arguments},n.always(function(){void 0===r?T(C).removeProp(i):C[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,Ft.push(i)),o&&T.isFunction(r)&&r(o[0]),o=r=void 0}),"script"}),g.createHTMLDocument=((Pt=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Pt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((i=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(i)):t=S),o=!n&&[],(r=E.exec(e))?[t.createElement(r[1])]:(r=fe([e],t,o),o&&o.length&&T(o).remove(),T.merge([],r.childNodes)));var i,r,o},T.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return-1").append(T.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=T.css(e,"position"),u=T(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=T.css(e,"top"),l=T.css(e,"left"),r=("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(s=(i=u.position()).top,i.left):(s=parseFloat(o)||0,parseFloat(l)||0),T.isFunction(t)&&(t=t.call(e,n,T.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):u.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,i,r,o=this[0];return o?o.getClientRects().length?(i=o.getBoundingClientRect()).width||i.height?(n=Ht(r=o.ownerDocument),e=r.documentElement,{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===T.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),T.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+T.css(e[0],"borderTopWidth",!0),left:i.left+T.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-T.css(n,"marginTop",!0),left:t.left-i.left-T.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||pe})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o="pageYOffset"===r;T.fn[t]=function(e){return z(this,function(e,t,n){var i=Ht(e);if(void 0===n)return i?i[r]:e[t];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=Fe(g.pixelPosition,function(e,t){if(t)return t=Pe(e,n),Oe.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(s,a){T.each({padding:"inner"+s,content:a,"":"outer"+s},function(i,o){T.fn[o]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return z(this,function(e,t,n){var i;return T.isWindow(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+s],i["scroll"+s],e.body["offset"+s],i["offset"+s],i["client"+s])):void 0===n?T.css(e,t,r):T.style(e,t,n,r)},a,n?e:void 0,n)}})}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),T.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var jt=C.jQuery,Wt=C.$;return T.noConflict=function(e){return C.$===T&&(C.$=Wt),e&&C.jQuery===T&&(C.jQuery=jt),T},e||(C.jQuery=C.$=T),T}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");if(function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(ndocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},g.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=m(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&m(m.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var o=i[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focusin",a="hover"==o?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(e){return(e=m.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},g.prototype.getDelegateOptions=function(){var n={},i=this.getDefaults();return this._options&&m.each(this._options,function(e,t){i[e]!=t&&(n[e]=t)}),n},g.prototype.enter=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in")||"in"==t.hoverState)t.hoverState="in";else{if(clearTimeout(t.timeout),t.hoverState="in",!t.options.delay||!t.options.delay.show)return t.show();t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)}},g.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},g.prototype.leave=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},g.prototype.show=function(){var e=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var t=m.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!t)return;var n=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,a=s.test(o);a&&(o=o.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=i[0].offsetWidth,u=i[0].offsetHeight;if(a){var d=o,h=this.getPosition(this.$viewport);o="bottom"==o&&l.bottom+u>h.bottom?"top":"top"==o&&l.top-uh.width?"left":"left"==o&&l.left-cs.top+s.height&&(r.top=s.top+s.height-l)}else{var c=t.left-o,u=t.left+o+n;cs.right&&(r.left=s.left+s.width-u)}return r},g.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},g.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},g.prototype.tip=function(){if(!this.$tip&&(this.$tip=m(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(e){var t=this;e&&((t=m(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},g.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var e=m.fn.tooltip;m.fn.tooltip=function(i){return this.each(function(){var e=m(this),t=e.data("bs.tooltip"),n="object"==typeof i&&i;!t&&/destroy|hide/.test(i)||(t||e.data("bs.tooltip",t=new g(this,n)),"string"==typeof i&&t[i]())})},m.fn.tooltip.Constructor=g,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=e,this}}(jQuery),function(r){"use strict";var o=function(e,t){this.init("popover",e,t)};if(!r.fn.tooltip)throw new Error("Popover requires tooltip.js");o.VERSION="3.3.7",o.DEFAULTS=r.extend({},r.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((o.prototype=r.extend({},r.fn.tooltip.Constructor.prototype)).constructor=o).prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var e=r.fn.popover;r.fn.popover=function(i){return this.each(function(){var e=r(this),t=e.data("bs.popover"),n="object"==typeof i&&i;!t&&/destroy|hide/.test(i)||(t||e.data("bs.popover",t=new o(this,n)),"string"==typeof i&&t[i]())})},r.fn.popover.Constructor=o,r.fn.popover.noConflict=function(){return r.fn.popover=e,this}}(jQuery),function(o){"use strict";function r(e,t){this.$body=o(document.body),this.$scrollElement=o(e).is(document.body)?o(window):o(e),this.options=o.extend({},r.DEFAULTS,t),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o.proxy(this.process,this)),this.refresh(),this.process()}function t(i){return this.each(function(){var e=o(this),t=e.data("bs.scrollspy"),n="object"==typeof i&&i;t||e.data("bs.scrollspy",t=new r(this,n)),"string"==typeof i&&t[i]()})}r.VERSION="3.3.7",r.DEFAULTS={offset:10},r.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},r.prototype.refresh=function(){var e=this,i="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),o.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=o(this),t=e.data("target")||e.attr("href"),n=/^#./.test(t)&&o(t);return n&&n.length&&n.is(":visible")&&[[n[i]().top+r,t]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},r.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),i<=t)return s!=(e=o[o.length-1])&&this.activate(e);if(s&&t=r[e]&&(void 0===r[e+1]||t .active"),r=n&&a.support.transition&&(i.length&&i.hasClass("fade")||!!t.find("> .fade").length);function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}i.length&&r?i.one("bsTransitionEnd",o).emulateTransitionEnd(s.TRANSITION_DURATION):o(),i.removeClass("in")};var e=a.fn.tab;a.fn.tab=t,a.fn.tab.Constructor=s,a.fn.tab.noConflict=function(){return a.fn.tab=e,this};var n=function(e){e.preventDefault(),t.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(l){"use strict";var c=function(e,t){this.options=l.extend({},c.DEFAULTS,t),this.$target=l(this.options.target).on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(i){return this.each(function(){var e=l(this),t=e.data("bs.affix"),n="object"==typeof i&&i;t||e.data("bs.affix",t=new c(this,n)),"string"==typeof i&&t[i]()})}c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return re){var n=parseInt(a("body").css(t),10)+a("body").width()-e;setTimeout(function(){a("body").css(t,n)},1)}},r.prototype.show=function(){if(!this.state){var e=a.Event("show.bs.offcanvas");if(this.$element.trigger(e),!e.isDefaultPrevented()){this.state="slide-in",this.calcPlacement();var t=this.getCanvasElements(),n=this.placement,i=this.opposite(n),r=this.offset();-1!==t.index(this.$element)&&(a(this.$element).data("offcanvas-style",a(this.$element).attr("style")||""),this.$element.css(n,-1*r),this.$element.css(n)),t.addClass("canvas-sliding").each(function(){void 0===a(this).data("offcanvas-style")&&a(this).data("offcanvas-style",a(this).attr("style")||""),"static"===a(this).css("position")&&a(this).css("position","relative"),"auto"!==a(this).css(n)&&"0px"!==a(this).css(n)||"auto"!==a(this).css(i)&&"0px"!==a(this).css(i)||a(this).css(n,0)}),this.options.disableScrolling&&this.disableScrolling();var o=function(){"slide-in"==this.state&&(this.state="slid",t.removeClass("canvas-sliding").addClass("canvas-slid"),this.$element.trigger("shown.bs.offcanvas"))};setTimeout(a.proxy(function(){this.$element.addClass("in"),this.slide(t,r,a.proxy(o,this))},this),1)}}},r.prototype.hide=function(e){if("slid"===this.state){var t=a.Event("hide.bs.offcanvas");if(this.$element.trigger(t),!t.isDefaultPrevented()){this.state="slide-out";var n=a(".canvas-slid"),i=(this.placement,-1*this.offset()),r=function(){"slide-out"==this.state&&(this.state=null,this.placement=null,this.$element.removeClass("in"),n.removeClass("canvas-sliding"),n.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")}),this.$element.trigger("hidden.bs.offcanvas"))};n.removeClass("canvas-slid").addClass("canvas-sliding"),setTimeout(a.proxy(function(){this.slide(n,i,a.proxy(r,this))},this),1)}}},r.prototype.toggle=function(){"slide-in"!==this.state&&"slide-out"!==this.state&&this["slid"===this.state?"hide":"show"]()},r.prototype.calcClone=function(){this.$calcClone=this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(a("body"))},r.prototype.recalc=function(){if("none"!==this.$calcClone.css("display")&&("slid"===this.state||"slide-in"===this.state)){this.state=null,this.placement=null;var e=this.getCanvasElements();this.$element.removeClass("in"),e.removeClass("canvas-slid"),e.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")})}},r.prototype.autohide=function(e){0===a(e.target).closest(this.$element).length&&this.hide()};var e=a.fn.offcanvas;a.fn.offcanvas=function(i){return this.each(function(){var e=a(this),t=e.data("bs.offcanvas"),n=a.extend({},r.DEFAULTS,e.data(),"object"==typeof i&&i);t||e.data("bs.offcanvas",t=new r(this,n)),"string"==typeof i&&t[i]()})},a.fn.offcanvas.Constructor=r,a.fn.offcanvas.noConflict=function(){return a.fn.offcanvas=e,this},a(document).on("click.bs.offcanvas.data-api","[data-toggle=offcanvas]",function(e){var t,n=a(this),i=n.attr("data-target")||e.preventDefault()||(t=n.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,""),r=a(i),o=r.data("bs.offcanvas"),s=o?"toggle":n.data();e.stopPropagation(),o?o.toggle():r.offcanvas(s)})}(window.jQuery),function(i){"use strict";var r=function(e,t){this.$element=i(e),this.options=i.extend({},r.DEFAULTS,t),this.$element.on("click.bs.rowlink","td:not(.rowlink-skip)",i.proxy(this.click,this))};r.DEFAULTS={target:"a"},r.prototype.click=function(e){var t=i(e.currentTarget).closest("tr").find(this.options.target)[0];if(i(e.target)[0]!==t)if(e.preventDefault(),t.click)t.click();else if(document.createEvent){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}};var e=i.fn.rowlink;i.fn.rowlink=function(n){return this.each(function(){var e=i(this),t=e.data("bs.rowlink");t||e.data("bs.rowlink",t=new r(this,n))})},i.fn.rowlink.Constructor=r,i.fn.rowlink.noConflict=function(){return i.fn.rowlink=e,this},i(document).on("click.bs.rowlink.data-api",'[data-link="row"]',function(e){if(0===i(e.target).closest(".rowlink-skip").length){var t=i(this);t.data("bs.rowlink")||(t.rowlink(t.data()),i(e.target).trigger("click.bs.rowlink"))}})}(window.jQuery),function(i){"use strict";var o=void 0!==window.orientation,n=-1n.length)break}else this.buffer[r]==n.charAt(o)&&r!=this.partialPosition&&(o++,i=r);return!e&&i+1=this.partialPosition)&&(this.writeBuffer(),e||this.$element.val(this.$element.val().substring(0,i+1))),this.partialPosition?r:this.firstNonMaskPos};var e=i.fn.inputmask;i.fn.inputmask=function(n){return this.each(function(){var e=i(this),t=e.data("bs.inputmask");t||e.data("bs.inputmask",t=new r(this,n))})},i.fn.inputmask.Constructor=r,i.fn.inputmask.noConflict=function(){return i.fn.inputmask=e,this},i(document).on("focus.bs.inputmask.data-api","[data-mask]",function(e){var t=i(this);t.data("bs.inputmask")||t.inputmask(t.data())})}(window.jQuery),function(s){"use strict";var n="Microsoft Internet Explorer"==window.navigator.appName,i=function(e,t){if(this.$element=s(e),this.$input=this.$element.find(":file"),0!==this.$input.length){this.name=this.$input.attr("name")||t.name,this.$hidden=this.$element.find('input[type=hidden][name="'+this.name+'"]'),0===this.$hidden.length&&(this.$hidden=s('').insertBefore(this.$input)),this.$preview=this.$element.find(".fileinput-preview");var n=this.$preview.css("height");"inline"!==this.$preview.css("display")&&"0px"!==n&&"none"!==n&&this.$preview.css("line-height",n),this.original={exists:this.$element.hasClass("fileinput-exists"),preview:this.$preview.html(),hiddenVal:this.$hidden.val()},this.listen()}};i.prototype.listen=function(){this.$input.on("change.bs.fileinput",s.proxy(this.change,this)),s(this.$input[0].form).on("reset.bs.fileinput",s.proxy(this.reset,this)),this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput",s.proxy(this.trigger,this)),this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput",s.proxy(this.clear,this))},i.prototype.change=function(e){var n=void 0===e.target.files?e.target&&e.target.value?[{name:e.target.value.replace(/^.+\\/,"")}]:[]:e.target.files;if(e.stopPropagation(),0!==n.length){this.$hidden.val(""),this.$hidden.attr("name",""),this.$input.attr("name",this.name);var i=n[0];if(0");t[0].src=e.target.result,n[0].result=e.target.result,o.find(".fileinput-filename").text(i.name),"none"!=r.css("max-height")&&t.css("max-height",parseInt(r.css("max-height"),10)-parseInt(r.css("padding-top"),10)-parseInt(r.css("padding-bottom"),10)-parseInt(r.css("border-top"),10)-parseInt(r.css("border-bottom"),10)),r.html(t),o.addClass("fileinput-exists").removeClass("fileinput-new"),o.trigger("change.bs.fileinput",n)},t.readAsDataURL(i)}else this.$element.find(".fileinput-filename").text(i.name),this.$preview.text(i.name),this.$element.addClass("fileinput-exists").removeClass("fileinput-new"),this.$element.trigger("change.bs.fileinput")}else this.clear()},i.prototype.clear=function(e){if(e&&e.preventDefault(),this.$hidden.val(""),this.$hidden.attr("name",this.name),this.$input.attr("name",""),n){var t=this.$input.clone(!0);this.$input.after(t),this.$input.remove(),this.$input=t}else this.$input.val("");this.$preview.html(""),this.$element.find(".fileinput-filename").text(""),this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),void 0!==e&&(this.$input.trigger("change"),this.$element.trigger("clear.bs.fileinput"))},i.prototype.reset=function(){this.clear(),this.$hidden.val(this.original.hiddenVal),this.$preview.html(this.original.preview),this.$element.find(".fileinput-filename").text(""),this.original.exists?this.$element.addClass("fileinput-exists").removeClass("fileinput-new"):this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),this.$element.trigger("reset.bs.fileinput")},i.prototype.trigger=function(e){this.$input.trigger("click"),e.preventDefault()};var e=s.fn.fileinput;s.fn.fileinput=function(n){return this.each(function(){var e=s(this),t=e.data("bs.fileinput");t||e.data("bs.fileinput",t=new i(this,n)),"string"==typeof n&&t[n]()})},s.fn.fileinput.Constructor=i,s.fn.fileinput.noConflict=function(){return s.fn.fileinput=e,this},s(document).on("click.fileinput.data-api",'[data-provides="fileinput"]',function(e){var t=s(this);if(!t.data("bs.fileinput")){t.fileinput(t.data());var n=s(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');0>>0,i=0;ike(e)?(o=e+1,a-ke(e)):(o=e,a),{year:o,dayOfYear:s}}function We(e,t,n){var i,r,o=He(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?i=s+ze(r=e.year()-1,t,n):s>ze(e.year(),t,n)?(i=s-ze(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function ze(e,t,n){var i=He(e,t,n),r=He(e+1,t,n);return(ke(e)-i+r)/7}function Ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),P("week",5),P("isoWeek",5),le("w",Q),le("ww",Q,U),le("W",Q),le("WW",Q,U),he(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=S(e)}),z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),he(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:w(n).invalidWeekday=e}),he(["d","e","E"],function(e,t,n,i){t[i]=S(e)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ge=se,Ve=se,Xe=se;function Qe(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),l[t]=ce(l[t]),c[t]=ce(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Ke(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Je(e,t){return t._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Ze),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),$("hour","h"),P("hour",13),le("a",Je),le("A",Je),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,U),le("hh",Q,U),le("kk",Q,U),le("hmm",Z),le("hmmss",K),le("Hmm",Z),le("Hmmss",K),de(["H","HH"],ge),de(["k","kk"],function(e,t,n){var i=S(e);t[ge]=24===i?0:i}),de(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),de(["h","hh"],function(e,t,n){t[ge]=S(e),w(n).bigHour=!0}),de("hmm",function(e,t,n){var i=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i)),w(n).bigHour=!0}),de("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i,2)),t[ye]=S(e.substr(r)),w(n).bigHour=!0}),de("Hmm",function(e,t,n){var i=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i))}),de("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i,2)),t[ye]=S(e.substr(r))});var et,tt=_e("Hours",!0),nt={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:Ae,monthsShort:$e,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Ue,weekdaysShort:qe,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function st(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),at(t)}catch(e){}return it[e]}function at(e,t){var n;return e&&((n=c(t)?ct(e):lt(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,i=nt;if(t.abbr=e,null!=it[e])E("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=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])i=it[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return it[e]=new M(L(i,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),at(e),it[e]}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!a(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,i,r,o=0;o=t&&s(r,n,!0)>=t-1)break;t--}o++}return et}(e)}function ut(e){var t,n=e._a;return n&&-2===w(e).overflow&&(t=n[pe]<0||11Le(n[fe],n[pe])?me:n[ge]<0||24ze(n,o,s)?w(e)._overflowWeeks=!0:null!=l?w(e)._overflowWeekday=!0:(a=je(n,i,r,o,s),e._a[fe]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(o=dt(e._a[fe],i[fe]),(e._dayOfYear>ke(o)||0===e._dayOfYear)&&(w(e)._overflowDayOfYear=!0),n=Re(o,0,e._dayOfYear),e._a[pe]=n.getUTCMonth(),e._a[me]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[ye]&&0===e._a[be]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Re:function(e,t,n,i,r,o,s){var a;return e<100&&0<=e?(a=new Date(e+400,t,n,i,r,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,o,s),a}).apply(null,s),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(w(e).weekdayMismatch=!0)}}var ft=/^\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)?)?$/,pt=/^\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)?)?$/,mt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["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}/]],vt=[["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/]],yt=/^\/?Date\((\-?\d+)/i;function bt(e){var t,n,i,r,o,s,a=e._i,l=ft.exec(a)||pt.exec(a);if(l){for(w(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=Ht,hn.isUTC=Ht,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=n("dates accessor is deprecated. Use date instead.",sn),hn.months=n("months accessor is deprecated. Use month instead",Oe),hn.years=n("years accessor is deprecated. Use year instead",Te),hn.zone=n("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()}),hn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=St(e))._a){var t=e._isUTC?p(e._a):_t(e._a);this._isDSTShifted=this.isValid()&&0").addClass("timepicker-hours").append(K("").addClass("table-condensed")),t=K("
").addClass("timepicker-minutes").append(K("
").addClass("table-condensed")),n=K("
").addClass("timepicker-seconds").append(K("
").addClass("table-condensed")),i=[function(){var e=K(""),t=K(""),n=K("");return _("h")&&(e.append(K("
").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:c.tooltips.pickHour}).attr("data-action","showHours"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(K("").addClass(c.icons.down))))),_("m")&&(_("h")&&(e.append(K("").addClass("separator")),t.append(K("").addClass("separator").html(":")),n.append(K("").addClass("separator"))),e.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:c.tooltips.pickMinute}).attr("data-action","showMinutes"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(K("").addClass(c.icons.down))))),_("s")&&(_("m")&&(e.append(K("").addClass("separator")),t.append(K("").addClass("separator").html(":")),n.append(K("").addClass("separator"))),e.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:c.tooltips.pickSecond}).attr("data-action","showSeconds"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(K("").addClass(c.icons.down))))),s||(e.append(K("").addClass("separator")),t.append(K("").append(K("").addClass("separator"))),K("
").addClass("timepicker-picker").append(K("").addClass("table-condensed").append([e,t,n]))}()];return _("h")&&i.push(e),_("m")&&i.push(t),_("s")&&i.push(n),i},M=function(){var e=K("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),t=K("
").addClass("datepicker").append(function(){var e=K("
").append(K("").append(K("").append(K("").append(K("
").addClass("prev").attr("data-action","previous").append(K("").addClass(c.icons.previous))).append(K("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",c.calendarWeeks?"6":"5")).append(K("").addClass("next").attr("data-action","next").append(K("").addClass(c.icons.next)))),t=K("
").attr("colspan",c.calendarWeeks?"8":"7")));return[K("
").addClass("datepicker-days").append(K("").addClass("table-condensed").append(e).append(K(""))),K("
").addClass("datepicker-months").append(K("
").addClass("table-condensed").append(e.clone()).append(t.clone())),K("
").addClass("datepicker-years").append(K("
").addClass("table-condensed").append(e.clone()).append(t.clone())),K("
").addClass("datepicker-decades").append(K("
").addClass("table-condensed").append(e.clone()).append(t.clone()))]}()),n=K("
").addClass("timepicker").append(L()),i=K("
    ").addClass("list-unstyled"),r=K("
  • ").addClass("picker-switch"+(c.collapse?" accordion-toggle":"")).append(function(){var e=[];return c.showTodayButton&&e.push(K("
").append(K("").attr({"data-action":"today",title:c.tooltips.today}).append(K("").addClass(c.icons.today)))),!c.sideBySide&&D()&&E()&&e.push(K("").append(K("").attr({"data-action":"togglePicker",title:c.tooltips.selectTime}).append(K("").addClass(c.icons.time)))),c.showClear&&e.push(K("").append(K("").attr({"data-action":"clear",title:c.tooltips.clear}).append(K("").addClass(c.icons.clear)))),c.showClose&&e.push(K("").append(K("").attr({"data-action":"close",title:c.tooltips.close}).append(K("").addClass(c.icons.close)))),K("").addClass("table-condensed").append(K("").append(K("").append(e)))}());return c.inline&&e.removeClass("dropdown-menu"),s&&e.addClass("usetwentyfour"),_("s")&&!s&&e.addClass("wider"),c.sideBySide&&D()&&E()?(e.addClass("timepicker-sbs"),"top"===c.toolbarPlacement&&e.append(r),e.append(K("
").addClass("row").append(t.addClass("col-md-6")).append(n.addClass("col-md-6"))),"bottom"===c.toolbarPlacement&&e.append(r),e):("top"===c.toolbarPlacement&&i.append(r),D()&&i.append(K("
  • ").addClass(c.collapse&&E()?"collapse in":"").append(t)),"default"===c.toolbarPlacement&&i.append(r),E()&&i.append(K("
  • ").addClass(c.collapse&&D()?"collapse":"").append(n)),"bottom"===c.toolbarPlacement&&i.append(r),e.append(i))},A=function(){var e,t=(m||o).position(),n=(m||o).offset(),i=c.widgetPositioning.vertical,r=c.widgetPositioning.horizontal;if(c.widgetParent)e=c.widgetParent.append(g);else if(o.is("input"))e=o.after(g).parent();else{if(c.inline)return void(e=o.append(g));(e=o).children().first().after(g)}if("auto"===i&&(i=n.top+1.5*g.height()>=K(window).height()+K(window).scrollTop()&&g.height()+o.outerHeight()K(window).width()?"right":"left"),"top"===i?g.addClass("top").removeClass("bottom"):g.addClass("bottom").removeClass("top"),"right"===r?g.addClass("pull-right"):g.removeClass("pull-right"),"static"===e.css("position")&&(e=e.parents().filter(function(){return"static"!==K(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");g.css({top:"top"===i?"auto":t.top+o.outerHeight(),bottom:"top"===i?e.outerHeight()-(e===o?0:t.top):"auto",left:"left"===r?e===o?0:t.left:"auto",right:"left"===r?"auto":e.outerWidth()-o.outerWidth()-(e===o?0:t.left)})},$=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||o.trigger(e)},N=function(e){"y"===e&&(e="YYYY"),$({type:"dp.update",change:e,viewDate:d.clone()})},O=function(e){g&&(e&&(a=Math.max(v,Math.min(3,a+e))),g.find(".datepicker > div").hide().filter(".datepicker-"+t[a].clsName).show())},I=function(e,t){if(!e.isValid())return!1;if(c.disabledDates&&"d"===t&&function(e){return!0===c.disabledDates[e.format("YYYY-MM-DD")]}(e))return!1;if(c.enabledDates&&"d"===t&&!function(e){return!0===c.enabledDates[e.format("YYYY-MM-DD")]}(e))return!1;if(c.minDate&&e.isBefore(c.minDate,t))return!1;if(c.maxDate&&e.isAfter(c.maxDate,t))return!1;if(c.daysOfWeekDisabled&&"d"===t&&-1!==c.daysOfWeekDisabled.indexOf(e.day()))return!1;if(c.disabledHours&&("h"===t||"m"===t||"s"===t)&&function(e){return!0===c.disabledHours[e.format("H")]}(e))return!1;if(c.enabledHours&&("h"===t||"m"===t||"s"===t)&&!function(e){return!0===c.enabledHours[e.format("H")]}(e))return!1;if(c.disabledTimeIntervals&&("h"===t||"m"===t||"s"===t)){var n=!1;if(K.each(c.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return!(n=!0)}),n)return!1}return!0},P=function(){var e,t,n,i=g.find(".datepicker-days"),r=i.find("th"),o=[],s=[];if(D()){for(r.eq(0).find("span").attr("title",c.tooltips.prevMonth),r.eq(1).attr("title",c.tooltips.selectMonth),r.eq(2).find("span").attr("title",c.tooltips.nextMonth),i.find(".disabled").removeClass("disabled"),r.eq(1).text(d.format(c.dayViewHeaderFormat)),I(d.clone().subtract(1,"M"),"M")||r.eq(0).addClass("disabled"),I(d.clone().add(1,"M"),"M")||r.eq(2).addClass("disabled"),e=d.clone().startOf("M").startOf("w").startOf("d"),n=0;n<42;n++)0===e.weekday()&&(t=K("
  • "),c.calendarWeeks&&t.append('"),o.push(t)),s=["day"],e.isBefore(d,"M")&&s.push("old"),e.isAfter(d,"M")&&s.push("new"),e.isSame(u,"d")&&!p&&s.push("active"),I(e,"d")||s.push("disabled"),e.isSame(T(),"d")&&s.push("today"),0!==e.day()&&6!==e.day()||s.push("weekend"),$({type:"dp.classify",date:e,classNames:s}),t.append('"),e.add(1,"d");i.find("tbody").empty().append(o),function(){var e=g.find(".datepicker-months"),t=e.find("th"),n=e.find("tbody").find("span");t.eq(0).find("span").attr("title",c.tooltips.prevYear),t.eq(1).attr("title",c.tooltips.selectYear),t.eq(2).find("span").attr("title",c.tooltips.nextYear),e.find(".disabled").removeClass("disabled"),I(d.clone().subtract(1,"y"),"y")||t.eq(0).addClass("disabled"),t.eq(1).text(d.year()),I(d.clone().add(1,"y"),"y")||t.eq(2).addClass("disabled"),n.removeClass("active"),u.isSame(d,"y")&&!p&&n.eq(u.month()).addClass("active"),n.each(function(e){I(d.clone().month(e),"M")||K(this).addClass("disabled")})}(),function(){var e=g.find(".datepicker-years"),t=e.find("th"),n=d.clone().subtract(5,"y"),i=d.clone().add(6,"y"),r="";for(t.eq(0).find("span").attr("title",c.tooltips.prevDecade),t.eq(1).attr("title",c.tooltips.selectDecade),t.eq(2).find("span").attr("title",c.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),c.minDate&&c.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+i.year()),c.maxDate&&c.maxDate.isBefore(i,"y")&&t.eq(2).addClass("disabled");!n.isAfter(i,"y");)r+=''+n.year()+"",n.add(1,"y");e.find("td").html(r)}(),function(){var e,t=g.find(".datepicker-decades"),n=t.find("th"),i=J({y:d.year()-d.year()%100-1}),r=i.clone().add(100,"y"),o=i.clone(),s=!1,a=!1,l="";for(n.eq(0).find("span").attr("title",c.tooltips.prevCentury),n.eq(2).find("span").attr("title",c.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(i.isSame(J({y:1900}))||c.minDate&&c.minDate.isAfter(i,"y"))&&n.eq(0).addClass("disabled"),n.eq(1).text(i.year()+"-"+r.year()),(i.isSame(J({y:2e3}))||c.maxDate&&c.maxDate.isBefore(r,"y"))&&n.eq(2).addClass("disabled");!i.isAfter(r,"y");)e=i.year()+12,s=c.minDate&&c.minDate.isAfter(i,"y")&&c.minDate.year()<=e,a=c.maxDate&&c.maxDate.isAfter(i,"y")&&c.maxDate.year()<=e,l+=''+(i.year()+1)+" - "+(i.year()+12)+"",i.add(12,"y");l+="",t.find("td").html(l),n.eq(1).text(o.year()+1+"-"+i.year())}()}},e=function(){var e,t,n=g.find(".timepicker span[data-time-component]");s||(e=g.find(".timepicker [data-action=togglePeriod]"),t=u.clone().add(12<=u.hours()?-12:12,"h"),e.text(u.format("A")),I(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),n.filter("[data-time-component=hours]").text(u.format(s?"HH":"hh")),n.filter("[data-time-component=minutes]").text(u.format("mm")),n.filter("[data-time-component=seconds]").text(u.format("ss")),function(){var e=g.find(".timepicker-hours table"),t=d.clone().startOf("d"),n=[],i=K("");for(11"),n.push(i)),i.append('"),t.add(1,"h");e.empty().append(n)}(),function(){for(var e=g.find(".timepicker-minutes table"),t=d.clone().startOf("h"),n=[],i=K(""),r=1===c.stepping?5:c.stepping;d.isSame(t,"h");)t.minute()%(4*r)==0&&(i=K(""),n.push(i)),i.append('"),t.add(r,"m");e.empty().append(n)}(),function(){for(var e=g.find(".timepicker-seconds table"),t=d.clone().startOf("m"),n=[],i=K("");d.isSame(t,"m");)t.second()%20==0&&(i=K(""),n.push(i)),i.append('"),t.add(5,"s");e.empty().append(n)}()},F=function(){g&&(P(),e())},R=function(e){var t=p?null:u;if(!e)return p=!0,n.val(""),o.data("date",""),$({type:"dp.change",date:!1,oldDate:t}),void F();if(e=e.clone().locale(c.locale),S()&&e.tz(c.timeZone),1!==c.stepping)for(e.minutes(Math.round(e.minutes()/c.stepping)*c.stepping).seconds(0);c.minDate&&e.isBefore(c.minDate);)e.add(c.stepping,"minutes");I(e)?(d=(u=e).clone(),n.val(u.format(i)),o.data("date",u.format(i)),p=!1,F(),$({type:"dp.change",date:u.clone(),oldDate:t})):(c.keepInvalid?$({type:"dp.change",date:e,oldDate:t}):n.val(p?"":u.format(i)),$({type:"dp.error",date:e,oldDate:t}))},H=function(){var t=!1;return g&&(g.find(".collapse").each(function(){var e=K(this).data("collapse");return!e||!e.transitioning||!(t=!0)}),t||(m&&m.hasClass("btn")&&m.toggleClass("active"),g.hide(),K(window).off("resize",A),g.off("click","[data-action]"),g.off("mousedown",!1),g.remove(),g=!1,$({type:"dp.hide",date:u.clone()}),n.blur(),d=u.clone())),f},j=function(){R(null)},W=function(e){return void 0===c.parseInputDate?(!J.isMoment(e)||e instanceof Date)&&(e=T(e)):e=c.parseInputDate(e),e},z={next:function(){var e=t[a].navFnc;d.add(t[a].navStep,e),P(),N(e)},previous:function(){var e=t[a].navFnc;d.subtract(t[a].navStep,e),P(),N(e)},pickerSwitch:function(){O(1)},selectMonth:function(e){var t=K(e.target).closest("tbody").find("span").index(K(e.target));d.month(t),a===v?(R(u.clone().year(d.year()).month(d.month())),c.inline||H()):(O(-1),P()),N("M")},selectYear:function(e){var t=parseInt(K(e.target).text(),10)||0;d.year(t),a===v?(R(u.clone().year(d.year())),c.inline||H()):(O(-1),P()),N("YYYY")},selectDecade:function(e){var t=parseInt(K(e.target).data("selection"),10)||0;d.year(t),a===v?(R(u.clone().year(d.year())),c.inline||H()):(O(-1),P()),N("YYYY")},selectDay:function(e){var t=d.clone();K(e.target).is(".old")&&t.subtract(1,"M"),K(e.target).is(".new")&&t.add(1,"M"),R(t.date(parseInt(K(e.target).text(),10))),E()||c.keepOpen||c.inline||H()},incrementHours:function(){var e=u.clone().add(1,"h");I(e,"h")&&R(e)},incrementMinutes:function(){var e=u.clone().add(c.stepping,"m");I(e,"m")&&R(e)},incrementSeconds:function(){var e=u.clone().add(1,"s");I(e,"s")&&R(e)},decrementHours:function(){var e=u.clone().subtract(1,"h");I(e,"h")&&R(e)},decrementMinutes:function(){var e=u.clone().subtract(c.stepping,"m");I(e,"m")&&R(e)},decrementSeconds:function(){var e=u.clone().subtract(1,"s");I(e,"s")&&R(e)},togglePeriod:function(){R(u.clone().add(12<=u.hours()?-12:12,"h"))},togglePicker:function(e){var t,n=K(e.target),i=n.closest("ul"),r=i.find(".in"),o=i.find(".collapse:not(.in)");if(r&&r.length){if((t=r.data("collapse"))&&t.transitioning)return;r.collapse?(r.collapse("hide"),o.collapse("show")):(r.removeClass("in"),o.addClass("in")),n.is("span")?n.toggleClass(c.icons.time+" "+c.icons.date):n.find("span").toggleClass(c.icons.time+" "+c.icons.date)}},showPicker:function(){g.find(".timepicker > div:not(.timepicker-picker)").hide(),g.find(".timepicker .timepicker-picker").show()},showHours:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-hours").show()},showMinutes:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var t=parseInt(K(e.target).text(),10);s||(12<=u.hours()?12!==t&&(t+=12):12===t&&(t=0)),R(u.clone().hours(t)),z.showPicker.call(f)},selectMinute:function(e){R(u.clone().minutes(parseInt(K(e.target).text(),10))),z.showPicker.call(f)},selectSecond:function(e){R(u.clone().seconds(parseInt(K(e.target).text(),10))),z.showPicker.call(f)},clear:j,today:function(){var e=T();I(e,"d")&&R(e)},close:H},Y=function(e){return!K(e.currentTarget).is(".disabled")&&(z[K(e.currentTarget).data("action")].apply(f,arguments),!1)},B=function(){var e;return n.prop("disabled")||!c.ignoreReadonly&&n.prop("readonly")||g||(void 0!==n.val()&&0!==n.val().trim().length?R(W(n.val().trim())):p&&c.useCurrent&&(c.inline||n.is("input")&&0===n.val().trim().length)&&(e=T(),"string"==typeof c.useCurrent&&(e={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[c.useCurrent](e)),R(e)),g=M(),function(){var e=K(""),t=d.clone().startOf("w").startOf("d");for(!0===c.calendarWeeks&&e.append(K("\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(function(e){return e.replace(/&([#\w]+);/g,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='"+n+""},n.prototype.image=function(e,t,n){var i=''+n+'":">")},n.prototype.text=function(e){return e},c.parse=function(e,t,n){return new c(t,n).parse(e)},c.prototype.parse=function(e){this.inline=new i(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},c.prototype.next=function(){return this.token=this.tokens.pop()},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},c.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,n,i,r="",o="";for(n="",e=0;e=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;n ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:r,ch:0},{line:r,ch:99999999999999})}(e.codemirror)}function w(e){var t=e.codemirror,n=h(t),i=e.options,r="http://";return!(i.promptURLs&&!(r=prompt(i.promptTexts.link)))&&void P(t,n.link,i.insertTexts.link,r)}function x(e){var t=e.codemirror,n=h(t),i=e.options,r="http://";return!(i.promptURLs&&!(r=prompt(i.promptTexts.image)))&&void P(t,n.image,i.insertTexts.image,r)}function k(e){var t=e.codemirror,n=h(t),i=e.options;P(t,n.table,i.insertTexts.table)}function C(e){var t=e.codemirror,n=h(t),i=e.options;P(t,n.image,i.insertTexts.horizontalRule)}function S(e){var t=e.codemirror;t.undo(),t.focus()}function T(e){var t=e.codemirror;t.redo(),t.focus()}function _(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.nextSibling,r=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||u(e),i.className+=" editor-preview-active-side"},1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var s=n.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var a=e.toolbarElements.preview,l=n.previousSibling;a.className=a.className.replace(/\s*active\s*/g,""),l.className=l.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){i.innerHTML=e.options.previewRender(e.value(),i)}),o?(i.innerHTML=e.options.previewRender(e.value(),i),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function E(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.previousSibling,r=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var s=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(s.className)&&_(e)}function P(e,t,n,i){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var r,o=n[0],s=n[1],a=e.getCursor("start"),l=e.getCursor("end");i&&(s=s.replace("#url#",i)),t?(o=(r=e.getLine(a.line)).slice(0,a.ch),s=r.slice(a.ch),e.replaceRange(o+s,{line:a.line,ch:0})):(r=e.getSelection(),e.replaceSelection(o+r+s),a.ch+=o.length,a!==l&&(l.ch+=o.length)),e.setSelection(a,l),e.focus()}}function D(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var i=e.getCursor("start"),r=e.getCursor("end"),o=i.line;o<=r.line;o++)s=o,a=void 0,a=e.getLine(s),l=a.search(/[^#]/),a=void 0!==t?l<=0?"bigger"==t?"###### "+a:"# "+a:6==l&&"smaller"==t?a.substr(7):1==l&&"bigger"==t?a.substr(2):"bigger"==t?a.substr(1):"#"+a:1==n?l<=0?"# "+a:l==n?a.substr(l+1):"# "+a.substr(l+1):2==n?l<=0?"## "+a:l==n?a.substr(l+1):"## "+a.substr(l+1):l<=0?"### "+a:l==n?a.substr(l+1):"### "+a.substr(l+1),e.replaceRange(a,{line:s,ch:0},{line:s,ch:99999999999999});e.focus()}var s,a,l}function L(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=h(e),i=e.getCursor("start"),r=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},s={quote:"> ","unordered-list":"* ","ordered-list":"1. "},a=i.line;a<=r.line;a++)l=a,c=void 0,c=e.getLine(l),c=n[t]?c.replace(o[t],"$1"):s[t]+c,e.replaceRange(c,{line:l,ch:0},{line:l,ch:99999999999999});e.focus()}var l,c}function M(e,t,n,i){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){i=void 0===i?n:i;var r,o=e.codemirror,s=h(o),a=n,l=i,c=o.getCursor("start"),u=o.getCursor("end");s[t]?(a=(r=o.getLine(c.line)).slice(0,c.ch),l=r.slice(c.ch),"bold"==t?(a=a.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),l=l.replace(/(\*\*|__)/,"")):"italic"==t?(a=a.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),l=l.replace(/(\*|_)/,"")):"strikethrough"==t&&(a=a.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),l=l.replace(/(\*\*|~~)/,"")),o.replaceRange(a+l,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(c.ch-=2,c!==u&&(u.ch-=2)):"italic"==t&&(c.ch-=1,c!==u&&(u.ch-=1))):(r=o.getSelection(),"bold"==t?r=(r=r.split("**").join("")).split("__").join(""):"italic"==t?r=(r=r.split("*").join("")).split("_").join(""):"strikethrough"==t&&(r=r.split("~~").join("")),o.replaceSelection(a+r+l),c.ch+=n.length,u.ch=c.ch+r.length),o.setSelection(c,u),o.focus()}}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=A(e[n]||{},t[n]):e[n]=t[n]);return e}function $(e){for(var t=1;t':t=document.createElement("div")),"string"==typeof n&&(i=t.classList).add.apply(i,n.split(" ")),t;var i}(l,e,u.placeholderClass),c(l,"items",u.items),u.acceptFrom?c(l,"acceptFrom",u.acceptFrom):u.connectWith&&c(l,"connectWith",u.connectWith),O(l),a(t,"role","option"),a(t,"aria-grabbed","false"),M(l,!0),s(l,"dragstart",function(e){if(!0!==e.target.isSortable&&(e.stopImmediatePropagation(),(!u.handle||e.target.matches(u.handle))&&"false"!==e.target.getAttribute("draggable"))){var t=$(e.target),n=N(t,e.target);E=d(t.children,u.items),T=E.indexOf(n),_=m(n,t.children),S=t,function(e,t,n){if(!(e instanceof Event))throw new Error("setDragImage requires a DragEvent as the first argument.");if(!(t instanceof HTMLElement))throw new Error("setDragImage requires the dragged element as the second argument.");if(n||(n=w),e.dataTransfer&&e.dataTransfer.setDragImage){var i=n(t,p(t),e);if(!(i.element instanceof HTMLElement)||"number"!=typeof i.posX||"number"!=typeof i.posY)throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].");e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setData("text/plain","arbitrary"),e.dataTransfer.setDragImage(i.element,i.posX,i.posY)}}(e,n,u.customDragImage),C=b(n),n.classList.add(u.draggingClass),a(k=A(n,t),"aria-grabbed","true"),t.dispatchEvent(new CustomEvent("sortstart",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}}))}}),s(l,"dragenter",function(e){if(!0!==e.target.isSortable){var t=$(e.target);D=d(t.children,c(t,"items")).filter(function(e){return e!==f(l).placeholder})}}),s(l,"dragend",function(e){if(k){k.classList.remove(u.draggingClass),a(k,"aria-grabbed","false"),"true"===k.getAttribute("aria-copied")&&"true"!==c(k,"dropped")&&k.remove(),k.style.display=k.oldDisplay,delete k.oldDisplay;var t=Array.from(h.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(g)[0];t&&t.remove(),l.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}})),C=k=null}}),s(l,"drop",function(e){if(x(l,k.parentElement)){e.preventDefault(),e.stopPropagation(),c(k,"dropped","true");var t=Array.from(h.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(g)[0];y(t,k),t.remove(),l.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}}));var n=f(l).placeholder,i=d(S.children,u.items).filter(function(e){return e!==n}),r=!0===this.isSortable?this:this.parentElement,o=d(r.children,c(r,"items")).filter(function(e){return e!==n}),s=m(k,Array.from(k.parentElement.children).filter(function(e){return e!==n})),a=m(k,o);_===s&&S===r||l.dispatchEvent(new CustomEvent("sortupdate",{detail:{origin:{elementIndex:_,index:T,container:S,itemsBeforeUpdate:E,items:i},destination:{index:a,elementIndex:s,container:r,itemsBeforeUpdate:D,items:o},item:k}}))}});var r=function(n,i){var r;return void 0===i&&(i=0),function(){for(var e=[],t=0;t=parseInt(i.maxItems)&&k.parentElement!==n||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=!0===f(n).getConfig("copy")?"copy":"move",r(n,t,e.pageY))}};s(t.concat(l),"dragover",i),s(t.concat(l),"dragenter",i)}),e)}return P.destroy=function(e){i(e)},P.enable=function(e){O(e)},P.disable=function(e){!function(e){var t=c(e,"opts"),n=l(d(e.children,t.items),t.handle);a(e,"aria-dropeffect","none"),c(e,"_disabled","true"),a(n,"draggable","false"),o(n,"mousedown")}(e)},P}();"undefined"==typeof piranha&&(piranha={}),piranha.notifications=new function(){"use strict";var i=this;i.container=document.getElementById("notifications-container"),i.createSuccess=function(e,t){var n=i.create({class:"alert-success",icon:t||"fas fa-check",body:e});i.add(n)},i.createInfo=function(e,t){var n=i.create({class:"alert-info",icon:t||"fas fa-info-circle",body:e});i.add(n)},i.createWarning=function(e,t){var n=i.create({class:"alert-warning",icon:t||"fas fa-exclamation-triangle",body:e});i.add(n)},i.createDanger=function(e,t){var n=i.create({class:"alert-danger",icon:t||"fas fa-exclamation-triangle",body:e});i.add(n)},i.create=function(e){var t=document.createElement("div");if(t.className="alert notification-alert",t.classList.add(e.class||"alert-info"),e.icon){var n=document.createElement("p"),i=document.createElement("i");i.className=e.icon,n.appendChild(i);var r=document.createTextNode(e.body);n.appendChild(r),t.appendChild(n)}else t.innerHTML=e.body;if(e.buttons&&0Are you sure to delete?

    ",r=t.posturl||$(this).attr("href"),o=$('').appendTo("body");return o.modal("show"),o.on("hidden.bs.modal",function(){o.remove()}),!1}),$(document).on("submit","form",function(e){$(this).find(".editor-area").each(function(){$("#"+$(this).attr("data-id")).val($(this).html())})}),$(document).on("click",".table-filter button",function(e){e.preventDefault();var t=$(this).data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val()),$(this).parent().find("button").removeClass("btn-primary"),$(this).addClass("btn-primary")}),$(document).on("change",".table-filter select",function(e){e.preventDefault();var t=$(this).parent().find("button.btn-primary").data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val())}),$(document).on("keyup",".table-filter #blog-search",function(e){e.preventDefault();var t=$(this).parent().find("button.btn-primary").data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val())}),$(document).on("keyup",".table-filter #media-search",function(e){e.preventDefault();var t=$(this).parent().parent().data().table;manager.tools.tablesort(t,"","","",$(this).val())}),$(document).on("click","a.add-after, a.add-below",function(e){e.preventDefault();for(var t=$(this).data(),n=t.title||"Choose page type",i=t.posturl||$(this).attr("href"),r="",o=0;o'+manager.pageTypes[o].title+"";var s=$('').appendTo("body");return s.modal("show"),s.on("hidden.bs.modal",function(){s.remove()}),!1}),$(document).on("mouseenter","a.add-after",function(e){$(this).parent().parent().append('
    Your new page
    ')}),$(document).on("mouseleave","a.add-after",function(e){$("#add-page-placeholder").remove()}),$(document).on("mouseenter","a.add-below",function(e){var t=$(this).parent().parent(),n=t.children("ol");if(0Your new page'),i||($("#add-page-below-placeholder").addClass("hover-expanded"),t.addClass("expanded"))}else t.append('
      Your new page
    '),t.addClass("expanded")}),$(document).on("mouseleave","a.add-below",function(e){var t=$("#add-page-below-placeholder");t.hasClass("hover-expanded")&&t.parent().parent().removeClass("expanded"),t.remove()}),$(document).on("mouseenter",".sitemap-item .remove",function(e){$(this).parent().parent().addClass("hover-remove")}),$(document).on("mouseleave",".sitemap-item .remove",function(e){$(this).parent().parent().removeClass("hover-remove")});var manager={pageTypes:[],tools:{isempty:function(e){return""==$(e).text().replace(/\s/g,"")&&0==$(e).find("img").length},positionblocks:function(){for(var e=$(".block-add"),t=$(window).height()/2,n=0;n.block-info").remove(),$(e).insertAfter(t);$(e).find(".block-editor").each(function(){addInlineEditor("#"+this.id)});$(e).find(".markdown-editor").each(function(){RegisterMarkdown($("#"+$(this).attr("id")).get(0))}),o&&o(),manager.tools.setupBlockSortable()}})},recalcblocks:function(){for(var e=$(".page-blocks-body .sortable >.sortable-item"),n=0;n>>0;if(0==i)return!1;var r,o,s=0|t,a=Math.max(0<=s?s:i-Math.abs(s),0);for(;a+~]|"+P+")"+P+"*"),B=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),q=new RegExp(H),U=new RegExp("^"+F+"$"),G={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){k()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{$.apply(t=N.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){$={apply:t.length?function(e,t){A.apply(e,N.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function oe(e,t,n,i){var r,o,s,a,l,c,u,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&((t?t.ownerDocument||t:y)!==C&&k(t),t=t||C,S)){if(11!==h&&(l=Z.exec(e)))if(r=l[1]){if(9===h){if(!(s=t.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(d&&(s=d.getElementById(r))&&v(t,s)&&s.id===r)return n.push(s),n}else{if(l[2])return $.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&f.getElementsByClassName&&t.getElementsByClassName)return $.apply(n,t.getElementsByClassName(r)),n}if(f.qsa&&!E[e+" "]&&(!g||!g.test(e))){if(1!==h)d=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(te,ne):t.setAttribute("id",a=T),o=(c=p(e)).length;o--;)c[o]="#"+a+" "+ve(c[o]);u=c.join(","),d=K.test(e)&&me(t.parentNode)||t}if(u)try{return $.apply(n,d.querySelectorAll(u)),n}catch(e){}finally{a===T&&t.removeAttribute("id")}}}return m(e.replace(W,"$1"),t,n,i)}function se(){var i=[];return function e(t,n){return i.push(t+" ")>w.cacheLength&&delete e[i.shift()],e[t+" "]=n}}function ae(e){return e[T]=!0,e}function le(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&re(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(s){return ae(function(o){return o=+o,ae(function(e,t){for(var n,i=s([],e.length,o),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=oe.support={},r=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},k=oe.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:y;return i!==C&&9===i.nodeType&&i.documentElement&&(s=(C=i).documentElement,S=!r(C),y!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ie,!1):n.attachEvent&&n.attachEvent("onunload",ie)),f.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=le(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=Q.test(C.getElementsByClassName),f.getById=le(function(e){return s.appendChild(e).id=T,!C.getElementsByName||!C.getElementsByName(T).length}),f.getById?(w.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var n=e.replace(J,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=f.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[r++];)1===n.nodeType&&i.push(n);return i},w.find.CLASS=f.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},a=[],g=[],(f.qsa=Q.test(C.querySelectorAll))&&(le(function(e){s.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(f.matchesSelector=Q.test(u=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&le(function(e){f.disconnectedMatch=u.call(e,"*"),u.call(e,"[s!='']:x"),a.push("!=",H)}),g=g.length&&new RegExp(g.join("|")),a=a.length&&new RegExp(a.join("|")),t=Q.test(s.compareDocumentPosition),v=t||Q.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return c=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===y&&v(y,e)?-1:t===C||t.ownerDocument===y&&v(y,t)?1:l?O(l,e)-O(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===C?-1:t===C?1:r?-1:o?1:l?O(l,e)-O(l,t):0;if(r===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ue(s[i],a[i]):s[i]===y?-1:a[i]===y?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&k(e),t=t.replace(B,"='$1']"),f.matchesSelector&&S&&!E[t+" "]&&(!a||!a.test(t))&&(!g||!g.test(t)))try{var n=u.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=p(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=h[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&h(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,r){return function(e){var t=oe.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===r:"!="===i?t!==r:"^="===i?r&&0===t.indexOf(r):"*="===i?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function L(e,n,i){return T.isFunction(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==i}):n.nodeType?T.grep(e,function(e){return e===n!==i}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||M,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):T.isFunction(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:A.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),E.test(i[1])&&T.isPlainObject(t))for(i in t)T.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=S.getElementById(i[2]))&&(this[0]=r,this.length=1),this}).prototype=T.fn,M=T(S);var $=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,se=/^$|\/(?:java|ecma)script/i,ae={option:[1,""],thead:[1,"
    '+e.week()+"'+e.date()+"
    '+t.format(s?"HH":"hh")+"
    '+t.format("mm")+"
    '+t.format("ss")+"
    ").addClass("cw").text("#"));t.isBefore(d.clone().endOf("w"));)e.append(K("").addClass("dow").text(t.format("dd"))),t.add(1,"d");g.find(".datepicker-days thead").append(e)}(),function(){for(var e=[],t=d.clone().startOf("y").startOf("d");t.isSame(d,"y");)e.push(K("").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");g.find(".datepicker-months td").empty().append(e)}(),g.find(".timepicker-hours").hide(),g.find(".timepicker-minutes").hide(),g.find(".timepicker-seconds").hide(),F(),O(),K(window).on("resize",A),g.on("click","[data-action]",Y),g.on("mousedown",!1),m&&m.hasClass("btn")&&m.toggleClass("active"),A(),g.show(),c.focusOnShow&&!n.is(":focus")&&n.focus(),$({type:"dp.show"})),f},q=function(){return g?H():B()},U=function(e){var t,n,i,r,o=null,s=[],a={},l=e.which;for(t in C[l]="p",C)C.hasOwnProperty(t)&&"p"===C[t]&&(s.push(t),parseInt(t,10)!==l&&(a[t]=!0));for(t in c.keyBinds)if(c.keyBinds.hasOwnProperty(t)&&"function"==typeof c.keyBinds[t]&&((i=t.split(" ")).length===s.length&&k[l]===i[i.length-1])){for(r=!0,n=i.length-2;0<=n;n--)if(!(k[i[n]]in a)){r=!1;break}if(r){o=c.keyBinds[t];break}}o&&(o.call(f,g),e.stopPropagation(),e.preventDefault())},G=function(e){C[e.which]="r",e.stopPropagation(),e.preventDefault()},V=function(e){var t=K(e.target).val().trim(),n=t?W(t):null;return R(n),e.stopImmediatePropagation(),!1},X=function(e){var t={};return K.each(e,function(){var e=W(this);e.isValid()&&(t[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(t).length&&t},Q=function(e){var t={};return K.each(e,function(){t[this]=!0}),!!Object.keys(t).length&&t},Z=function(){var e=c.format||"L LT";i=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(u.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return u.localeData().longDateFormat(e)||e})}),(r=c.extraFormats?c.extraFormats.slice():[]).indexOf(e)<0&&r.indexOf(i)<0&&r.push(i),s=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,_("y")&&(v=2),_("M")&&(v=1),_("d")&&(v=0),a=Math.max(v,a),p||R(u)};if(f.destroy=function(){H(),n.off({change:V,blur:blur,keydown:U,keyup:G,focus:c.allowInputToggle?H:""}),o.is("input")?n.off({focus:B}):m&&(m.off("click",q),m.off("mousedown",!1)),o.removeData("DateTimePicker"),o.removeData("date")},f.toggle=q,f.show=B,f.hide=H,f.disable=function(){return H(),m&&m.hasClass("btn")&&m.addClass("disabled"),n.prop("disabled",!0),f},f.enable=function(){return m&&m.hasClass("btn")&&m.removeClass("disabled"),n.prop("disabled",!1),f},f.ignoreReadonly=function(e){if(0===arguments.length)return c.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return c.ignoreReadonly=e,f},f.options=function(e){if(0===arguments.length)return K.extend(!0,{},c);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return K.extend(!0,c,e),K.each(c,function(e,t){if(void 0===f[e])throw new TypeError("option "+e+" is not recognized!");f[e](t)}),f},f.date=function(e){if(0===arguments.length)return p?null:u.clone();if(!(null===e||"string"==typeof e||J.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return R(null===e?null:W(e)),f},f.format=function(e){if(0===arguments.length)return c.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return c.format=e,i&&Z(),f},f.timeZone=function(e){if(0===arguments.length)return c.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return c.timeZone=e,f},f.dayViewHeaderFormat=function(e){if(0===arguments.length)return c.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return c.dayViewHeaderFormat=e,f},f.extraFormats=function(e){if(0===arguments.length)return c.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return c.extraFormats=e,r&&Z(),f},f.disabledDates=function(e){if(0===arguments.length)return c.disabledDates?K.extend({},c.disabledDates):c.disabledDates;if(!e)return c.disabledDates=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return c.disabledDates=X(e),c.enabledDates=!1,F(),f},f.enabledDates=function(e){if(0===arguments.length)return c.enabledDates?K.extend({},c.enabledDates):c.enabledDates;if(!e)return c.enabledDates=!1,F(),f;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return c.enabledDates=X(e),c.disabledDates=!1,F(),f},f.daysOfWeekDisabled=function(e){if(0===arguments.length)return c.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return c.daysOfWeekDisabled=!1,F(),f;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(c.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"d");){if(u.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}R(u)}return F(),f},f.maxDate=function(e){if(0===arguments.length)return c.maxDate?c.maxDate.clone():c.maxDate;if("boolean"==typeof e&&!1===e)return c.maxDate=!1,F(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=W(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(c.minDate&&t.isBefore(c.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(i));return c.maxDate=t,c.useCurrent&&!c.keepInvalid&&u.isAfter(e)&&R(c.maxDate),d.isAfter(t)&&(d=t.clone().subtract(c.stepping,"m")),F(),f},f.minDate=function(e){if(0===arguments.length)return c.minDate?c.minDate.clone():c.minDate;if("boolean"==typeof e&&!1===e)return c.minDate=!1,F(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=W(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(c.maxDate&&t.isAfter(c.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(i));return c.minDate=t,c.useCurrent&&!c.keepInvalid&&u.isBefore(e)&&R(c.minDate),d.isBefore(t)&&(d=t.clone().add(c.stepping,"m")),F(),f},f.defaultDate=function(e){if(0===arguments.length)return c.defaultDate?c.defaultDate.clone():c.defaultDate;if(!e)return c.defaultDate=!1,f;"string"==typeof e&&(e="now"===e||"moment"===e?T():T(e));var t=W(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!I(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return c.defaultDate=t,(c.defaultDate&&c.inline||""===n.val().trim())&&R(c.defaultDate),f},f.locale=function(e){if(0===arguments.length)return c.locale;if(!J.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return c.locale=e,u.locale(c.locale),d.locale(c.locale),i&&Z(),g&&(H(),B()),f},f.stepping=function(e){return 0===arguments.length?c.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),c.stepping=e,f)},f.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return c.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return c.useCurrent=e,f},f.collapse=function(e){if(0===arguments.length)return c.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return c.collapse===e||(c.collapse=e,g&&(H(),B())),f},f.icons=function(e){if(0===arguments.length)return K.extend({},c.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return K.extend(c.icons,e),g&&(H(),B()),f},f.tooltips=function(e){if(0===arguments.length)return K.extend({},c.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return K.extend(c.tooltips,e),g&&(H(),B()),f},f.useStrict=function(e){if(0===arguments.length)return c.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return c.useStrict=e,f},f.sideBySide=function(e){if(0===arguments.length)return c.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return c.sideBySide=e,g&&(H(),B()),f},f.viewMode=function(e){if(0===arguments.length)return c.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===y.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+y.join(", ")+") value");return c.viewMode=e,a=Math.max(y.indexOf(e),v),O(),f},f.toolbarPlacement=function(e){if(0===arguments.length)return c.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===x.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+x.join(", ")+") value");return c.toolbarPlacement=e,g&&(H(),B()),f},f.widgetPositioning=function(e){if(0===arguments.length)return K.extend({},c.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),-1===w.indexOf(e.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+w.join(", ")+")");c.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),-1===b.indexOf(e.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+b.join(", ")+")");c.widgetPositioning.vertical=e.vertical}return F(),f},f.calendarWeeks=function(e){if(0===arguments.length)return c.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return c.calendarWeeks=e,F(),f},f.showTodayButton=function(e){if(0===arguments.length)return c.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return c.showTodayButton=e,g&&(H(),B()),f},f.showClear=function(e){if(0===arguments.length)return c.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return c.showClear=e,g&&(H(),B()),f},f.widgetParent=function(e){if(0===arguments.length)return c.widgetParent;if("string"==typeof e&&(e=K(e)),null!==e&&"string"!=typeof e&&!(e instanceof K))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return c.widgetParent=e,g&&(H(),B()),f},f.keepOpen=function(e){if(0===arguments.length)return c.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return c.keepOpen=e,f},f.focusOnShow=function(e){if(0===arguments.length)return c.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return c.focusOnShow=e,f},f.inline=function(e){if(0===arguments.length)return c.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return c.inline=e,f},f.clear=function(){return j(),f},f.keyBinds=function(e){return 0===arguments.length?c.keyBinds:(c.keyBinds=e,f)},f.getMoment=function(e){return T(e)},f.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return c.debug=e,f},f.allowInputToggle=function(e){if(0===arguments.length)return c.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return c.allowInputToggle=e,f},f.showClose=function(e){if(0===arguments.length)return c.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return c.showClose=e,f},f.keepInvalid=function(e){if(0===arguments.length)return c.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return c.keepInvalid=e,f},f.datepickerInput=function(e){if(0===arguments.length)return c.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return c.datepickerInput=e,f},f.parseInputDate=function(e){if(0===arguments.length)return c.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return c.parseInputDate=e,f},f.disabledTimeIntervals=function(e){if(0===arguments.length)return c.disabledTimeIntervals?K.extend({},c.disabledTimeIntervals):c.disabledTimeIntervals;if(!e)return c.disabledTimeIntervals=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return c.disabledTimeIntervals=e,F(),f},f.disabledHours=function(e){if(0===arguments.length)return c.disabledHours?K.extend({},c.disabledHours):c.disabledHours;if(!e)return c.disabledHours=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(c.disabledHours=Q(e),c.enabledHours=!1,c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"h");){if(u.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}R(u)}return F(),f},f.enabledHours=function(e){if(0===arguments.length)return c.enabledHours?K.extend({},c.enabledHours):c.enabledHours;if(!e)return c.enabledHours=!1,F(),f;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(c.enabledHours=Q(e),c.disabledHours=!1,c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"h");){if(u.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}R(u)}return F(),f},f.viewDate=function(e){if(0===arguments.length)return d.clone();if(!e)return d=u.clone(),f;if(!("string"==typeof e||J.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return d=W(e),N(),f},o.is("input"))n=o;else if(0===(n=o.find(c.datepickerInput)).length)n=o.find("input");else if(!n.is("input"))throw new Error('CSS class "'+c.datepickerInput+'" cannot be applied to non input element');if(o.hasClass("input-group")&&(m=0===o.find(".datepickerbutton").length?o.find(".input-group-addon"):o.find(".datepickerbutton")),!c.inline&&!n.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return u=T(),d=u.clone(),K.extend(!0,c,(h={},(l=o.is("input")||c.inline?o.data():o.find("input").data()).dateOptions&&l.dateOptions instanceof Object&&(h=K.extend(!0,h,l.dateOptions)),K.each(c,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==l[t]&&(h[e]=l[t])}),h)),f.options(c),Z(),n.on({change:V,blur:c.debug?"":H,keydown:U,keyup:G,focus:c.allowInputToggle?B:""}),o.is("input")?n.on({focus:B}):m&&(m.on("click",q),m.on("mousedown",!1)),n.prop("disabled")&&f.disable(),n.is("input")&&0!==n.val().trim().length?R(W(n.val().trim())):c.defaultDate&&void 0===n.attr("placeholder")&&R(c.defaultDate),c.inline&&B(),f};return K.fn.datetimepicker=function(n){n=n||{};var t,i=Array.prototype.slice.call(arguments,1),r=!0;if("object"==typeof n)return this.each(function(){var e,t=K(this);t.data("DateTimePicker")||(e=K.extend(!0,{},K.fn.datetimepicker.defaults,n),t.data("DateTimePicker",o(t,e)))});if("string"==typeof n)return this.each(function(){var e=K(this).data("DateTimePicker");if(!e)throw new Error('bootstrap-datetimepicker("'+n+'") method was called on an element that is not using DateTimePicker');t=e[n].apply(e,i),r=t===e}),r||-1Expand',collapseBtnHTML:'',group:0,maxDepth:5,threshold:20};function r(e,t){this.w=d(f),this.el=d(e),this.options=d.extend({},n,t),this.init()}r.prototype={init:function(){var r=this;r.reset(),r.el.data("nestable-group",this.options.group),r.placeEl=d('
    '),d.each(this.el.find(r.options.itemNodeName),function(e,t){r.setParent(d(t))}),r.el.on("click","button",function(e){if(!r.dragEl){var t=d(e.currentTarget),n=t.data("action"),i=t.parent(r.options.itemNodeName);"collapse"===n&&r.collapseItem(i),"expand"===n&&r.expandItem(i)}});var e=function(e){var t=d(e.target);if(!t.hasClass(r.options.handleClass)){if(t.closest("."+r.options.noDragClass).length)return;t=t.closest("."+r.options.handleClass)}t.length&&!r.dragEl&&(r.isTouch=/^touch/.test(e.type),r.isTouch&&1!==e.touches.length||(e.preventDefault(),r.dragStart(e.touches?e.touches[0]:e)))},t=function(e){r.dragEl&&(e.preventDefault(),r.dragMove(e.touches?e.touches[0]:e))},n=function(e){r.dragEl&&(e.preventDefault(),r.dragStop(e.touches?e.touches[0]:e))};i&&(r.el[0].addEventListener("touchstart",e,!1),h.addEventListener("touchmove",t,!1),h.addEventListener("touchend",n,!1),h.addEventListener("touchcancel",n,!1)),r.el.on("mousedown",e),r.w.on("mousemove",t),r.w.on("mouseup",n)},serialize:function(){var o=this;return step=function(e,i){var r=[];return e.children(o.options.itemNodeName).each(function(){var e=d(this),t=d.extend({},e.data()),n=e.children(o.options.listNodeName);n.length&&(t.children=step(n,i+1)),r.push(t)}),r},step(o.el.find(o.options.listNodeName).first(),0)},serialise:function(){return this.serialize()},reset:function(){this.mouse={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0},this.isTouch=!1,this.moving=!1,this.dragEl=null,this.dragRootEl=null,this.dragDepth=0,this.hasNewRoot=!1,this.pointEl=null},expandItem:function(e){e.removeClass(this.options.collapsedClass),e.children('[data-action="expand"]').hide(),e.children('[data-action="collapse"]').show(),e.children(this.options.listNodeName).show()},collapseItem:function(e){e.children(this.options.listNodeName).length&&(e.addClass(this.options.collapsedClass),e.children('[data-action="collapse"]').hide(),e.children('[data-action="expand"]').show(),e.children(this.options.listNodeName).hide())},expandAll:function(){var e=this;e.el.find(e.options.itemNodeName).each(function(){e.expandItem(d(this))})},collapseAll:function(){var e=this;e.el.find(e.options.itemNodeName).each(function(){e.collapseItem(d(this))})},setParent:function(e){e.children(this.options.listNodeName).length&&(e.prepend(d(this.options.expandBtnHTML)),e.prepend(d(this.options.collapseBtnHTML))),e.children('[data-action="expand"]').hide()},unsetParent:function(e){e.removeClass(this.options.collapsedClass),e.children("[data-action]").remove(),e.children(this.options.listNodeName).remove()},dragStart:function(e){var t=this.mouse,n=d(e.target),i=n.closest(this.options.itemNodeName);this.placeEl.css("height",i.height()),t.offsetX=void 0!==e.offsetX?e.offsetX:e.pageX-n.offset().left,t.offsetY=void 0!==e.offsetY?e.offsetY:e.pageY-n.offset().top,t.startX=t.lastX=e.pageX,t.startY=t.lastY=e.pageY,this.dragRootEl=this.el,this.dragEl=d(f.createElement(this.options.listNodeName)).addClass(this.options.listClass+" "+this.options.dragClass),this.dragEl.css("width",i.width()),i.after(this.placeEl),i[0].parentNode.removeChild(i[0]),i.appendTo(this.dragEl),d(f.body).append(this.dragEl),this.dragEl.css({left:e.pageX-t.offsetX,top:e.pageY-t.offsetY});var r,o,s=this.dragEl.find(this.options.itemNodeName);for(r=0;rthis.dragDepth&&(this.dragDepth=o)},dragStop:function(e){var t=this.dragEl.children(this.options.itemNodeName).first();t[0].parentNode.removeChild(t[0]),this.placeEl.replaceWith(t),this.dragEl.remove(),this.el.trigger("change"),this.hasNewRoot&&this.dragRootEl.trigger("change"),this.reset()},dragMove:function(e){var t,n,i,r=this.options,o=this.mouse;this.dragEl.css({left:e.pageX-o.offsetX,top:e.pageY-o.offsetY}),o.lastX=o.nowX,o.lastY=o.nowY,o.nowX=e.pageX,o.nowY=e.pageY,o.distX=o.nowX-o.lastX,o.distY=o.nowY-o.lastY,o.lastDirX=o.dirX,o.lastDirY=o.dirY,o.dirX=0===o.distX?0:0Math.abs(o.distY)?1:0;if(!o.moving)return o.dirAx=s,void(o.moving=!0);o.dirAx!==s?(o.distAxX=0,o.distAxY=0):(o.distAxX+=Math.abs(o.distX),0!==o.dirX&&o.dirX!==o.lastDirX&&(o.distAxX=0),o.distAxY+=Math.abs(o.distY),0!==o.dirY&&o.dirY!==o.lastDirY&&(o.distAxY=0)),o.dirAx=s,o.dirAx&&o.distAxX>=r.threshold&&(o.distAxX=0,i=this.placeEl.prev(r.itemNodeName),0").addClass(r.listClass)).append(this.placeEl),i.append(t),this.setParent(i)))),o.distX<0&&(this.placeEl.next(r.itemNodeName).length||(n=this.placeEl.parent(),this.placeEl.closest(r.itemNodeName).after(this.placeEl),n.children().length||this.unsetParent(n.parent()))));var a=!1;if(p||(this.dragEl[0].style.visibility="hidden"),this.pointEl=d(f.elementFromPoint(e.pageX-f.body.scrollLeft,e.pageY-(h.pageYOffset||f.documentElement.scrollTop))),p||(this.dragEl[0].style.visibility="visible"),this.pointEl.hasClass(r.handleClass)&&(this.pointEl=this.pointEl.parent(r.itemNodeName)),this.pointEl.hasClass(r.emptyClass))a=!0;else if(!this.pointEl.length||!this.pointEl.hasClass(r.itemClass))return;var l=this.pointEl.closest("."+r.rootClass),c=this.dragRootEl.data("nestable-id")!==l.data("nestable-id");if(!o.dirAx||c||a){if(c&&r.group!==l.data("nestable-group"))return;if(this.dragDepth-1+this.pointEl.parents(r.listNodeName).length>r.maxDepth)return;var u=e.pageY'),c&&(this.dragRootEl=l,this.hasNewRoot=this.el[0]!==this.dragRootEl[0])}}},d.fn.nestable=function(t){var n=this;return this.each(function(){var e=d(this).data("nestable");e?"string"==typeof t&&"function"==typeof e[t]&&(n=e[t]()):(d(this).data("nestable",new r(this,t)),d(this).data("nestable-id",(new Date).getTime()))}),n||this}}(window.jQuery||window.Zepto,window,document),function(){var e,n,i;n=window.jQuery,i=window,n.fn.autogrow=function(u){if(null==u&&(u={}),null==u.horizontal&&(u.horizontal=!0),null==u.vertical&&(u.vertical=!0),null==u.debugx&&(u.debugx=-1e4),null==u.debugy&&(u.debugy=-1e4),null==u.debugcolor&&(u.debugcolor="yellow"),null==u.flickering&&(u.flickering=!0),null==u.postGrowCallback&&(u.postGrowCallback=function(){}),null==u.verticalScrollbarWidth&&(u.verticalScrollbarWidth=e()),!1!==u.horizontal||!1!==u.vertical)return this.filter("textarea").each(function(){var r,o,e,s,a,l,t,c;if(!(r=n(this)).data("autogrow-enabled"))return r.data("autogrow-enabled"),a=r.height(),l=r.width(),s=1*r.css("lineHeight")||0,r.hasVerticalScrollBar=function(){return r[0].clientHeight
    ').css({position:"absolute",display:"inline-block","background-color":u.debugcolor,top:u.debugy,left:u.debugx,"max-width":r.css("max-width"),padding:r.css("padding"),fontSize:r.css("fontSize"),fontFamily:r.css("fontFamily"),fontWeight:r.css("fontWeight"),lineHeight:r.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),!1===u.horizontal?o.css({width:r.width()}):(e=r.css("font-size"),o.css("padding-right","+="+e),o.normalPaddingRight=o.css("padding-right")),c=this,t=function(e){var t,n,i;return n=c.value.replace(/&/g,"&").replace(//g,">").replace(/\n /g,"
     ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"
     ").replace(/\n/g,"
    ").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(c.value)&&(n+="
    ",!1===u.flickering&&(n+="
    ")),o.html(n),!0===u.vertical&&(t=Math.max(o.height()+s,a),r.height(t)),!0===u.horizontal&&(o.css("padding-right",o.normalPaddingRight),!1===u.vertical&&r.hasVerticalScrollBar()&&o.css("padding-right","+="+u.verticalScrollbarWidth+"px"),i=Math.max(o.outerWidth(),l),r.width(i)),u.postGrowCallback(r)},r.change(t).keyup(t).keydown(t),n(i).resize(t),t()})},e=function(){var e,t,n,i;return(e=document.createElement("p")).style.width="100%",e.style.height="200px",(t=document.createElement("div")).style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),n=e.offsetWidth,t.style.overflow="scroll",n===(i=e.offsetWidth)&&(i=t.clientWidth),document.body.removeChild(t),n-i}}.call(this),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var e=n.fn.select2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(f){var o,s,p,m,g={},v={},y={},b={},n=Object.prototype.hasOwnProperty,i=[].slice,w=/\.js$/;function x(e,t){return n.call(e,t)}function a(e,t){var n,i,r,o,s,a,l,c,u,d,h,f=t&&t.split("/"),p=y.map,m=p&&p["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&f&&(e=f.slice(0,f.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("select2/results",["jquery","./utils"],function(h,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=h('
      ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('
    • '),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});d.append(a),o.append(s),o.append(d)}else this.template(e,t);return h.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):rthis.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
        '),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('
      • ×
      • ')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×
        ');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;0=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):n.call(o,i,r)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()||i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('
      • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(p,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||p(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=p(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){p(this).data("select2-scroll-position",{x:p(this).scrollLeft(),y:p(this).scrollTop()})}),s.on(i,function(e){var t=p(this).data("select2-scroll-position");p(this).scrollTop(t.y)}),p(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),p(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=p(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ar.bottom+s,d={left:r.left,top:o.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();d.top-=f.top,d.left-=f.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-f.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},u}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(r,e,o,t){if(null==r.fn.select2){var s=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1'),this.element.appendChild(t)),(n=t.getElementsByTagName("span")[0])&&(null!=n.textContent?n.textContent=this.options.dictFallbackMessage:null!=n.innerText&&(n.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,i;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),i=t.optWidth/t.optHeight,e.height'+this.options.dictRemoveFile+""),t.previewElement.appendChild(t._removeLink)),f=this,e=function(e){return e.preventDefault(),e.stopPropagation(),t.status===H.UPLOADING?H.confirm(f.options.dictCancelUploadConfirmation,function(){return f.removeFile(t)}):f.options.dictRemoveFileConfirmation?H.confirm(f.options.dictRemoveFileConfirmation,function(){return f.removeFile(t)}):f.removeFile(t)},h=[],o=0,l=(d=t.previewElement.querySelectorAll("[data-dz-remove]")).length;o\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n Check\n \n \n \n \n \n
        \n
        \n \n Error\n \n \n \n \n \n \n \n
        \n'},F=function(){var e,t,n,i,r,o,s;for(i=arguments[0],o=0,s=(n=2<=arguments.length?a.call(arguments,1):[]).length;o'+this.options.dictDefaultMessage+"")),this.clickableElements.length&&(a=this,(r=function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||1',this.options.dictFallbackText&&(n+="

        "+this.options.dictFallbackText+"

        "),n+='',t=H.createElement(n),"FORM"!==this.element.tagName?(i=H.createElement('
        ')).appendChild(t):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:t)},H.prototype.getExistingFallback=function(){var e,t,n,i,r,o;for(t=function(e){var t,n,i;for(n=0,i=e.length;n"+n+" "+i},H.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},H.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&((n=e.dataTransfer.items)&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},H.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),(t=e.clipboardData.items).length?this._addFilesFromItems(t):void 0},H.prototype.handleFiles=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;n1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):H.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)},H.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=H.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(n=this,function(e){return e?(t.accepted=!1,n._errorProcessing([t],e)):(t.accepted=!0,n.options.autoQueue&&n.enqueueFile(t)),n._updateMaxFilesReachedClass()}));var n},H.prototype.enqueueFiles=function(e){var t,n,i;for(n=0,i=e.length;n>1;return 0==(a=s/o)?1:a},h=function(e,t,n,i,r,o,s,a,l,c){var u;return u=d(t),e.drawImage(t,n,i,r,o,s,a,l,c/u)},e=function(t,n){var e,i,r,o,s,a,l,c,u;if(u=!(r=!1),i=t.document,c=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(e){if("readystatechange"!==e.type||"complete"===i.readyState)return("load"===e.type?t:i)[l](a+e.type,o,!1),!r&&(r=!0)?n.call(t,e.type||e):void 0},s=function(){try{c.doScroll("left")}catch(e){return e,void setTimeout(s,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{u=!t.frameElement}catch(e){}u&&s()}return i[e](a+"DOMContentLoaded",o,!1),i[e](a+"readystatechange",o,!1),t[e](a+"load",o,!1)}},s._autoDiscoverFunction=function(){if(s.autoDiscover)return s.discover()},e(window,s._autoDiscoverFunction)}.call(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SimpleMDE=e()}}(function(){return function o(s,a,l){function c(n,e){if(!a[n]){if(!s[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[n]={exports:{}};s[n][0].call(r.exports,function(e){var t=s[n][1][e];return c(t||e)},r,r.exports,o,s,a,l)}return a[n].exports}for(var u="function"==typeof require&&require,e=0;e>18&63]+c[s>>12&63]+c[s>>6&63]+c[63&s]);var s;return r.join("")}n.toByteArray=function(e){var t,n,i,r,o,s,a=e.length;if(0>16&255,s[l++]=r>>8&255,s[l++]=255&r;return 2==o?(r=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[l++]=255&r):1==o&&(r=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[l++]=r>>8&255,s[l++]=255&r),s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,r="",o=[],s=0,a=n-i;s>2],r+=c[t<<4&63],r+="=="):2==i&&(t=(e[n-2]<<8)+e[n-1],r+=c[t>>10],r+=c[t>>4&63],r+=c[t<<2&63],r+="="),o.push(r),o.join("")};var c=[],u=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array;!function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function c(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(i)return E(e).length;t=(""+t).toLowerCase(),i=!0}}function u(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function h(e,t,n,i){function r(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s/=o=2,a/=2,n/=2}for(var l=-1,c=0;n+c>>10&1023|55296),u=56320|1023&u),i.push(u),r+=d}return function(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);for(var n="",i=0;ie.length)throw new RangeError("Index out of range")}function k(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function C(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function S(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,i,r){return r||S(e,0,n,4),A.write(e,t,n,i,23,4),n+4}function _(e,t,n,i,r){return r||S(e,0,n,8),A.write(e,t,n,i,52,8),n+8}function E(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function D(e){return M.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(t,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,n,i){for(var r=0;r=t.length||r>=e.length);r++)t[r+n]=e[r];return r}var M=O("base64-js"),A=O("ieee754"),$=O("isarray");I.Buffer=d,I.SlowBuffer=function(e){return+e!=e&&(e=0),d.alloc(+e)},I.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),I.kMaxLength=n(),d.poolSize=8192,d._augment=function(e){return e.__proto__=d.prototype,e},d.from=function(e,t,n){return i(null,e,t,n)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0})),d.alloc=function(e,t,n){return function(e,t,n,i){return o(t),t<=0?r(e,t):void 0!==n?"string"==typeof i?r(e,t).fill(n,i):r(e,t).fill(n):r(e,t)}(null,e,t,n)},d.allocUnsafe=function(e){return s(null,e)},d.allocUnsafeSlow=function(e){return s(null,e)},d.isBuffer=function(e){return!(null==e||!e._isBuffer)},d.compare=function(e,t){if(!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return y(this,t,n);case"utf8":case"utf-8":return f(this,t,n);case"ascii":return p(this,t,n);case"binary":return v(this,t,n);case"base64":return i=this,o=n,0===(r=t)&&o===i.length?M.fromByteArray(i):M.fromByteArray(i.slice(r,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}.apply(this,arguments)},d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){var e="",t=I.INSPECT_MAX_BYTES;return 0t&&(e+=" ... ")),""},d.prototype.compare=function(e,t,n,i,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(r<=i&&n<=t)return 0;if(r<=i)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(i,r),c=e.slice(t,n),u=0;u>=0,0===this.length)return-1;if(t>=this.length)return-1;if(t<0&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=d.from(e,n)),d.isBuffer(e))return 0===e.length?-1:h(this,e,t,n);if("number"==typeof e)return d.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):h(this,[e],t,n);throw new TypeError("val must be string, number or Buffer")},d.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},d.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r,o,s,a,l,c,u,d,h,f=this.length-t;if((void 0===n||fthis.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return d=t,h=n,L(E(e,(u=this).length-d),u,d,h);case"ascii":return g(this,e,t,n);case"binary":return g(this,e,t,n);case"base64":return a=this,l=t,c=n,L(D(e),a,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o=t,s=n,L(function(e,t){for(var n,i,r,o=[],s=0;s>8,r=n%256,o.push(r),o.push(i);return o}(e,(r=this).length-o),r,o,s);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;d.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):i>>8):k(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},d.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;0<=--o&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),0=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,m=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,g=/[*+-]\s/;f.commands.newlineAndIndentContinueMarkdownList=function(e){if(e.getOption("disableInput"))return f.Pass;for(var t=e.listSelections(),n=[],i=0;i")?c[2]:parseInt(c[3],10)+1+c[4];n[i]="\n"+u+h+d}}e.replaceSelections(n)}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],8:[function(e,t,n){(function(t){"use strict";t.overlayMode=function(n,i,r){return{startState:function(){return{base:t.startState(n),overlay:t.startState(i),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(e){return{base:t.copyState(n,e.base),overlay:t.copyState(i,e.overlay),basePos:e.basePos,baseCur:null,overlayPos:e.overlayPos,overlayCur:null}},token:function(e,t){return(e!=t.streamSeen||Math.min(t.basePos,t.overlayPos)=n.line,u=c?n:f(l,0),d=e.markText(a,u,{className:o});if(null==i?r.push(d):r.splice(i++,0,d),c)break;s=l}}function l(e){for(var t=e.state.markedSelection,n=0;nn.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}function m(e){var t=Ii(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1=s&&(o=li(t,ci(ii(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function b(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==xt(e))return!1;w(e)&&(yt(e),t.dims=A(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),$r&&(o=Mn(e.doc,o),s=An(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=mt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=mt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,bt(e,n)))),i.viewTo=n})(e,o,s),n.viewOffset=ci(ii(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=xt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi();return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);i=!1){L(e);var r=g(e);Te(e),s(e,r),D(e,r)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function E(e,t){var n=new S(e,t);if(T(e,n)){L(e),_(e,n);var i=g(e);Te(e),s(e,i),D(e,i),n.finish()}}function D(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pe(e)+"px"}function L(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;in?Nr(n,ii(e,n).text.length):function(e,t){var n=e.ch;return null==n||t=e.first&&t=t.ch:a.to>t.ch))){if(r&&(Lo(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c,u=l.find(i<0?1:-1);if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Se(e,u,-i,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=Or(u,n))&&(i<0?c<0:0e.first?le(e,Nr(t.line-1)):null:0=e.display.viewTo||a.to().linet||t==n&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(t,n,"ltr")}(ui(i),l||0,null==c?f:c,function(e,t,n){var i,r,o,s=u(e,"left");if(e==t)r=o=(i=s).left;else{if(i=u(t-1,"right"),"rtl"==n){var a=s;s=i,i=a}r=s.left,o=i.right}null==l&&0==e&&(r=m),3h.bottom||i.bottom==h.bottom&&i.right>h.right)&&(h=i),r=l.display.viewTo)){var u=+new Date+l.options.workTime,d=io(c.mode,$e(l,c.frontier)),h=[];c.iter(c.frontier,Math.min(c.first+c.size,l.display.viewTo+500),function(e){if(c.frontier>=l.display.viewFrom){var t=e.styles,n=e.text.length>l.options.maxHighlightLength,i=Wn(l,e,n?io(c.mode,d):d,!0);e.styles=i.styles;var r=e.styleClasses,o=i.classes;o?e.styleClasses=o:r&&(e.styleClasses=null);for(var s=!t||t.length!=e.styles.length||r!=o&&(!r||!o||r.bgClass!=o.bgClass||r.textClass!=o.textClass),a=0;!s&&au?(Me(l,l.options.workDelay),!0):void 0}),h.length&&ut(l,function(){for(var e=0;er.first&&ii(r,s-1).stateAfter;return a=a?io(r.mode,a):ro(r.mode),r.iter(s,i,function(e){Yn(n,e.text,a);var t=s==i-1||s%5==0||s>=o.viewFrom&&sn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function je(e,t,n,i){return Ye(e,ze(e,t),n,i)}function We(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(r=(o=c-l)-1,c<=t&&(s="right")),null!=r){if(i=e[a+2],l==c&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)i=e[2+(a-=3)],s="left";if("right"==n&&r==c-l)for(;an.from?l(e-1):l(e,i)}o=o||ii(i.doc,e.line),s||(s=ze(i,o));var c=ui(o),n=e.ch;if(!c)return l(n);var u=t(n,or(c,n));return null!=is&&(u.other=t(n,is)),u}function et(e,t){var n=0;t=le(e.doc,t);e.options.lineWrapping||(n=ot(e.display)*t.ch);var i=ii(e.doc,t.line),r=ci(i)+Ne(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function tt(e,t,n,i){var r=Nr(e,t);return r.xRel=i,n&&(r.outside=!0),r}function nt(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return tt(i.first,0,!0,-1);var r=li(i,n),o=i.first+i.size-1;if(oc.from.ch||a.ch==c.from.ch&&0t.bottom?t.left-l:s=o.viewTo)||o.maxLineChanged&&r.options.lineWrapping,i.update=i.mustUpdate&&new S(r,i.mustUpdate&&{top:i.scrollTop,ensure:i.scrollToPos},i.forceUpdate);var i,r,o;for(var n=0;n(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!kr){var o=Bi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ne(e.display))+"px; height: "+(t.bottom-t.top+Pe(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}(t,r)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;at)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)$r&&Mn(e.doc,t)r.viewFrom?yt(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)yt(e);else if(t<=r.viewFrom){(o=wt(e,n,n+i,1))?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yt(e)}else if(n>=r.viewTo){var o;(o=wt(e,t,t,-1))?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):yt(e)}else{var s=wt(e,t,t,-1),a=wt(e,n,n+i,1);s&&a?(r.view=r.view.slice(0,s.index).concat(mt(e,s.lineN,a.lineN)).concat(r.view.slice(a.index)),r.viewTo+=i):yt(e)}var l=r.externalMeasured;l&&(n=r.lineN&&t=i.viewTo)){var o=i.view[bt(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Ii(s,n)&&s.push(n)}}}function yt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function bt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;ir-400&&0==Or(Rr.pos,n)?i="triple":Fr&&Fr.time>r-400&&0==Or(Fr.pos,n)?(i="double",Rr={time:r,pos:n}):(i="single",Fr={time:r,pos:n});var o,s=e.doc.sel,a=Tr?t.metaKey:t.ctrlKey;e.options.dragDrop&&Zo&&!e.isReadOnly()&&"single"==i&&-1<(o=s.contains(n))&&(Or((o=s.ranges[o]).from(),n)<0||0u&&t.push(new re(Nr(a,u),Nr(a,Fo(c,s,n))))}t.length||t.push(new re(g,g)),ve(y,oe(x.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),m.scrollIntoView(e)}else{var d=b,h=d.anchor,f=e;if("single"!=v){if("double"==v)var p=m.findWordAt(e);else var p=new re(Nr(e.line,0),le(y,Nr(e.line+1,0)));h=0=i.to||n.linel.bottom?20:0;r&&setTimeout(dt(m,function(){c==t&&(s.scroller.scrollTop+=r,o(e))}),50)}}function n(e){m.state.selectingText=!1,c=1/0,Co(e),s.input.focus(),Do(document,"mousemove",u),Do(document,"mouseup",d),y.history.lastSelOrigin=null}var s=m.display,y=m.doc;Co(e);var b,w,x=y.sel,i=x.ranges;if(t&&!e.shiftKey?(w=y.sel.contains(g),b=-1=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Co(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Mi(e,n))return ki(t);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=li(e.doc,o),d=e.options.gutters[l];return Lo(e,n,e,u,d,t),ki(t)}}}function Et(e,t){return _t(e,t,"gutterClick",!0)}function Dt(e){var r=this;if(Lt(r),!Di(r,e)&&!Ct(r.display,e)){Co(e),pr&&(zr=+new Date);var o=St(r,e,!0),t=e.dataTransfer.files;if(o&&!r.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var s=t.length,a=Array(s),l=0,n=function(e,n){if(!r.options.allowDropFileTypes||-1!=Ii(r.options.allowDropFileTypes,e.type)){var i=new FileReader;i.onload=dt(r,function(){var e=i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),a[n]=e,++l==s){var t={from:o=le(r.doc,o),to:o,text:r.doc.splitLines(a.join(r.doc.lineSeparator())),origin:"paste"};Ut(r.doc,t),ge(r.doc,se(o,Vr(t)))}}),i.readAsText(e)}},i=0;is.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Tr&&gr)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var d=0;de.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Nr(o,ii(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ri(e,t.from,t.to),n||(n=Yt(e,t)),e.cm?function(e,t,n){var i=e.doc,r=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=ai(Ln(ii(i,o.line))),i.iter(l,s.line+1,function(e){return e==r.maxLine?a=!0:void 0})),-1r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),Me(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?gt(e):o.line!=s.line||1!=t.text.length||Zn(e.doc,t)?gt(e,o.line,s.line+1,c):vt(e,o.line,"text");var u=Mi(e,"changes"),d=Mi(e,"change");if(d||u){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&_i(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,i):Kn(e,t,i),ye(e,n,No)}}function Zt(e,t,n,i,r){if(i||(i=n),Or(i,n)<0){var o=i;i=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Ut(e,{from:n,to:i,text:t,origin:r})}function Kt(e,t,n,i,r){var o=e.display,s=rt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Re(e),c={};lo.first?Po(ii(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)h+=s,d+="\t";if(h=n.first+n.size)&&(c=ii(n,s=e))}())return!1;a=r?(i<0?nr:tr)(c):i<0?c.text.length:0}else a=t;return!0}var s=e.line,a=e.ch,l=i,c=ii(n,s);if("char"==t)o();else if("column"==t)o(!0);else if("word"==t||"group"==t)for(var u=null,d="group"==t,h=n.cm&&n.cm.getHelper(e,"wordChars"),f=!0;!(i<0)||o(!f);f=!1){var p=c.text.charAt(a)||"\n",m=Wi(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||m||(m="s"),u&&u!=m){i<0&&(i=1,o());break}if(m&&(u=m),0=o.height){l.hitSide=!0;break}r+=5*n}return l}function ln(e,t,i,n){l.defaults[e]=t,i&&(Qr[e]=n?function(e,t,n){n!=Zr&&i(e,t,n)}:i)}function cn(e){for(var t,n,i,r,o=e.split(/-(?!$)/),s=(e=o[o.length-1],0);s=t:o.to>t);(i||(i=[])).push(new pn(s,o.from,a?null:o.to))}}return i}(n,r,s),l=function(e,t,n){if(e)for(var i,r=0;r=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.frome.lastLine())return t;var n,i=ii(e,t);if(!$n(e,i))return t;for(;n=En(i);)i=n.find(1,!0).line;return ai(i)+1}function $n(e,t){var n=$r&&t.markedSpans;if(n)for(var i,r=0;rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Hn(e,t,n,i){function r(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?io(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=le(s,t);var l,c=ii(s,t.line),u=$e(e,t.line,n),d=new uo(c.text,e.options.tabSize);for(i&&(l=[]);(i||d.pose.options.maxHighlightLength?(a=!1,s&&Yn(e,t,i,d.pos),d.pos=t.length,null):Pn(Rn(n,d,i,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;ce.options.maxHighlightLength?io(e.doc.mode,i):i);t.stateAfter=i,t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Yn(e,t,n,i){var r=e.doc.mode,o=new uo(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&Fn(r,n);!o.eol();)Rn(r,o,n),o.start=o.pos}function Bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yo:vo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function qn(e,t){var n=Bi("span",null,null,gr?"padding-right: .1px":null),i={pre:Bi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(pr||gr)&&e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,s=r?t.rest[r-1]:t.line;i.pos=0,i.addToken=Un,Ki(e.display.measure)&&(o=ui(s))&&(i.addToken=Vn(i.addToken,o)),i.map=[],Qn(s,i,zn(e,s,t!=e.display.externalMeasured&&ai(s))),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=Xi(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=Xi(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Zi(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(gr){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Lo(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=Xi(i.pre.className,i.textClass||"")),i}function Un(e,t,n,i,r,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Gn):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),d=0;;){l.lastIndex=d;var h=l.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(a.slice(d,d+f));pr&&mr<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=1+f,"\t"==h[0]){var m=e.cm.options.tabSize,g=m-e.col%m;(p=u.appendChild(Bi("span",Ni(g),"cm-tab"))).setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=g}else if("\r"==h[0]||"\n"==h[0]){(p=u.appendChild(Bi("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1}else{(p=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),pr&&mr<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),pr&&mr<9&&(c=!0),e.pos+=t.length}if(n||i||r||c||s){var v=n||"";i&&(v+=i),r&&(v+=r);var y=Bi("span",[u],v,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Gn(e){for(var t=" ",n=0;na&&u.from<=a)break}if(u.to>=l)return d(e,t,n,i,r,o,s);d(e,t.slice(0,u.to-a),n,i,null,o,s),i=null,t=t.slice(u.to-a),a=u.to}}}function Xn(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t}function Qn(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,c,u,d,h,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=d=a="",h=null,v=1/0;for(var y,b=[],w=0;wp||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||Sn(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(w=0;w=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(ts-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(fi(e.done),Oi(e.done)):e.done.length&&!Oi(e.done).ranges?Oi(e.done):1r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||Lo(e,"historyAdded")}function mi(e,t){var n=Oi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function gi(t,n,e,i){var r=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,i),function(e){e.markedSpans&&((r||(r=n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function vi(e){if(!e)return null;for(var t,n=0;nt)return i;if(r.from==t||r.to==t){if(null!=n)return o=e,s=r.level,a=e[n].level,void 0,l=o[0].level,s==l||a!=l&&ss.from&&ae.text.length?null:r}var cr=navigator.userAgent,ur=navigator.platform,dr=/gecko\/\d/i.test(cr),hr=/MSIE \d/.test(cr),fr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cr),pr=hr||fr,mr=pr&&(hr?document.documentMode||6:fr[1]),gr=/WebKit\//.test(cr),vr=gr&&/Qt\/\d+\.\d+/.test(cr),yr=/Chrome\//.test(cr),br=/Opera\//.test(cr),wr=/Apple Computer/.test(navigator.vendor),xr=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(cr),kr=/PhantomJS/.test(cr),Cr=/AppleWebKit/.test(cr)&&/Mobile\/\w+/.test(cr),Sr=Cr||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(cr),Tr=Cr||/Mac/.test(ur),_r=/\bCrOS\b/.test(cr),Er=/win/i.test(ur),Dr=br&&cr.match(/Version\/(\d*\.\d*)/);Dr&&(Dr=Number(Dr[1])),Dr&&15<=Dr&&(gr=!(br=!1));var Lr=Tr&&(vr||br&&(null==Dr||Dr<12.11)),Mr=dr||pr&&9<=mr,Ar=!1,$r=!1;e.prototype=Hi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0n.viewTo-1)return!1;if(r.line==n.viewFrom||0==(e=bt(t,r.line)))var s=ai(n.view[0].line),a=n.view[0].node;else s=ai(n.view[e].line),a=n.view[e-1].node.nextSibling;var l=bt(t,o.line);if(l==n.view.length-1)var c=n.viewTo-1,u=n.lineDiv.lastChild;else c=ai(n.view[l+1].line)-1,u=n.view[l+1].node.previousSibling;for(var d=t.doc.splitLines(function(a,e,t,l,c){function u(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(null!=t)return""==t&&(t=e.textContent.replace(/\u200b/g,"")),void(d+=t);var n,i=e.getAttribute("cm-marker");if(i){var r=a.findMarks(Nr(l,0),Nr(c+1,0),function(t){return function(e){return e.id==t}}(+i));return void(r.length&&(n=r[0].find())&&(d+=ri(a.doc,n.from,n.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;for(var o=0;on&&(nn(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&en(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&function(e,t,n,i,r){var o=Kt(e,t,n,i,r);null!=o.scrollTop&&Mt(e,o.scrollTop),null!=o.scrollLeft&&At(e,o.scrollLeft)}(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:ht(Pt),triggerOnKeyPress:ht(Rt),triggerOnKeyUp:Ft,execCommand:function(e){return oo.hasOwnProperty(e)?oo[e].call(null,this):void 0},triggerElectric:ht(function(e){G(this,e)}),findPosH:function(e,t,n,i){var r=1;t<0&&(r=-1,t=-t);for(var o=0,s=le(this.doc,e);os.doc.first){var o=ii(s.doc,i.line-1).text;o&&s.replaceRange(r.charAt(0)+s.doc.lineSeparator()+o.charAt(o.length-1),Nr(i.line-1,o.length-1),Nr(i.line,1),"+transpose")}t.push(new re(i,i))}s.setSelections(t)})},newlineAndIndent:function(i){ut(i,function(){for(var e=i.listSelections().length,t=0;t=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return-1e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&>(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&we(e.doc)),e&&_i(e,"markerCleared",e,this),t&&at(e),this.parent&&this.parent.clear()}},fo.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;r=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(r,o,s){r=le(this,r),o=le(this,o);var a=[],l=r.line;return this.iter(r.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n=i.to||null==i.from&&l!=r.line||null!=i.from&&l==o.line&&i.from>=o.ch||s&&!s(i.marker)||a.push(i.marker.parent||i.marker)}++l}),a},getAllMarks:function(){var i=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;nt&&(t=e.from),null!=e.to&&e.to]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;s.defineMode("gfm",function(e,r){var o=0,t={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,t){if(t.combineTokens=null,t.codeBlock)return e.match(/^```+/)?t.codeBlock=!1:e.skipToEnd(),null;if(e.sol()&&(t.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),t.codeBlock=!0,null;if("`"===e.peek()){e.next();var n=e.pos;e.eatWhile("`");var i=1+e.pos-n;return t.code?i===o&&(t.code=!1):(o=i,t.code=!0),null}if(t.code)return e.next(),null;if(e.eatSpace())return t.ateSpace=!0,null;if((e.sol()||t.ateSpace)&&(t.ateSpace=!1)!==r.gitHubSpice){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return t.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return t.combineTokens=!0,"link"}return e.match(a)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(t.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},n={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var i in r)n[i]=r[i];return n.name="markdown",s.overlayMode(s.getMode(e,n),t)},"markdown"),s.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror"),e("../markdown/markdown"),e("../../addon/mode/overlay")):i(CodeMirror)},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(e,t,n){var i;i=function(A){"use strict";A.defineMode("markdown",function(a,v){function l(e,t,n){return t.f=t.inline=n,n(e,t)}function c(e){return!e||!/\S/.test(e.string)}function r(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,f&&e.f==y&&(e.f=s,e.block=o),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null}function o(e,t){var n=e.sol(),i=!1!==t.list,r=t.indentedCode;t.indentedCode=!1,i&&(0<=t.indentationDiff?(t.indentationDiff<4&&(t.indentation-=t.indentationDiff),t.list=null):0"))return t.quote=n?1:t.quote+1,v.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),b(t);if("["===e.peek())return l(e,t,d);if(e.match(p,!0))return t.hr=!0,C.hr;if(!c(t.prevLine)&&!i||!e.match(m,!1)&&!e.match(g,!1))return v.fencedCodeBlocks&&(o=e.match(D,!0))?(t.fencedChars=o[1],t.localMode=function(e){if(A.findModeByName){var t=A.findModeByName(e);t&&(e=t.mime||t.mimes[0])}var n=A.getMode(a,e);return"null"==n.name?null:n}(o[2]),t.localMode&&(t.localState=A.startState(t.localMode)),t.f=t.block=u,v.highlightFormatting&&(t.formatting="code-block"),t.code=-1,b(t)):l(e,t,t.inline);var s=null;for(s=e.match(m,!0)?"ul":(e.match(g,!0),"ol"),t.indentation=e.column()+e.current().length,t.list=!0;t.listStack&&e.column()"))&&(t.f=s,t.block=o,t.htmlState=null)}return n}function u(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=n,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),C.code)}function n(e,t){e.match(t.fencedChars),t.block=o,t.f=s,t.fencedChars=null,v.highlightFormatting&&(t.formatting="code-block"),t.code=1;var n=b(t);return t.code=0,n}function b(e){var t=[];if(e.formatting){t.push(C.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n=e.quote?t.push(C.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(C.linkHref,"url"):(e.strong&&t.push(C.strong),e.em&&t.push(C.em),e.strikethrough&&t.push(C.strikethrough),e.linkText&&t.push(C.linkText),e.code&&t.push(C.code)),e.header&&t.push(C.header,C.header+"-"+e.header),e.quote&&(t.push(C.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=e.quote?t.push(C.quote+"-"+e.quote):t.push(C.quote+"-"+v.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1==i?t.push(C.list2):t.push(C.list3):t.push(C.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function e(e,t){return e.match(E,!0)?b(t):void 0}function s(e,t){var n=t.text(e,t);if(void 0!==n)return n;if(t.list)return t.list=null,b(t);if(t.taskList)return"x"!==e.match(S,!0)[1]?t.taskOpen=!0:t.taskClosed=!0,v.highlightFormatting&&(t.formatting="task"),t.taskList=!1,b(t);if(t.taskOpen=!1,t.taskClosed=!1,t.header&&e.match(/^#+$/,!0))return v.highlightFormatting&&(t.formatting="header"),b(t);var i=e.sol(),r=e.next();if(t.linkTitle){t.linkTitle=!1;var o=r;"("===r&&(o=")");var s="^\\s*(?:[^"+(o=(o+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+o;if(e.match(new RegExp(s),!0))return C.linkHref}if("`"===r){var a=t.formatting;v.highlightFormatting&&(t.formatting="code"),e.eatWhile("`");var l=e.current().length;if(0==t.code)return t.code=l,b(t);if(l!=t.code)return t.formatting=a,b(t);var c=b(t);return t.code=0,c}if(t.code)return b(t);if("\\"===r&&(e.next(),v.highlightFormatting)){var u=b(t),d=C.formatting+"-escape";return u?u+" "+d:d}if("!"===r&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),t.inline=t.f=x,C.image;if("["===r&&e.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return t.linkText=!0,v.highlightFormatting&&(t.formatting="link"),b(t);if("]"===r&&t.linkText&&e.match(/\(.*?\)| ?\[.*?\]/,!1)){v.highlightFormatting&&(t.formatting="link");var u=b(t);return t.linkText=!1,t.inline=t.f=x,u}if("<"===r&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=w,v.highlightFormatting&&(t.formatting="link"),(u=b(t))?u+=" ":u="",u+C.linkInline;if("<"===r&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=w,v.highlightFormatting&&(t.formatting="link"),(u=b(t))?u+=" ":u="",u+C.linkEmail;if("<"===r&&e.match(/^(!--|\w)/,!1)){var h=e.string.indexOf(">",e.pos);if(-1!=h){var f=e.string.substring(e.start,h);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(f)&&(t.md_inside=!0)}return e.backUp(1),t.htmlState=A.startState(k),function(e,t,n){return t.f=t.block=n,n(e,t)}(e,t,y)}if("<"===r&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";var p=!1;if(!v.underscoresBreakWords&&"_"===r&&"_"!==e.peek()&&e.match(/(\w)/,!1)){var m=e.pos-2;if(0<=m){var g=e.string.charAt(m);"_"!==g&&g.match(/(\w)/,!1)&&(p=!0)}}if("*"===r||"_"===r&&!p)if(i&&" "===e.peek());else{if(t.strong===r&&e.eat(r)){v.highlightFormatting&&(t.formatting="strong");c=b(t);return t.strong=!1,c}if(!t.strong&&e.eat(r))return t.strong=r,v.highlightFormatting&&(t.formatting="strong"),b(t);if(t.em===r){v.highlightFormatting&&(t.formatting="em");c=b(t);return t.em=!1,c}if(!t.em)return t.em=r,v.highlightFormatting&&(t.formatting="em"),b(t)}else if(" "===r&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return b(t);e.backUp(1)}if(v.strikethrough)if("~"===r&&e.eatWhile(r)){if(t.strikethrough){v.highlightFormatting&&(t.formatting="strikethrough");c=b(t);return t.strikethrough=!1,c}if(e.match(/^[^\s]/,!1))return t.strikethrough=!0,v.highlightFormatting&&(t.formatting="strikethrough"),b(t)}else if(" "===r&&e.match(/^~~/,!0)){if(" "===e.peek())return b(t);e.backUp(2)}return" "===r&&(e.match(/ +$/,!1)?t.trailingSpace++:t.trailingSpace&&(t.trailingSpaceNewLine=!0)),b(t)}function w(e,t){if(">"!==e.next())return e.match(/^[^>]+/,!0),C.linkInline;t.f=t.inline=s,v.highlightFormatting&&(t.formatting="link");var n=b(t);return n?n+=" ":n="",n+C.linkInline}function x(e,t){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(t.f=t.inline=function(r){return function(e,t){var n=e.next();if(n!==r)return e.match(L[r]),t.linkHref=!0,b(t);t.f=t.inline=s,v.highlightFormatting&&(t.formatting="link-string");var i=b(t);return t.linkHref=!1,i}}("("===n?")":"]"),v.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,b(t)):"error"}function d(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=i,e.next(),v.highlightFormatting&&(t.formatting="link"),t.linkText=!0,b(t)):l(e,t,s)}function i(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=h,v.highlightFormatting&&(t.formatting="link");var n=b(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function h(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=s,C.linkHref+" url")}var k=A.getMode(a,"text/html"),f="null"==k.name;void 0===v.highlightFormatting&&(v.highlightFormatting=!1),void 0===v.maxBlockquoteDepth&&(v.maxBlockquoteDepth=0),void 0===v.underscoresBreakWords&&(v.underscoresBreakWords=!0),void 0===v.taskLists&&(v.taskLists=!1),void 0===v.strikethrough&&(v.strikethrough=!1),void 0===v.tokenTypeOverrides&&(v.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var t in C)C.hasOwnProperty(t)&&v.tokenTypeOverrides[t]&&(C[t]=v.tokenTypeOverrides[t]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,m=/^[*\-+]\s+/,g=/^[0-9]+([.)])\s+/,S=/^\[(x| )\](?=\s)/,T=v.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,_=/^ *(?:\={1,}|-{1,})\s*$/,E=/^[^#!\[\]*_\\<>` "'(~]+/,D=new RegExp("^("+(!0===v.fencedCodeBlocks?"~~~+|```+":v.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},M={startState:function(){return{f:o,prevLine:null,thisLine:null,block:o,htmlState:null,indentation:0,inline:s,text:e,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&A.copyState(k,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?A.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,header:e.header,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedChars:e.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(r(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var i=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(i-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,0")):null:t.match("--")?e(r("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function i(r){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=i(r+1),t.tokenize(e,t);if(">"==n){if(1!=r)return t.tokenize=i(r-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=r("meta","?>"),"meta"):(y=t.eat("/")?"closeTag":"openTag",n.tokenize=a,"tag bracket"):"&"!=i?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=s,y=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return y="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=function(n){var e=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=a;break}return"string"};return e.isInAttribute=!0,e}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=s,t.state=u,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}function r(n,i){return function(e,t){for(;!e.eol();){if(e.match(i)){t.tokenize=s;break}e.next()}return n}}function o(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function l(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!x.contextGrabbers.hasOwnProperty(n)||!x.contextGrabbers[n].hasOwnProperty(t))return;l(e)}}function u(e,t,n){return"openTag"==e?(n.tagStart=t.column(),i):"closeTag"==e?d:u}function i(e,t,n){return"word"==e?(n.tagName=t.current(),b="tag",p):(b="error",i)}function d(e,t,n){if("word"!=e)return b="error",f;var i=t.current();return n.context&&n.context.tagName!=i&&x.implicitlyClosed.hasOwnProperty(n.context.tagName)&&l(n),n.context&&n.context.tagName==i||!1===x.matchClosing?(b="tag",h):(b="tag error",f)}function h(e,t,n){return"endTag"!=e?(b="error",h):(l(n),u)}function f(e,t,n){return b="error",h(e,0,n)}function p(e,t,n){if("word"==e)return b="attribute",m;if("endTag"!=e&&"selfcloseTag"!=e)return b="error",p;var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(i)?c(n,i):(c(n,i),n.context=new o(n,i,r==n.indented)),u}function m(e,t,n){return"equals"==e?g:(x.allowMissing||(b="error"),p(e,0,n))}function g(e,t,n){return"string"==e?v:"word"==e&&x.allowUnquoted?(b="string",p):(b="error",p(e,0,n))}function v(e,t,n){return"string"==e?v:p(e,0,n)}var y,b,w=e.indentUnit,x={},n=t.htmlMode?S:T;for(var k in n)x[k]=n[k];for(var k in t)x[k]=t[k];return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:u,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;y=null;var n=t.tokenize(e,t);return(n||y)&&"comment"!=n&&(b=null,t.state=t.state(y||n,e,t),b&&(n="error"==b?n+" error":b)),n},indent:function(e,t,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+w;if(i&&i.noIndent)return C.Pass;if(e.tokenize!=a&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==x.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==g&&(e.state=p)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,u=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;0>=-u,u+=i;0>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(t+=1<=s+d?h/l:h*Math.pow(2,1-d))*l&&(s++,l/=2),u<=s+d?(a=0,s=u):1<=s+d?(a=(t*l-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));8<=r;e[n+f]=255&a,f+=p,a/=256,r-=8);for(s=s</g,">").replace(/"/g,""").replace(/'/g,"'")}function e(i,r){return i=i.source,r=r||"",function e(t,n){return t?(n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),i=i.replace(t,n),e):new RegExp(i,r)}}function t(){}function d(e){for(var t,n,i=1;iAn error occured:

        "+u(e.message+"",!0)+"
        ";throw e}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:t,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:t,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:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:t,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};f.item=e(f.item,"gm")(/bull/g,f.bullet)(),f.list=e(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=e(f.blockquote)("def",f.def)(),f._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",f.html=e(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=e(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=d({},f),f.gfm=d({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=e(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=d({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),l.rules=f,l.lex=function(e,t){return new l(t).lex(e)},l.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)},l.prototype.token=function(e,t,n){var i,r,o,s,a,l,c,u,d;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),1 ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:1])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:t,tag:/^|^<\/?\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:t,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/};r.link=e(r.link)("inside",r._inside)("href",r._href)(),r.reflink=e(r.reflink)("inside",r._inside)(),r.normal=d({},r),r.pedantic=d({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),r.gfm=d({},r.normal,{escape:e(r.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:e(r.text)("]|","~]|")("|","|https?://|")()}),r.breaks=d({},r.gfm,{br:e(r.br)("{2,}","*")(),text:e(r.gfm.text)("{2,}","*")()}),i.rules=r,i.output=function(e,t,n){return new i(t,n).output(e)},i.prototype.output=function(e){for(var t,n,i,r,o="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),i="@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),this.mangle("mailto:")+n):n=u(r[1]),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):u(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),o+=this.renderer.codespan(u(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),o+=this.renderer.text(u(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),i=n=u(r[1]),o+=this.renderer.link(i,null,n);return o},i.prototype.outputLink=function(e,t){var n=u(t.href),i=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,u(e[1]))},i.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},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r'+(n?e:u(e,!0))+"\n\n":"
        "+(n?e:u(e,!0))+"\n
        "},n.prototype.blockquote=function(e){return"
        \n"+e+"
        \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
        \n":"
        \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
      • "+e+"
      • \n"},n.prototype.paragraph=function(e){return"

        "+e+"

        \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
        \n"},n.prototype.tablerow=function(e){return"
        ","
        "],col:[2,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],_default:[0,"",""]};function le(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T.nodeName(e,t)?T.merge([e],n):n}function ce(e,t){for(var n=0,i=e.length;nx",g.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue;var pe=S.documentElement,me=/^key/,ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ve=/^([^.]*)(?:\.(.+)|)/;function ye(){return!0}function be(){return!1}function we(){try{return S.activeElement}catch(e){}}function xe(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)xe(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=be;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return T().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),e.each(function(){T.event.add(this,t,r,i,n)})}T.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=q.get(t);if(g)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&T.find.matchesSelector(pe,r),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(I)||[""]).length;c--;)f=m=(a=ve.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=T.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=T.event.special[f]||{},u=T.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&T.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),T.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,f,p,m,g=q.hasData(e)&&q.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(I)||[""]).length;c--;)if(f=m=(a=ve.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=T.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||T.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)T.event.remove(e,f+t[c],n,i,!0);T.isEmptyObject(l)&&q.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=T.event.fix(e),l=new Array(arguments.length),c=(q.get(this,"events")||{})[a.type]||[],u=T.event.special[a.type]||{};for(l[0]=a,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/\s*$/g;function Ee(e,t){return T.nodeName(e,"table")&&T.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){var t=Te.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Me(e,t){var n,i,r,o,s,a,l,c;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),c=o.events))for(r in delete s.handle,s.events={},c)for(n=0,i=c[r].length;n")},clone:function(e,t,n){var i,r,o,s,a,l,c,u=e.cloneNode(!0),d=T.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(s=le(u),i=0,r=(o=le(e)).length;i").prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(e){i.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(i[0])},abort:function(){r&&r()}}});var Pt,Ft=[],Rt=/(=)\?(?=&|$)|\?\?/;function Ht(e){return T.isWindow(e)?e:9===e.nodeType&&e.defaultView}T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ft.pop()||T.expando+"_"+pt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,o,s=!1!==e.jsonp&&(Rt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=T.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Rt,"$1"+i):!1!==e.jsonp&&(e.url+=(mt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||T.error(i+" was not called"),o[0]},e.dataTypes[0]="json",r=C[i],C[i]=function(){o=arguments},n.always(function(){void 0===r?T(C).removeProp(i):C[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,Ft.push(i)),o&&T.isFunction(r)&&r(o[0]),o=r=void 0}),"script"}),g.createHTMLDocument=((Pt=S.implementation.createHTMLDocument("").body).innerHTML="
        ",2===Pt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((i=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(i)):t=S),o=!n&&[],(r=E.exec(e))?[t.createElement(r[1])]:(r=fe([e],t,o),o&&o.length&&T(o).remove(),T.merge([],r.childNodes)));var i,r,o},T.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return-1").append(T.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var i,r,o,s,a,l,c=T.css(e,"position"),u=T(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=T.css(e,"top"),l=T.css(e,"left"),r=("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(s=(i=u.position()).top,i.left):(s=parseFloat(o)||0,parseFloat(l)||0),T.isFunction(t)&&(t=t.call(e,n,T.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):u.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,i,r,o=this[0];return o?o.getClientRects().length?(i=o.getBoundingClientRect()).width||i.height?(n=Ht(r=o.ownerDocument),e=r.documentElement,{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===T.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),T.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+T.css(e[0],"borderTopWidth",!0),left:i.left+T.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-T.css(n,"marginTop",!0),left:t.left-i.left-T.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||pe})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var o="pageYOffset"===r;T.fn[t]=function(e){return z(this,function(e,t,n){var i=Ht(e);if(void 0===n)return i?i[r]:e[t];i?i.scrollTo(o?i.pageXOffset:n,o?n:i.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=Fe(g.pixelPosition,function(e,t){if(t)return t=Pe(e,n),Oe.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(s,a){T.each({padding:"inner"+s,content:a,"":"outer"+s},function(i,o){T.fn[o]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return z(this,function(e,t,n){var i;return T.isWindow(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+s],i["scroll"+s],e.body["offset"+s],i["offset"+s],i["client"+s])):void 0===n?T.css(e,t,r):T.style(e,t,n,r)},a,n?e:void 0,n)}})}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),T.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var jt=C.jQuery,Wt=C.$;return T.noConflict=function(e){return C.$===T&&(C.$=Wt),e&&C.jQuery===T&&(C.jQuery=jt),T},e||(C.jQuery=C.$=T),T}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");if(function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(ndocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
        ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},g.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=m(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&m(m.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var o=i[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focusin",a="hover"==o?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(e){return(e=m.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},g.prototype.getDelegateOptions=function(){var n={},i=this.getDefaults();return this._options&&m.each(this._options,function(e,t){i[e]!=t&&(n[e]=t)}),n},g.prototype.enter=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in")||"in"==t.hoverState)t.hoverState="in";else{if(clearTimeout(t.timeout),t.hoverState="in",!t.options.delay||!t.options.delay.show)return t.show();t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)}},g.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},g.prototype.leave=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},g.prototype.show=function(){var e=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var t=m.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!t)return;var n=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,a=s.test(o);a&&(o=o.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=i[0].offsetWidth,u=i[0].offsetHeight;if(a){var d=o,h=this.getPosition(this.$viewport);o="bottom"==o&&l.bottom+u>h.bottom?"top":"top"==o&&l.top-uh.width?"left":"left"==o&&l.left-cs.top+s.height&&(r.top=s.top+s.height-l)}else{var c=t.left-o,u=t.left+o+n;cs.right&&(r.left=s.left+s.width-u)}return r},g.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},g.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},g.prototype.tip=function(){if(!this.$tip&&(this.$tip=m(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(e){var t=this;e&&((t=m(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},g.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var e=m.fn.tooltip;m.fn.tooltip=function(i){return this.each(function(){var e=m(this),t=e.data("bs.tooltip"),n="object"==typeof i&&i;!t&&/destroy|hide/.test(i)||(t||e.data("bs.tooltip",t=new g(this,n)),"string"==typeof i&&t[i]())})},m.fn.tooltip.Constructor=g,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=e,this}}(jQuery),function(r){"use strict";var o=function(e,t){this.init("popover",e,t)};if(!r.fn.tooltip)throw new Error("Popover requires tooltip.js");o.VERSION="3.3.7",o.DEFAULTS=r.extend({},r.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((o.prototype=r.extend({},r.fn.tooltip.Constructor.prototype)).constructor=o).prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var e=r.fn.popover;r.fn.popover=function(i){return this.each(function(){var e=r(this),t=e.data("bs.popover"),n="object"==typeof i&&i;!t&&/destroy|hide/.test(i)||(t||e.data("bs.popover",t=new o(this,n)),"string"==typeof i&&t[i]())})},r.fn.popover.Constructor=o,r.fn.popover.noConflict=function(){return r.fn.popover=e,this}}(jQuery),function(o){"use strict";function r(e,t){this.$body=o(document.body),this.$scrollElement=o(e).is(document.body)?o(window):o(e),this.options=o.extend({},r.DEFAULTS,t),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o.proxy(this.process,this)),this.refresh(),this.process()}function t(i){return this.each(function(){var e=o(this),t=e.data("bs.scrollspy"),n="object"==typeof i&&i;t||e.data("bs.scrollspy",t=new r(this,n)),"string"==typeof i&&t[i]()})}r.VERSION="3.3.7",r.DEFAULTS={offset:10},r.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},r.prototype.refresh=function(){var e=this,i="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),o.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=o(this),t=e.data("target")||e.attr("href"),n=/^#./.test(t)&&o(t);return n&&n.length&&n.is(":visible")&&[[n[i]().top+r,t]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},r.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),i<=t)return s!=(e=o[o.length-1])&&this.activate(e);if(s&&t=r[e]&&(void 0===r[e+1]||t .active"),r=n&&a.support.transition&&(i.length&&i.hasClass("fade")||!!t.find("> .fade").length);function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}i.length&&r?i.one("bsTransitionEnd",o).emulateTransitionEnd(s.TRANSITION_DURATION):o(),i.removeClass("in")};var e=a.fn.tab;a.fn.tab=t,a.fn.tab.Constructor=s,a.fn.tab.noConflict=function(){return a.fn.tab=e,this};var n=function(e){e.preventDefault(),t.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(l){"use strict";var c=function(e,t){this.options=l.extend({},c.DEFAULTS,t),this.$target=l(this.options.target).on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(i){return this.each(function(){var e=l(this),t=e.data("bs.affix"),n="object"==typeof i&&i;t||e.data("bs.affix",t=new c(this,n)),"string"==typeof i&&t[i]()})}c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(e,t,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return re){var n=parseInt(a("body").css(t),10)+a("body").width()-e;setTimeout(function(){a("body").css(t,n)},1)}},r.prototype.show=function(){if(!this.state){var e=a.Event("show.bs.offcanvas");if(this.$element.trigger(e),!e.isDefaultPrevented()){this.state="slide-in",this.calcPlacement();var t=this.getCanvasElements(),n=this.placement,i=this.opposite(n),r=this.offset();-1!==t.index(this.$element)&&(a(this.$element).data("offcanvas-style",a(this.$element).attr("style")||""),this.$element.css(n,-1*r),this.$element.css(n)),t.addClass("canvas-sliding").each(function(){void 0===a(this).data("offcanvas-style")&&a(this).data("offcanvas-style",a(this).attr("style")||""),"static"===a(this).css("position")&&a(this).css("position","relative"),"auto"!==a(this).css(n)&&"0px"!==a(this).css(n)||"auto"!==a(this).css(i)&&"0px"!==a(this).css(i)||a(this).css(n,0)}),this.options.disableScrolling&&this.disableScrolling();var o=function(){"slide-in"==this.state&&(this.state="slid",t.removeClass("canvas-sliding").addClass("canvas-slid"),this.$element.trigger("shown.bs.offcanvas"))};setTimeout(a.proxy(function(){this.$element.addClass("in"),this.slide(t,r,a.proxy(o,this))},this),1)}}},r.prototype.hide=function(e){if("slid"===this.state){var t=a.Event("hide.bs.offcanvas");if(this.$element.trigger(t),!t.isDefaultPrevented()){this.state="slide-out";var n=a(".canvas-slid"),i=(this.placement,-1*this.offset()),r=function(){"slide-out"==this.state&&(this.state=null,this.placement=null,this.$element.removeClass("in"),n.removeClass("canvas-sliding"),n.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")}),this.$element.trigger("hidden.bs.offcanvas"))};n.removeClass("canvas-slid").addClass("canvas-sliding"),setTimeout(a.proxy(function(){this.slide(n,i,a.proxy(r,this))},this),1)}}},r.prototype.toggle=function(){"slide-in"!==this.state&&"slide-out"!==this.state&&this["slid"===this.state?"hide":"show"]()},r.prototype.calcClone=function(){this.$calcClone=this.$element.clone().html("").addClass("offcanvas-clone").removeClass("in").appendTo(a("body"))},r.prototype.recalc=function(){if("none"!==this.$calcClone.css("display")&&("slid"===this.state||"slide-in"===this.state)){this.state=null,this.placement=null;var e=this.getCanvasElements();this.$element.removeClass("in"),e.removeClass("canvas-slid"),e.add(this.$element).add("body").each(function(){a(this).attr("style",a(this).data("offcanvas-style")).removeData("offcanvas-style")})}},r.prototype.autohide=function(e){0===a(e.target).closest(this.$element).length&&this.hide()};var e=a.fn.offcanvas;a.fn.offcanvas=function(i){return this.each(function(){var e=a(this),t=e.data("bs.offcanvas"),n=a.extend({},r.DEFAULTS,e.data(),"object"==typeof i&&i);t||e.data("bs.offcanvas",t=new r(this,n)),"string"==typeof i&&t[i]()})},a.fn.offcanvas.Constructor=r,a.fn.offcanvas.noConflict=function(){return a.fn.offcanvas=e,this},a(document).on("click.bs.offcanvas.data-api","[data-toggle=offcanvas]",function(e){var t,n=a(this),i=n.attr("data-target")||e.preventDefault()||(t=n.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,""),r=a(i),o=r.data("bs.offcanvas"),s=o?"toggle":n.data();e.stopPropagation(),o?o.toggle():r.offcanvas(s)})}(window.jQuery),function(i){"use strict";var r=function(e,t){this.$element=i(e),this.options=i.extend({},r.DEFAULTS,t),this.$element.on("click.bs.rowlink","td:not(.rowlink-skip)",i.proxy(this.click,this))};r.DEFAULTS={target:"a"},r.prototype.click=function(e){var t=i(e.currentTarget).closest("tr").find(this.options.target)[0];if(i(e.target)[0]!==t)if(e.preventDefault(),t.click)t.click();else if(document.createEvent){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}};var e=i.fn.rowlink;i.fn.rowlink=function(n){return this.each(function(){var e=i(this),t=e.data("bs.rowlink");t||e.data("bs.rowlink",t=new r(this,n))})},i.fn.rowlink.Constructor=r,i.fn.rowlink.noConflict=function(){return i.fn.rowlink=e,this},i(document).on("click.bs.rowlink.data-api",'[data-link="row"]',function(e){if(0===i(e.target).closest(".rowlink-skip").length){var t=i(this);t.data("bs.rowlink")||(t.rowlink(t.data()),i(e.target).trigger("click.bs.rowlink"))}})}(window.jQuery),function(i){"use strict";var o=void 0!==window.orientation,n=-1n.length)break}else this.buffer[r]==n.charAt(o)&&r!=this.partialPosition&&(o++,i=r);return!e&&i+1=this.partialPosition)&&(this.writeBuffer(),e||this.$element.val(this.$element.val().substring(0,i+1))),this.partialPosition?r:this.firstNonMaskPos};var e=i.fn.inputmask;i.fn.inputmask=function(n){return this.each(function(){var e=i(this),t=e.data("bs.inputmask");t||e.data("bs.inputmask",t=new r(this,n))})},i.fn.inputmask.Constructor=r,i.fn.inputmask.noConflict=function(){return i.fn.inputmask=e,this},i(document).on("focus.bs.inputmask.data-api","[data-mask]",function(e){var t=i(this);t.data("bs.inputmask")||t.inputmask(t.data())})}(window.jQuery),function(s){"use strict";var n="Microsoft Internet Explorer"==window.navigator.appName,i=function(e,t){if(this.$element=s(e),this.$input=this.$element.find(":file"),0!==this.$input.length){this.name=this.$input.attr("name")||t.name,this.$hidden=this.$element.find('input[type=hidden][name="'+this.name+'"]'),0===this.$hidden.length&&(this.$hidden=s('').insertBefore(this.$input)),this.$preview=this.$element.find(".fileinput-preview");var n=this.$preview.css("height");"inline"!==this.$preview.css("display")&&"0px"!==n&&"none"!==n&&this.$preview.css("line-height",n),this.original={exists:this.$element.hasClass("fileinput-exists"),preview:this.$preview.html(),hiddenVal:this.$hidden.val()},this.listen()}};i.prototype.listen=function(){this.$input.on("change.bs.fileinput",s.proxy(this.change,this)),s(this.$input[0].form).on("reset.bs.fileinput",s.proxy(this.reset,this)),this.$element.find('[data-trigger="fileinput"]').on("click.bs.fileinput",s.proxy(this.trigger,this)),this.$element.find('[data-dismiss="fileinput"]').on("click.bs.fileinput",s.proxy(this.clear,this))},i.prototype.change=function(e){var n=void 0===e.target.files?e.target&&e.target.value?[{name:e.target.value.replace(/^.+\\/,"")}]:[]:e.target.files;if(e.stopPropagation(),0!==n.length){this.$hidden.val(""),this.$hidden.attr("name",""),this.$input.attr("name",this.name);var i=n[0];if(0");t[0].src=e.target.result,n[0].result=e.target.result,o.find(".fileinput-filename").text(i.name),"none"!=r.css("max-height")&&t.css("max-height",parseInt(r.css("max-height"),10)-parseInt(r.css("padding-top"),10)-parseInt(r.css("padding-bottom"),10)-parseInt(r.css("border-top"),10)-parseInt(r.css("border-bottom"),10)),r.html(t),o.addClass("fileinput-exists").removeClass("fileinput-new"),o.trigger("change.bs.fileinput",n)},t.readAsDataURL(i)}else this.$element.find(".fileinput-filename").text(i.name),this.$preview.text(i.name),this.$element.addClass("fileinput-exists").removeClass("fileinput-new"),this.$element.trigger("change.bs.fileinput")}else this.clear()},i.prototype.clear=function(e){if(e&&e.preventDefault(),this.$hidden.val(""),this.$hidden.attr("name",this.name),this.$input.attr("name",""),n){var t=this.$input.clone(!0);this.$input.after(t),this.$input.remove(),this.$input=t}else this.$input.val("");this.$preview.html(""),this.$element.find(".fileinput-filename").text(""),this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),void 0!==e&&(this.$input.trigger("change"),this.$element.trigger("clear.bs.fileinput"))},i.prototype.reset=function(){this.clear(),this.$hidden.val(this.original.hiddenVal),this.$preview.html(this.original.preview),this.$element.find(".fileinput-filename").text(""),this.original.exists?this.$element.addClass("fileinput-exists").removeClass("fileinput-new"):this.$element.addClass("fileinput-new").removeClass("fileinput-exists"),this.$element.trigger("reset.bs.fileinput")},i.prototype.trigger=function(e){this.$input.trigger("click"),e.preventDefault()};var e=s.fn.fileinput;s.fn.fileinput=function(n){return this.each(function(){var e=s(this),t=e.data("bs.fileinput");t||e.data("bs.fileinput",t=new i(this,n)),"string"==typeof n&&t[n]()})},s.fn.fileinput.Constructor=i,s.fn.fileinput.noConflict=function(){return s.fn.fileinput=e,this},s(document).on("click.fileinput.data-api",'[data-provides="fileinput"]',function(e){var t=s(this);if(!t.data("bs.fileinput")){t.fileinput(t.data());var n=s(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');0>>0,i=0;ike(e)?(o=e+1,a-ke(e)):(o=e,a),{year:o,dayOfYear:s}}function We(e,t,n){var i,r,o=He(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?i=s+ze(r=e.year()-1,t,n):s>ze(e.year(),t,n)?(i=s-ze(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function ze(e,t,n){var i=He(e,t,n),r=He(e+1,t,n);return(ke(e)-i+r)/7}function Ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),P("week",5),P("isoWeek",5),le("w",Q),le("ww",Q,U),le("W",Q),le("WW",Q,U),he(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=S(e)}),z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),he(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:w(n).invalidWeekday=e}),he(["d","e","E"],function(e,t,n,i){t[i]=S(e)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ge=se,Ve=se,Xe=se;function Qe(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),l[t]=ce(l[t]),c[t]=ce(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Ke(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Je(e,t){return t._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Ze),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Ze.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),$("hour","h"),P("hour",13),le("a",Je),le("A",Je),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,U),le("hh",Q,U),le("kk",Q,U),le("hmm",Z),le("hmmss",K),le("Hmm",Z),le("Hmmss",K),de(["H","HH"],ge),de(["k","kk"],function(e,t,n){var i=S(e);t[ge]=24===i?0:i}),de(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),de(["h","hh"],function(e,t,n){t[ge]=S(e),w(n).bigHour=!0}),de("hmm",function(e,t,n){var i=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i)),w(n).bigHour=!0}),de("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i,2)),t[ye]=S(e.substr(r)),w(n).bigHour=!0}),de("Hmm",function(e,t,n){var i=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i))}),de("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[ge]=S(e.substr(0,i)),t[ve]=S(e.substr(i,2)),t[ye]=S(e.substr(r))});var et,tt=_e("Hours",!0),nt={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:Ae,monthsShort:$e,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Ue,weekdaysShort:qe,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function st(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),at(t)}catch(e){}return it[e]}function at(e,t){var n;return e&&((n=c(t)?ct(e):lt(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,i=nt;if(t.abbr=e,null!=it[e])E("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=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])i=it[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return it[e]=new M(L(i,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),at(e),it[e]}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!a(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,i,r,o=0;o=t&&s(r,n,!0)>=t-1)break;t--}o++}return et}(e)}function ut(e){var t,n=e._a;return n&&-2===w(e).overflow&&(t=n[pe]<0||11Le(n[fe],n[pe])?me:n[ge]<0||24ze(n,o,s)?w(e)._overflowWeeks=!0:null!=l?w(e)._overflowWeekday=!0:(a=je(n,i,r,o,s),e._a[fe]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(o=dt(e._a[fe],i[fe]),(e._dayOfYear>ke(o)||0===e._dayOfYear)&&(w(e)._overflowDayOfYear=!0),n=Re(o,0,e._dayOfYear),e._a[pe]=n.getUTCMonth(),e._a[me]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[ye]&&0===e._a[be]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Re:function(e,t,n,i,r,o,s){var a;return e<100&&0<=e?(a=new Date(e+400,t,n,i,r,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,o,s),a}).apply(null,s),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(w(e).weekdayMismatch=!0)}}var ft=/^\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)?)?$/,pt=/^\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)?)?$/,mt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["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}/]],vt=[["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/]],yt=/^\/?Date\((\-?\d+)/i;function bt(e){var t,n,i,r,o,s,a=e._i,l=ft.exec(a)||pt.exec(a);if(l){for(w(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=Ht,hn.isUTC=Ht,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=n("dates accessor is deprecated. Use date instead.",sn),hn.months=n("months accessor is deprecated. Use month instead",Oe),hn.years=n("years accessor is deprecated. Use year instead",Te),hn.zone=n("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()}),hn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=St(e))._a){var t=e._isUTC?p(e._a):_t(e._a);this._isDSTShifted=this.isValid()&&0").addClass("timepicker-hours").append(K("").addClass("table-condensed")),t=K("
        ").addClass("timepicker-minutes").append(K("
        ").addClass("table-condensed")),n=K("
        ").addClass("timepicker-seconds").append(K("
        ").addClass("table-condensed")),i=[function(){var e=K(""),t=K(""),n=K("");return _("h")&&(e.append(K("
        ").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:c.tooltips.pickHour}).attr("data-action","showHours"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(K("").addClass(c.icons.down))))),_("m")&&(_("h")&&(e.append(K("").addClass("separator")),t.append(K("").addClass("separator").html(":")),n.append(K("").addClass("separator"))),e.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:c.tooltips.pickMinute}).attr("data-action","showMinutes"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(K("").addClass(c.icons.down))))),_("s")&&(_("m")&&(e.append(K("").addClass("separator")),t.append(K("").addClass("separator").html(":")),n.append(K("").addClass("separator"))),e.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(K("").addClass(c.icons.up)))),t.append(K("").append(K("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:c.tooltips.pickSecond}).attr("data-action","showSeconds"))),n.append(K("").append(K("").attr({href:"#",tabindex:"-1",title:c.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(K("").addClass(c.icons.down))))),s||(e.append(K("").addClass("separator")),t.append(K("").append(K("").addClass("separator"))),K("
        ").addClass("timepicker-picker").append(K("").addClass("table-condensed").append([e,t,n]))}()];return _("h")&&i.push(e),_("m")&&i.push(t),_("s")&&i.push(n),i},M=function(){var e=K("
        ").addClass("bootstrap-datetimepicker-widget dropdown-menu"),t=K("
        ").addClass("datepicker").append(function(){var e=K("
        ").append(K("").append(K("").append(K("").append(K("
        ").addClass("prev").attr("data-action","previous").append(K("").addClass(c.icons.previous))).append(K("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",c.calendarWeeks?"6":"5")).append(K("").addClass("next").attr("data-action","next").append(K("").addClass(c.icons.next)))),t=K("
        ").attr("colspan",c.calendarWeeks?"8":"7")));return[K("
        ").addClass("datepicker-days").append(K("").addClass("table-condensed").append(e).append(K(""))),K("
        ").addClass("datepicker-months").append(K("
        ").addClass("table-condensed").append(e.clone()).append(t.clone())),K("
        ").addClass("datepicker-years").append(K("
        ").addClass("table-condensed").append(e.clone()).append(t.clone())),K("
        ").addClass("datepicker-decades").append(K("
        ").addClass("table-condensed").append(e.clone()).append(t.clone()))]}()),n=K("
        ").addClass("timepicker").append(L()),i=K("
          ").addClass("list-unstyled"),r=K("
        • ").addClass("picker-switch"+(c.collapse?" accordion-toggle":"")).append(function(){var e=[];return c.showTodayButton&&e.push(K("
        ").append(K("").attr({"data-action":"today",title:c.tooltips.today}).append(K("").addClass(c.icons.today)))),!c.sideBySide&&D()&&E()&&e.push(K("").append(K("").attr({"data-action":"togglePicker",title:c.tooltips.selectTime}).append(K("").addClass(c.icons.time)))),c.showClear&&e.push(K("").append(K("").attr({"data-action":"clear",title:c.tooltips.clear}).append(K("").addClass(c.icons.clear)))),c.showClose&&e.push(K("").append(K("").attr({"data-action":"close",title:c.tooltips.close}).append(K("").addClass(c.icons.close)))),K("").addClass("table-condensed").append(K("").append(K("").append(e)))}());return c.inline&&e.removeClass("dropdown-menu"),s&&e.addClass("usetwentyfour"),_("s")&&!s&&e.addClass("wider"),c.sideBySide&&D()&&E()?(e.addClass("timepicker-sbs"),"top"===c.toolbarPlacement&&e.append(r),e.append(K("
        ").addClass("row").append(t.addClass("col-md-6")).append(n.addClass("col-md-6"))),"bottom"===c.toolbarPlacement&&e.append(r),e):("top"===c.toolbarPlacement&&i.append(r),D()&&i.append(K("
      • ").addClass(c.collapse&&E()?"collapse in":"").append(t)),"default"===c.toolbarPlacement&&i.append(r),E()&&i.append(K("
      • ").addClass(c.collapse&&D()?"collapse":"").append(n)),"bottom"===c.toolbarPlacement&&i.append(r),e.append(i))},A=function(){var e,t=(m||o).position(),n=(m||o).offset(),i=c.widgetPositioning.vertical,r=c.widgetPositioning.horizontal;if(c.widgetParent)e=c.widgetParent.append(g);else if(o.is("input"))e=o.after(g).parent();else{if(c.inline)return void(e=o.append(g));(e=o).children().first().after(g)}if("auto"===i&&(i=n.top+1.5*g.height()>=K(window).height()+K(window).scrollTop()&&g.height()+o.outerHeight()K(window).width()?"right":"left"),"top"===i?g.addClass("top").removeClass("bottom"):g.addClass("bottom").removeClass("top"),"right"===r?g.addClass("pull-right"):g.removeClass("pull-right"),"static"===e.css("position")&&(e=e.parents().filter(function(){return"static"!==K(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");g.css({top:"top"===i?"auto":t.top+o.outerHeight(),bottom:"top"===i?e.outerHeight()-(e===o?0:t.top):"auto",left:"left"===r?e===o?0:t.left:"auto",right:"left"===r?"auto":e.outerWidth()-o.outerWidth()-(e===o?0:t.left)})},$=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||o.trigger(e)},N=function(e){"y"===e&&(e="YYYY"),$({type:"dp.update",change:e,viewDate:d.clone()})},O=function(e){g&&(e&&(a=Math.max(v,Math.min(3,a+e))),g.find(".datepicker > div").hide().filter(".datepicker-"+t[a].clsName).show())},I=function(e,t){if(!e.isValid())return!1;if(c.disabledDates&&"d"===t&&function(e){return!0===c.disabledDates[e.format("YYYY-MM-DD")]}(e))return!1;if(c.enabledDates&&"d"===t&&!function(e){return!0===c.enabledDates[e.format("YYYY-MM-DD")]}(e))return!1;if(c.minDate&&e.isBefore(c.minDate,t))return!1;if(c.maxDate&&e.isAfter(c.maxDate,t))return!1;if(c.daysOfWeekDisabled&&"d"===t&&-1!==c.daysOfWeekDisabled.indexOf(e.day()))return!1;if(c.disabledHours&&("h"===t||"m"===t||"s"===t)&&function(e){return!0===c.disabledHours[e.format("H")]}(e))return!1;if(c.enabledHours&&("h"===t||"m"===t||"s"===t)&&!function(e){return!0===c.enabledHours[e.format("H")]}(e))return!1;if(c.disabledTimeIntervals&&("h"===t||"m"===t||"s"===t)){var n=!1;if(K.each(c.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return!(n=!0)}),n)return!1}return!0},P=function(){var e,t,n,i=g.find(".datepicker-days"),r=i.find("th"),o=[],s=[];if(D()){for(r.eq(0).find("span").attr("title",c.tooltips.prevMonth),r.eq(1).attr("title",c.tooltips.selectMonth),r.eq(2).find("span").attr("title",c.tooltips.nextMonth),i.find(".disabled").removeClass("disabled"),r.eq(1).text(d.format(c.dayViewHeaderFormat)),I(d.clone().subtract(1,"M"),"M")||r.eq(0).addClass("disabled"),I(d.clone().add(1,"M"),"M")||r.eq(2).addClass("disabled"),e=d.clone().startOf("M").startOf("w").startOf("d"),n=0;n<42;n++)0===e.weekday()&&(t=K("
      • "),c.calendarWeeks&&t.append('"),o.push(t)),s=["day"],e.isBefore(d,"M")&&s.push("old"),e.isAfter(d,"M")&&s.push("new"),e.isSame(u,"d")&&!p&&s.push("active"),I(e,"d")||s.push("disabled"),e.isSame(T(),"d")&&s.push("today"),0!==e.day()&&6!==e.day()||s.push("weekend"),$({type:"dp.classify",date:e,classNames:s}),t.append('"),e.add(1,"d");i.find("tbody").empty().append(o),function(){var e=g.find(".datepicker-months"),t=e.find("th"),n=e.find("tbody").find("span");t.eq(0).find("span").attr("title",c.tooltips.prevYear),t.eq(1).attr("title",c.tooltips.selectYear),t.eq(2).find("span").attr("title",c.tooltips.nextYear),e.find(".disabled").removeClass("disabled"),I(d.clone().subtract(1,"y"),"y")||t.eq(0).addClass("disabled"),t.eq(1).text(d.year()),I(d.clone().add(1,"y"),"y")||t.eq(2).addClass("disabled"),n.removeClass("active"),u.isSame(d,"y")&&!p&&n.eq(u.month()).addClass("active"),n.each(function(e){I(d.clone().month(e),"M")||K(this).addClass("disabled")})}(),function(){var e=g.find(".datepicker-years"),t=e.find("th"),n=d.clone().subtract(5,"y"),i=d.clone().add(6,"y"),r="";for(t.eq(0).find("span").attr("title",c.tooltips.prevDecade),t.eq(1).attr("title",c.tooltips.selectDecade),t.eq(2).find("span").attr("title",c.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),c.minDate&&c.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+i.year()),c.maxDate&&c.maxDate.isBefore(i,"y")&&t.eq(2).addClass("disabled");!n.isAfter(i,"y");)r+=''+n.year()+"",n.add(1,"y");e.find("td").html(r)}(),function(){var e,t=g.find(".datepicker-decades"),n=t.find("th"),i=J({y:d.year()-d.year()%100-1}),r=i.clone().add(100,"y"),o=i.clone(),s=!1,a=!1,l="";for(n.eq(0).find("span").attr("title",c.tooltips.prevCentury),n.eq(2).find("span").attr("title",c.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(i.isSame(J({y:1900}))||c.minDate&&c.minDate.isAfter(i,"y"))&&n.eq(0).addClass("disabled"),n.eq(1).text(i.year()+"-"+r.year()),(i.isSame(J({y:2e3}))||c.maxDate&&c.maxDate.isBefore(r,"y"))&&n.eq(2).addClass("disabled");!i.isAfter(r,"y");)e=i.year()+12,s=c.minDate&&c.minDate.isAfter(i,"y")&&c.minDate.year()<=e,a=c.maxDate&&c.maxDate.isAfter(i,"y")&&c.maxDate.year()<=e,l+=''+(i.year()+1)+" - "+(i.year()+12)+"",i.add(12,"y");l+="",t.find("td").html(l),n.eq(1).text(o.year()+1+"-"+i.year())}()}},e=function(){var e,t,n=g.find(".timepicker span[data-time-component]");s||(e=g.find(".timepicker [data-action=togglePeriod]"),t=u.clone().add(12<=u.hours()?-12:12,"h"),e.text(u.format("A")),I(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),n.filter("[data-time-component=hours]").text(u.format(s?"HH":"hh")),n.filter("[data-time-component=minutes]").text(u.format("mm")),n.filter("[data-time-component=seconds]").text(u.format("ss")),function(){var e=g.find(".timepicker-hours table"),t=d.clone().startOf("d"),n=[],i=K("");for(11"),n.push(i)),i.append('"),t.add(1,"h");e.empty().append(n)}(),function(){for(var e=g.find(".timepicker-minutes table"),t=d.clone().startOf("h"),n=[],i=K(""),r=1===c.stepping?5:c.stepping;d.isSame(t,"h");)t.minute()%(4*r)==0&&(i=K(""),n.push(i)),i.append('"),t.add(r,"m");e.empty().append(n)}(),function(){for(var e=g.find(".timepicker-seconds table"),t=d.clone().startOf("m"),n=[],i=K("");d.isSame(t,"m");)t.second()%20==0&&(i=K(""),n.push(i)),i.append('"),t.add(5,"s");e.empty().append(n)}()},F=function(){g&&(P(),e())},R=function(e){var t=p?null:u;if(!e)return p=!0,n.val(""),o.data("date",""),$({type:"dp.change",date:!1,oldDate:t}),void F();if(e=e.clone().locale(c.locale),S()&&e.tz(c.timeZone),1!==c.stepping)for(e.minutes(Math.round(e.minutes()/c.stepping)*c.stepping).seconds(0);c.minDate&&e.isBefore(c.minDate);)e.add(c.stepping,"minutes");I(e)?(d=(u=e).clone(),n.val(u.format(i)),o.data("date",u.format(i)),p=!1,F(),$({type:"dp.change",date:u.clone(),oldDate:t})):(c.keepInvalid?$({type:"dp.change",date:e,oldDate:t}):n.val(p?"":u.format(i)),$({type:"dp.error",date:e,oldDate:t}))},H=function(){var t=!1;return g&&(g.find(".collapse").each(function(){var e=K(this).data("collapse");return!e||!e.transitioning||!(t=!0)}),t||(m&&m.hasClass("btn")&&m.toggleClass("active"),g.hide(),K(window).off("resize",A),g.off("click","[data-action]"),g.off("mousedown",!1),g.remove(),g=!1,$({type:"dp.hide",date:u.clone()}),n.blur(),d=u.clone())),f},j=function(){R(null)},W=function(e){return void 0===c.parseInputDate?(!J.isMoment(e)||e instanceof Date)&&(e=T(e)):e=c.parseInputDate(e),e},z={next:function(){var e=t[a].navFnc;d.add(t[a].navStep,e),P(),N(e)},previous:function(){var e=t[a].navFnc;d.subtract(t[a].navStep,e),P(),N(e)},pickerSwitch:function(){O(1)},selectMonth:function(e){var t=K(e.target).closest("tbody").find("span").index(K(e.target));d.month(t),a===v?(R(u.clone().year(d.year()).month(d.month())),c.inline||H()):(O(-1),P()),N("M")},selectYear:function(e){var t=parseInt(K(e.target).text(),10)||0;d.year(t),a===v?(R(u.clone().year(d.year())),c.inline||H()):(O(-1),P()),N("YYYY")},selectDecade:function(e){var t=parseInt(K(e.target).data("selection"),10)||0;d.year(t),a===v?(R(u.clone().year(d.year())),c.inline||H()):(O(-1),P()),N("YYYY")},selectDay:function(e){var t=d.clone();K(e.target).is(".old")&&t.subtract(1,"M"),K(e.target).is(".new")&&t.add(1,"M"),R(t.date(parseInt(K(e.target).text(),10))),E()||c.keepOpen||c.inline||H()},incrementHours:function(){var e=u.clone().add(1,"h");I(e,"h")&&R(e)},incrementMinutes:function(){var e=u.clone().add(c.stepping,"m");I(e,"m")&&R(e)},incrementSeconds:function(){var e=u.clone().add(1,"s");I(e,"s")&&R(e)},decrementHours:function(){var e=u.clone().subtract(1,"h");I(e,"h")&&R(e)},decrementMinutes:function(){var e=u.clone().subtract(c.stepping,"m");I(e,"m")&&R(e)},decrementSeconds:function(){var e=u.clone().subtract(1,"s");I(e,"s")&&R(e)},togglePeriod:function(){R(u.clone().add(12<=u.hours()?-12:12,"h"))},togglePicker:function(e){var t,n=K(e.target),i=n.closest("ul"),r=i.find(".in"),o=i.find(".collapse:not(.in)");if(r&&r.length){if((t=r.data("collapse"))&&t.transitioning)return;r.collapse?(r.collapse("hide"),o.collapse("show")):(r.removeClass("in"),o.addClass("in")),n.is("span")?n.toggleClass(c.icons.time+" "+c.icons.date):n.find("span").toggleClass(c.icons.time+" "+c.icons.date)}},showPicker:function(){g.find(".timepicker > div:not(.timepicker-picker)").hide(),g.find(".timepicker .timepicker-picker").show()},showHours:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-hours").show()},showMinutes:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){g.find(".timepicker .timepicker-picker").hide(),g.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var t=parseInt(K(e.target).text(),10);s||(12<=u.hours()?12!==t&&(t+=12):12===t&&(t=0)),R(u.clone().hours(t)),z.showPicker.call(f)},selectMinute:function(e){R(u.clone().minutes(parseInt(K(e.target).text(),10))),z.showPicker.call(f)},selectSecond:function(e){R(u.clone().seconds(parseInt(K(e.target).text(),10))),z.showPicker.call(f)},clear:j,today:function(){var e=T();I(e,"d")&&R(e)},close:H},Y=function(e){return!K(e.currentTarget).is(".disabled")&&(z[K(e.currentTarget).data("action")].apply(f,arguments),!1)},B=function(){var e;return n.prop("disabled")||!c.ignoreReadonly&&n.prop("readonly")||g||(void 0!==n.val()&&0!==n.val().trim().length?R(W(n.val().trim())):p&&c.useCurrent&&(c.inline||n.is("input")&&0===n.val().trim().length)&&(e=T(),"string"==typeof c.useCurrent&&(e={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[c.useCurrent](e)),R(e)),g=M(),function(){var e=K(""),t=d.clone().startOf("w").startOf("d");for(!0===c.calendarWeeks&&e.append(K("\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
        ":"
        "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(function(e){return e.replace(/&([#\w]+);/g,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='"+n+""},n.prototype.image=function(e,t,n){var i=''+n+'":">")},n.prototype.text=function(e){return e},c.parse=function(e,t,n){return new c(t,n).parse(e)},c.prototype.parse=function(e){this.inline=new i(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},c.prototype.next=function(){return this.token=this.tokens.pop()},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},c.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,n,i,r="",o="";for(n="",e=0;e=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;n ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:r,ch:0},{line:r,ch:99999999999999})}(e.codemirror)}function w(e){var t=e.codemirror,n=h(t),i=e.options,r="http://";return!(i.promptURLs&&!(r=prompt(i.promptTexts.link)))&&void P(t,n.link,i.insertTexts.link,r)}function x(e){var t=e.codemirror,n=h(t),i=e.options,r="http://";return!(i.promptURLs&&!(r=prompt(i.promptTexts.image)))&&void P(t,n.image,i.insertTexts.image,r)}function k(e){var t=e.codemirror,n=h(t),i=e.options;P(t,n.table,i.insertTexts.table)}function C(e){var t=e.codemirror,n=h(t),i=e.options;P(t,n.image,i.insertTexts.horizontalRule)}function S(e){var t=e.codemirror;t.undo(),t.focus()}function T(e){var t=e.codemirror;t.redo(),t.focus()}function _(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.nextSibling,r=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||u(e),i.className+=" editor-preview-active-side"},1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var s=n.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var a=e.toolbarElements.preview,l=n.previousSibling;a.className=a.className.replace(/\s*active\s*/g,""),l.className=l.className.replace(/\s*disabled-for-preview*/g,"")}t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){i.innerHTML=e.options.previewRender(e.value(),i)}),o?(i.innerHTML=e.options.previewRender(e.value(),i),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function E(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.previousSibling,r=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||((o=document.createElement("div")).className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var s=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(s.className)&&_(e)}function P(e,t,n,i){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var r,o=n[0],s=n[1],a=e.getCursor("start"),l=e.getCursor("end");i&&(s=s.replace("#url#",i)),t?(o=(r=e.getLine(a.line)).slice(0,a.ch),s=r.slice(a.ch),e.replaceRange(o+s,{line:a.line,ch:0})):(r=e.getSelection(),e.replaceSelection(o+r+s),a.ch+=o.length,a!==l&&(l.ch+=o.length)),e.setSelection(a,l),e.focus()}}function D(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var i=e.getCursor("start"),r=e.getCursor("end"),o=i.line;o<=r.line;o++)s=o,a=void 0,a=e.getLine(s),l=a.search(/[^#]/),a=void 0!==t?l<=0?"bigger"==t?"###### "+a:"# "+a:6==l&&"smaller"==t?a.substr(7):1==l&&"bigger"==t?a.substr(2):"bigger"==t?a.substr(1):"#"+a:1==n?l<=0?"# "+a:l==n?a.substr(l+1):"# "+a.substr(l+1):2==n?l<=0?"## "+a:l==n?a.substr(l+1):"## "+a.substr(l+1):l<=0?"### "+a:l==n?a.substr(l+1):"### "+a.substr(l+1),e.replaceRange(a,{line:s,ch:0},{line:s,ch:99999999999999});e.focus()}var s,a,l}function L(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=h(e),i=e.getCursor("start"),r=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},s={quote:"> ","unordered-list":"* ","ordered-list":"1. "},a=i.line;a<=r.line;a++)l=a,c=void 0,c=e.getLine(l),c=n[t]?c.replace(o[t],"$1"):s[t]+c,e.replaceRange(c,{line:l,ch:0},{line:l,ch:99999999999999});e.focus()}var l,c}function M(e,t,n,i){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){i=void 0===i?n:i;var r,o=e.codemirror,s=h(o),a=n,l=i,c=o.getCursor("start"),u=o.getCursor("end");s[t]?(a=(r=o.getLine(c.line)).slice(0,c.ch),l=r.slice(c.ch),"bold"==t?(a=a.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),l=l.replace(/(\*\*|__)/,"")):"italic"==t?(a=a.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),l=l.replace(/(\*|_)/,"")):"strikethrough"==t&&(a=a.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),l=l.replace(/(\*\*|~~)/,"")),o.replaceRange(a+l,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(c.ch-=2,c!==u&&(u.ch-=2)):"italic"==t&&(c.ch-=1,c!==u&&(u.ch-=1))):(r=o.getSelection(),"bold"==t?r=(r=r.split("**").join("")).split("__").join(""):"italic"==t?r=(r=r.split("*").join("")).split("_").join(""):"strikethrough"==t&&(r=r.split("~~").join("")),o.replaceSelection(a+r+l),c.ch+=n.length,u.ch=c.ch+r.length),o.setSelection(c,u),o.focus()}}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=A(e[n]||{},t[n]):e[n]=t[n]);return e}function $(e){for(var t=1;t':t=document.createElement("div")),"string"==typeof n&&(i=t.classList).add.apply(i,n.split(" ")),t;var i}(l,e,u.placeholderClass),c(l,"items",u.items),u.acceptFrom?c(l,"acceptFrom",u.acceptFrom):u.connectWith&&c(l,"connectWith",u.connectWith),O(l),a(t,"role","option"),a(t,"aria-grabbed","false"),M(l,!0),s(l,"dragstart",function(e){if(!0!==e.target.isSortable&&(e.stopImmediatePropagation(),(!u.handle||e.target.matches(u.handle))&&"false"!==e.target.getAttribute("draggable"))){var t=$(e.target),n=N(t,e.target);E=d(t.children,u.items),T=E.indexOf(n),_=m(n,t.children),S=t,function(e,t,n){if(!(e instanceof Event))throw new Error("setDragImage requires a DragEvent as the first argument.");if(!(t instanceof HTMLElement))throw new Error("setDragImage requires the dragged element as the second argument.");if(n||(n=w),e.dataTransfer&&e.dataTransfer.setDragImage){var i=n(t,p(t),e);if(!(i.element instanceof HTMLElement)||"number"!=typeof i.posX||"number"!=typeof i.posY)throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].");e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setData("text/plain","arbitrary"),e.dataTransfer.setDragImage(i.element,i.posX,i.posY)}}(e,n,u.customDragImage),C=b(n),n.classList.add(u.draggingClass),a(k=A(n,t),"aria-grabbed","true"),t.dispatchEvent(new CustomEvent("sortstart",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}}))}}),s(l,"dragenter",function(e){if(!0!==e.target.isSortable){var t=$(e.target);D=d(t.children,c(t,"items")).filter(function(e){return e!==f(l).placeholder})}}),s(l,"dragend",function(e){if(k){k.classList.remove(u.draggingClass),a(k,"aria-grabbed","false"),"true"===k.getAttribute("aria-copied")&&"true"!==c(k,"dropped")&&k.remove(),k.style.display=k.oldDisplay,delete k.oldDisplay;var t=Array.from(h.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(g)[0];t&&t.remove(),l.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}})),C=k=null}}),s(l,"drop",function(e){if(x(l,k.parentElement)){e.preventDefault(),e.stopPropagation(),c(k,"dropped","true");var t=Array.from(h.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(g)[0];y(t,k),t.remove(),l.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:_,index:T,container:S},item:k}}));var n=f(l).placeholder,i=d(S.children,u.items).filter(function(e){return e!==n}),r=!0===this.isSortable?this:this.parentElement,o=d(r.children,c(r,"items")).filter(function(e){return e!==n}),s=m(k,Array.from(k.parentElement.children).filter(function(e){return e!==n})),a=m(k,o);_===s&&S===r||l.dispatchEvent(new CustomEvent("sortupdate",{detail:{origin:{elementIndex:_,index:T,container:S,itemsBeforeUpdate:E,items:i},destination:{index:a,elementIndex:s,container:r,itemsBeforeUpdate:D,items:o},item:k}}))}});var r=function(n,i){var r;return void 0===i&&(i=0),function(){for(var e=[],t=0;t=parseInt(i.maxItems)&&k.parentElement!==n||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=!0===f(n).getConfig("copy")?"copy":"move",r(n,t,e.pageY))}};s(t.concat(l),"dragover",i),s(t.concat(l),"dragenter",i)}),e)}return P.destroy=function(e){i(e)},P.enable=function(e){O(e)},P.disable=function(e){!function(e){var t=c(e,"opts"),n=l(d(e.children,t.items),t.handle);a(e,"aria-dropeffect","none"),c(e,"_disabled","true"),a(n,"draggable","false"),o(n,"mousedown")}(e)},P}();"undefined"==typeof piranha&&(piranha={}),piranha.notifications=new function(){"use strict";var i=this;i.container=document.getElementById("notifications-container"),i.createSuccess=function(e,t){var n=i.create({class:"alert-success",icon:t||"fas fa-check",body:e});i.add(n)},i.createInfo=function(e,t){var n=i.create({class:"alert-info",icon:t||"fas fa-info-circle",body:e});i.add(n)},i.createWarning=function(e,t){var n=i.create({class:"alert-warning",icon:t||"fas fa-exclamation-triangle",body:e});i.add(n)},i.createDanger=function(e,t){var n=i.create({class:"alert-danger",icon:t||"fas fa-exclamation-triangle",body:e});i.add(n)},i.create=function(e){var t=document.createElement("div");if(t.className="alert notification-alert",t.classList.add(e.class||"alert-info"),e.icon){var n=document.createElement("p"),i=document.createElement("i");i.className=e.icon,n.appendChild(i);var r=document.createTextNode(e.body);n.appendChild(r),t.appendChild(n)}else t.innerHTML=e.body;if(e.buttons&&0Are you sure to delete?

        ",r=t.posturl||$(this).attr("href"),o=$('').appendTo("body");return o.modal("show"),o.on("hidden.bs.modal",function(){o.remove()}),!1}),$(document).on("submit","form",function(e){$(this).find(".editor-area").each(function(){$("#"+$(this).attr("data-id")).val($(this).html())})}),$(document).on("click",".table-filter button",function(e){e.preventDefault();var t=$(this).data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val()),$(this).parent().find("button").removeClass("btn-primary"),$(this).addClass("btn-primary")}),$(document).on("change",".table-filter select",function(e){e.preventDefault();var t=$(this).parent().find("button.btn-primary").data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val())}),$(document).on("keyup",".table-filter #blog-search",function(e){e.preventDefault();var t=$(this).parent().find("button.btn-primary").data(),n=$(this).parent().data().table;manager.tools.tablesort(n,t.filter,$("#blog-type-filter").val(),$("#blog-category-filter").val(),$("#blog-search").val())}),$(document).on("keyup",".table-filter #media-search",function(e){e.preventDefault();var t=$(this).parent().parent().data().table;manager.tools.tablesort(t,"","","",$(this).val())}),$(document).on("click","a.add-after, a.add-below",function(e){e.preventDefault();for(var t=$(this).data(),n=t.title||"Choose page type",i=t.posturl||$(this).attr("href"),r="",o=0;o'+manager.pageTypes[o].title+"";var s=$('').appendTo("body");return s.modal("show"),s.on("hidden.bs.modal",function(){s.remove()}),!1}),$(document).on("mouseenter","a.add-after",function(e){$(this).parent().parent().append('
        Your new page
        ')}),$(document).on("mouseleave","a.add-after",function(e){$("#add-page-placeholder").remove()}),$(document).on("mouseenter","a.add-below",function(e){var t=$(this).parent().parent(),n=t.children("ol");if(0Your new page'),i||($("#add-page-below-placeholder").addClass("hover-expanded"),t.addClass("expanded"))}else t.append('
          Your new page
        '),t.addClass("expanded")}),$(document).on("mouseleave","a.add-below",function(e){var t=$("#add-page-below-placeholder");t.hasClass("hover-expanded")&&t.parent().parent().removeClass("expanded"),t.remove()}),$(document).on("mouseenter",".sitemap-item .remove",function(e){$(this).parent().parent().addClass("hover-remove")}),$(document).on("mouseleave",".sitemap-item .remove",function(e){$(this).parent().parent().removeClass("hover-remove")});var manager={pageTypes:[],tools:{isempty:function(e){return""==$(e).text().replace(/\s/g,"")&&0==$(e).find("img").length},positionblocks:function(){for(var e=$(".block-add"),t=$(window).height()/2,n=0;n.block-info").remove(),$(e).insertAfter(t);$(e).find(".block-editor").each(function(){addInlineEditor("#"+this.id)});$(e).find(".markdown-editor").each(function(){RegisterMarkdown($("#"+$(this).attr("id")).get(0))}),o&&o(),manager.tools.setupBlockSortable()}})},recalcblocks:function(){for(var e=$(".page-blocks-body .sortable >.sortable-item"),n=0;n
        '+e.week()+"'+e.date()+"
        '+t.format(s?"HH":"hh")+"
        '+t.format("mm")+"
        '+t.format("ss")+"
        ").addClass("cw").text("#"));t.isBefore(d.clone().endOf("w"));)e.append(K("").addClass("dow").text(t.format("dd"))),t.add(1,"d");g.find(".datepicker-days thead").append(e)}(),function(){for(var e=[],t=d.clone().startOf("y").startOf("d");t.isSame(d,"y");)e.push(K("").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");g.find(".datepicker-months td").empty().append(e)}(),g.find(".timepicker-hours").hide(),g.find(".timepicker-minutes").hide(),g.find(".timepicker-seconds").hide(),F(),O(),K(window).on("resize",A),g.on("click","[data-action]",Y),g.on("mousedown",!1),m&&m.hasClass("btn")&&m.toggleClass("active"),A(),g.show(),c.focusOnShow&&!n.is(":focus")&&n.focus(),$({type:"dp.show"})),f},q=function(){return g?H():B()},U=function(e){var t,n,i,r,o=null,s=[],a={},l=e.which;for(t in C[l]="p",C)C.hasOwnProperty(t)&&"p"===C[t]&&(s.push(t),parseInt(t,10)!==l&&(a[t]=!0));for(t in c.keyBinds)if(c.keyBinds.hasOwnProperty(t)&&"function"==typeof c.keyBinds[t]&&((i=t.split(" ")).length===s.length&&k[l]===i[i.length-1])){for(r=!0,n=i.length-2;0<=n;n--)if(!(k[i[n]]in a)){r=!1;break}if(r){o=c.keyBinds[t];break}}o&&(o.call(f,g),e.stopPropagation(),e.preventDefault())},G=function(e){C[e.which]="r",e.stopPropagation(),e.preventDefault()},V=function(e){var t=K(e.target).val().trim(),n=t?W(t):null;return R(n),e.stopImmediatePropagation(),!1},X=function(e){var t={};return K.each(e,function(){var e=W(this);e.isValid()&&(t[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(t).length&&t},Q=function(e){var t={};return K.each(e,function(){t[this]=!0}),!!Object.keys(t).length&&t},Z=function(){var e=c.format||"L LT";i=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(u.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return u.localeData().longDateFormat(e)||e})}),(r=c.extraFormats?c.extraFormats.slice():[]).indexOf(e)<0&&r.indexOf(i)<0&&r.push(i),s=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,_("y")&&(v=2),_("M")&&(v=1),_("d")&&(v=0),a=Math.max(v,a),p||R(u)};if(f.destroy=function(){H(),n.off({change:V,blur:blur,keydown:U,keyup:G,focus:c.allowInputToggle?H:""}),o.is("input")?n.off({focus:B}):m&&(m.off("click",q),m.off("mousedown",!1)),o.removeData("DateTimePicker"),o.removeData("date")},f.toggle=q,f.show=B,f.hide=H,f.disable=function(){return H(),m&&m.hasClass("btn")&&m.addClass("disabled"),n.prop("disabled",!0),f},f.enable=function(){return m&&m.hasClass("btn")&&m.removeClass("disabled"),n.prop("disabled",!1),f},f.ignoreReadonly=function(e){if(0===arguments.length)return c.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return c.ignoreReadonly=e,f},f.options=function(e){if(0===arguments.length)return K.extend(!0,{},c);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return K.extend(!0,c,e),K.each(c,function(e,t){if(void 0===f[e])throw new TypeError("option "+e+" is not recognized!");f[e](t)}),f},f.date=function(e){if(0===arguments.length)return p?null:u.clone();if(!(null===e||"string"==typeof e||J.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return R(null===e?null:W(e)),f},f.format=function(e){if(0===arguments.length)return c.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return c.format=e,i&&Z(),f},f.timeZone=function(e){if(0===arguments.length)return c.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return c.timeZone=e,f},f.dayViewHeaderFormat=function(e){if(0===arguments.length)return c.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return c.dayViewHeaderFormat=e,f},f.extraFormats=function(e){if(0===arguments.length)return c.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return c.extraFormats=e,r&&Z(),f},f.disabledDates=function(e){if(0===arguments.length)return c.disabledDates?K.extend({},c.disabledDates):c.disabledDates;if(!e)return c.disabledDates=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return c.disabledDates=X(e),c.enabledDates=!1,F(),f},f.enabledDates=function(e){if(0===arguments.length)return c.enabledDates?K.extend({},c.enabledDates):c.enabledDates;if(!e)return c.enabledDates=!1,F(),f;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return c.enabledDates=X(e),c.disabledDates=!1,F(),f},f.daysOfWeekDisabled=function(e){if(0===arguments.length)return c.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return c.daysOfWeekDisabled=!1,F(),f;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(c.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"d");){if(u.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}R(u)}return F(),f},f.maxDate=function(e){if(0===arguments.length)return c.maxDate?c.maxDate.clone():c.maxDate;if("boolean"==typeof e&&!1===e)return c.maxDate=!1,F(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=W(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(c.minDate&&t.isBefore(c.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(i));return c.maxDate=t,c.useCurrent&&!c.keepInvalid&&u.isAfter(e)&&R(c.maxDate),d.isAfter(t)&&(d=t.clone().subtract(c.stepping,"m")),F(),f},f.minDate=function(e){if(0===arguments.length)return c.minDate?c.minDate.clone():c.minDate;if("boolean"==typeof e&&!1===e)return c.minDate=!1,F(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=W(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(c.maxDate&&t.isAfter(c.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(i));return c.minDate=t,c.useCurrent&&!c.keepInvalid&&u.isBefore(e)&&R(c.minDate),d.isBefore(t)&&(d=t.clone().add(c.stepping,"m")),F(),f},f.defaultDate=function(e){if(0===arguments.length)return c.defaultDate?c.defaultDate.clone():c.defaultDate;if(!e)return c.defaultDate=!1,f;"string"==typeof e&&(e="now"===e||"moment"===e?T():T(e));var t=W(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!I(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return c.defaultDate=t,(c.defaultDate&&c.inline||""===n.val().trim())&&R(c.defaultDate),f},f.locale=function(e){if(0===arguments.length)return c.locale;if(!J.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return c.locale=e,u.locale(c.locale),d.locale(c.locale),i&&Z(),g&&(H(),B()),f},f.stepping=function(e){return 0===arguments.length?c.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),c.stepping=e,f)},f.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return c.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return c.useCurrent=e,f},f.collapse=function(e){if(0===arguments.length)return c.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return c.collapse===e||(c.collapse=e,g&&(H(),B())),f},f.icons=function(e){if(0===arguments.length)return K.extend({},c.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return K.extend(c.icons,e),g&&(H(),B()),f},f.tooltips=function(e){if(0===arguments.length)return K.extend({},c.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return K.extend(c.tooltips,e),g&&(H(),B()),f},f.useStrict=function(e){if(0===arguments.length)return c.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return c.useStrict=e,f},f.sideBySide=function(e){if(0===arguments.length)return c.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return c.sideBySide=e,g&&(H(),B()),f},f.viewMode=function(e){if(0===arguments.length)return c.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===y.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+y.join(", ")+") value");return c.viewMode=e,a=Math.max(y.indexOf(e),v),O(),f},f.toolbarPlacement=function(e){if(0===arguments.length)return c.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===x.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+x.join(", ")+") value");return c.toolbarPlacement=e,g&&(H(),B()),f},f.widgetPositioning=function(e){if(0===arguments.length)return K.extend({},c.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),-1===w.indexOf(e.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+w.join(", ")+")");c.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),-1===b.indexOf(e.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+b.join(", ")+")");c.widgetPositioning.vertical=e.vertical}return F(),f},f.calendarWeeks=function(e){if(0===arguments.length)return c.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return c.calendarWeeks=e,F(),f},f.showTodayButton=function(e){if(0===arguments.length)return c.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return c.showTodayButton=e,g&&(H(),B()),f},f.showClear=function(e){if(0===arguments.length)return c.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return c.showClear=e,g&&(H(),B()),f},f.widgetParent=function(e){if(0===arguments.length)return c.widgetParent;if("string"==typeof e&&(e=K(e)),null!==e&&"string"!=typeof e&&!(e instanceof K))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return c.widgetParent=e,g&&(H(),B()),f},f.keepOpen=function(e){if(0===arguments.length)return c.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return c.keepOpen=e,f},f.focusOnShow=function(e){if(0===arguments.length)return c.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return c.focusOnShow=e,f},f.inline=function(e){if(0===arguments.length)return c.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return c.inline=e,f},f.clear=function(){return j(),f},f.keyBinds=function(e){return 0===arguments.length?c.keyBinds:(c.keyBinds=e,f)},f.getMoment=function(e){return T(e)},f.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return c.debug=e,f},f.allowInputToggle=function(e){if(0===arguments.length)return c.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return c.allowInputToggle=e,f},f.showClose=function(e){if(0===arguments.length)return c.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return c.showClose=e,f},f.keepInvalid=function(e){if(0===arguments.length)return c.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return c.keepInvalid=e,f},f.datepickerInput=function(e){if(0===arguments.length)return c.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return c.datepickerInput=e,f},f.parseInputDate=function(e){if(0===arguments.length)return c.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return c.parseInputDate=e,f},f.disabledTimeIntervals=function(e){if(0===arguments.length)return c.disabledTimeIntervals?K.extend({},c.disabledTimeIntervals):c.disabledTimeIntervals;if(!e)return c.disabledTimeIntervals=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return c.disabledTimeIntervals=e,F(),f},f.disabledHours=function(e){if(0===arguments.length)return c.disabledHours?K.extend({},c.disabledHours):c.disabledHours;if(!e)return c.disabledHours=!1,F(),f;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(c.disabledHours=Q(e),c.enabledHours=!1,c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"h");){if(u.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}R(u)}return F(),f},f.enabledHours=function(e){if(0===arguments.length)return c.enabledHours?K.extend({},c.enabledHours):c.enabledHours;if(!e)return c.enabledHours=!1,F(),f;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(c.enabledHours=Q(e),c.disabledHours=!1,c.useCurrent&&!c.keepInvalid){for(var t=0;!I(u,"h");){if(u.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}R(u)}return F(),f},f.viewDate=function(e){if(0===arguments.length)return d.clone();if(!e)return d=u.clone(),f;if(!("string"==typeof e||J.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return d=W(e),N(),f},o.is("input"))n=o;else if(0===(n=o.find(c.datepickerInput)).length)n=o.find("input");else if(!n.is("input"))throw new Error('CSS class "'+c.datepickerInput+'" cannot be applied to non input element');if(o.hasClass("input-group")&&(m=0===o.find(".datepickerbutton").length?o.find(".input-group-addon"):o.find(".datepickerbutton")),!c.inline&&!n.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return u=T(),d=u.clone(),K.extend(!0,c,(h={},(l=o.is("input")||c.inline?o.data():o.find("input").data()).dateOptions&&l.dateOptions instanceof Object&&(h=K.extend(!0,h,l.dateOptions)),K.each(c,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==l[t]&&(h[e]=l[t])}),h)),f.options(c),Z(),n.on({change:V,blur:c.debug?"":H,keydown:U,keyup:G,focus:c.allowInputToggle?B:""}),o.is("input")?n.on({focus:B}):m&&(m.on("click",q),m.on("mousedown",!1)),n.prop("disabled")&&f.disable(),n.is("input")&&0!==n.val().trim().length?R(W(n.val().trim())):c.defaultDate&&void 0===n.attr("placeholder")&&R(c.defaultDate),c.inline&&B(),f};return K.fn.datetimepicker=function(n){n=n||{};var t,i=Array.prototype.slice.call(arguments,1),r=!0;if("object"==typeof n)return this.each(function(){var e,t=K(this);t.data("DateTimePicker")||(e=K.extend(!0,{},K.fn.datetimepicker.defaults,n),t.data("DateTimePicker",o(t,e)))});if("string"==typeof n)return this.each(function(){var e=K(this).data("DateTimePicker");if(!e)throw new Error('bootstrap-datetimepicker("'+n+'") method was called on an element that is not using DateTimePicker');t=e[n].apply(e,i),r=t===e}),r||-1Expand',collapseBtnHTML:'',group:0,maxDepth:5,threshold:20};function r(e,t){this.w=d(f),this.el=d(e),this.options=d.extend({},n,t),this.init()}r.prototype={init:function(){var r=this;r.reset(),r.el.data("nestable-group",this.options.group),r.placeEl=d('
        '),d.each(this.el.find(r.options.itemNodeName),function(e,t){r.setParent(d(t))}),r.el.on("click","button",function(e){if(!r.dragEl){var t=d(e.currentTarget),n=t.data("action"),i=t.parent(r.options.itemNodeName);"collapse"===n&&r.collapseItem(i),"expand"===n&&r.expandItem(i)}});var e=function(e){var t=d(e.target);if(!t.hasClass(r.options.handleClass)){if(t.closest("."+r.options.noDragClass).length)return;t=t.closest("."+r.options.handleClass)}t.length&&!r.dragEl&&(r.isTouch=/^touch/.test(e.type),r.isTouch&&1!==e.touches.length||(e.preventDefault(),r.dragStart(e.touches?e.touches[0]:e)))},t=function(e){r.dragEl&&(e.preventDefault(),r.dragMove(e.touches?e.touches[0]:e))},n=function(e){r.dragEl&&(e.preventDefault(),r.dragStop(e.touches?e.touches[0]:e))};i&&(r.el[0].addEventListener("touchstart",e,!1),h.addEventListener("touchmove",t,!1),h.addEventListener("touchend",n,!1),h.addEventListener("touchcancel",n,!1)),r.el.on("mousedown",e),r.w.on("mousemove",t),r.w.on("mouseup",n)},serialize:function(){var o=this;return step=function(e,i){var r=[];return e.children(o.options.itemNodeName).each(function(){var e=d(this),t=d.extend({},e.data()),n=e.children(o.options.listNodeName);n.length&&(t.children=step(n,i+1)),r.push(t)}),r},step(o.el.find(o.options.listNodeName).first(),0)},serialise:function(){return this.serialize()},reset:function(){this.mouse={offsetX:0,offsetY:0,startX:0,startY:0,lastX:0,lastY:0,nowX:0,nowY:0,distX:0,distY:0,dirAx:0,dirX:0,dirY:0,lastDirX:0,lastDirY:0,distAxX:0,distAxY:0},this.isTouch=!1,this.moving=!1,this.dragEl=null,this.dragRootEl=null,this.dragDepth=0,this.hasNewRoot=!1,this.pointEl=null},expandItem:function(e){e.removeClass(this.options.collapsedClass),e.children('[data-action="expand"]').hide(),e.children('[data-action="collapse"]').show(),e.children(this.options.listNodeName).show()},collapseItem:function(e){e.children(this.options.listNodeName).length&&(e.addClass(this.options.collapsedClass),e.children('[data-action="collapse"]').hide(),e.children('[data-action="expand"]').show(),e.children(this.options.listNodeName).hide())},expandAll:function(){var e=this;e.el.find(e.options.itemNodeName).each(function(){e.expandItem(d(this))})},collapseAll:function(){var e=this;e.el.find(e.options.itemNodeName).each(function(){e.collapseItem(d(this))})},setParent:function(e){e.children(this.options.listNodeName).length&&(e.prepend(d(this.options.expandBtnHTML)),e.prepend(d(this.options.collapseBtnHTML))),e.children('[data-action="expand"]').hide()},unsetParent:function(e){e.removeClass(this.options.collapsedClass),e.children("[data-action]").remove(),e.children(this.options.listNodeName).remove()},dragStart:function(e){var t=this.mouse,n=d(e.target),i=n.closest(this.options.itemNodeName);this.placeEl.css("height",i.height()),t.offsetX=void 0!==e.offsetX?e.offsetX:e.pageX-n.offset().left,t.offsetY=void 0!==e.offsetY?e.offsetY:e.pageY-n.offset().top,t.startX=t.lastX=e.pageX,t.startY=t.lastY=e.pageY,this.dragRootEl=this.el,this.dragEl=d(f.createElement(this.options.listNodeName)).addClass(this.options.listClass+" "+this.options.dragClass),this.dragEl.css("width",i.width()),i.after(this.placeEl),i[0].parentNode.removeChild(i[0]),i.appendTo(this.dragEl),d(f.body).append(this.dragEl),this.dragEl.css({left:e.pageX-t.offsetX,top:e.pageY-t.offsetY});var r,o,s=this.dragEl.find(this.options.itemNodeName);for(r=0;rthis.dragDepth&&(this.dragDepth=o)},dragStop:function(e){var t=this.dragEl.children(this.options.itemNodeName).first();t[0].parentNode.removeChild(t[0]),this.placeEl.replaceWith(t),this.dragEl.remove(),this.el.trigger("change"),this.hasNewRoot&&this.dragRootEl.trigger("change"),this.reset()},dragMove:function(e){var t,n,i,r=this.options,o=this.mouse;this.dragEl.css({left:e.pageX-o.offsetX,top:e.pageY-o.offsetY}),o.lastX=o.nowX,o.lastY=o.nowY,o.nowX=e.pageX,o.nowY=e.pageY,o.distX=o.nowX-o.lastX,o.distY=o.nowY-o.lastY,o.lastDirX=o.dirX,o.lastDirY=o.dirY,o.dirX=0===o.distX?0:0Math.abs(o.distY)?1:0;if(!o.moving)return o.dirAx=s,void(o.moving=!0);o.dirAx!==s?(o.distAxX=0,o.distAxY=0):(o.distAxX+=Math.abs(o.distX),0!==o.dirX&&o.dirX!==o.lastDirX&&(o.distAxX=0),o.distAxY+=Math.abs(o.distY),0!==o.dirY&&o.dirY!==o.lastDirY&&(o.distAxY=0)),o.dirAx=s,o.dirAx&&o.distAxX>=r.threshold&&(o.distAxX=0,i=this.placeEl.prev(r.itemNodeName),0").addClass(r.listClass)).append(this.placeEl),i.append(t),this.setParent(i)))),o.distX<0&&(this.placeEl.next(r.itemNodeName).length||(n=this.placeEl.parent(),this.placeEl.closest(r.itemNodeName).after(this.placeEl),n.children().length||this.unsetParent(n.parent()))));var a=!1;if(p||(this.dragEl[0].style.visibility="hidden"),this.pointEl=d(f.elementFromPoint(e.pageX-f.body.scrollLeft,e.pageY-(h.pageYOffset||f.documentElement.scrollTop))),p||(this.dragEl[0].style.visibility="visible"),this.pointEl.hasClass(r.handleClass)&&(this.pointEl=this.pointEl.parent(r.itemNodeName)),this.pointEl.hasClass(r.emptyClass))a=!0;else if(!this.pointEl.length||!this.pointEl.hasClass(r.itemClass))return;var l=this.pointEl.closest("."+r.rootClass),c=this.dragRootEl.data("nestable-id")!==l.data("nestable-id");if(!o.dirAx||c||a){if(c&&r.group!==l.data("nestable-group"))return;if(this.dragDepth-1+this.pointEl.parents(r.listNodeName).length>r.maxDepth)return;var u=e.pageY'),c&&(this.dragRootEl=l,this.hasNewRoot=this.el[0]!==this.dragRootEl[0])}}},d.fn.nestable=function(t){var n=this;return this.each(function(){var e=d(this).data("nestable");e?"string"==typeof t&&"function"==typeof e[t]&&(n=e[t]()):(d(this).data("nestable",new r(this,t)),d(this).data("nestable-id",(new Date).getTime()))}),n||this}}(window.jQuery||window.Zepto,window,document),function(){var e,n,i;n=window.jQuery,i=window,n.fn.autogrow=function(u){if(null==u&&(u={}),null==u.horizontal&&(u.horizontal=!0),null==u.vertical&&(u.vertical=!0),null==u.debugx&&(u.debugx=-1e4),null==u.debugy&&(u.debugy=-1e4),null==u.debugcolor&&(u.debugcolor="yellow"),null==u.flickering&&(u.flickering=!0),null==u.postGrowCallback&&(u.postGrowCallback=function(){}),null==u.verticalScrollbarWidth&&(u.verticalScrollbarWidth=e()),!1!==u.horizontal||!1!==u.vertical)return this.filter("textarea").each(function(){var r,o,e,s,a,l,t,c;if(!(r=n(this)).data("autogrow-enabled"))return r.data("autogrow-enabled"),a=r.height(),l=r.width(),s=1*r.css("lineHeight")||0,r.hasVerticalScrollBar=function(){return r[0].clientHeight
        ').css({position:"absolute",display:"inline-block","background-color":u.debugcolor,top:u.debugy,left:u.debugx,"max-width":r.css("max-width"),padding:r.css("padding"),fontSize:r.css("fontSize"),fontFamily:r.css("fontFamily"),fontWeight:r.css("fontWeight"),lineHeight:r.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),!1===u.horizontal?o.css({width:r.width()}):(e=r.css("font-size"),o.css("padding-right","+="+e),o.normalPaddingRight=o.css("padding-right")),c=this,t=function(e){var t,n,i;return n=c.value.replace(/&/g,"&").replace(//g,">").replace(/\n /g,"
         ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"
         ").replace(/\n/g,"
        ").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(c.value)&&(n+="
        ",!1===u.flickering&&(n+="
        ")),o.html(n),!0===u.vertical&&(t=Math.max(o.height()+s,a),r.height(t)),!0===u.horizontal&&(o.css("padding-right",o.normalPaddingRight),!1===u.vertical&&r.hasVerticalScrollBar()&&o.css("padding-right","+="+u.verticalScrollbarWidth+"px"),i=Math.max(o.outerWidth(),l),r.width(i)),u.postGrowCallback(r)},r.change(t).keyup(t).keydown(t),n(i).resize(t),t()})},e=function(){var e,t,n,i;return(e=document.createElement("p")).style.width="100%",e.style.height="200px",(t=document.createElement("div")).style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),n=e.offsetWidth,t.style.overflow="scroll",n===(i=e.offsetWidth)&&(i=t.clientWidth),document.body.removeChild(t),n-i}}.call(this),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var e=n.fn.select2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(f){var o,s,p,m,g={},v={},y={},b={},n=Object.prototype.hasOwnProperty,i=[].slice,w=/\.js$/;function x(e,t){return n.call(e,t)}function a(e,t){var n,i,r,o,s,a,l,c,u,d,h,f=t&&t.split("/"),p=y.map,m=p&&p["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&f&&(e=f.slice(0,f.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("select2/results",["jquery","./utils"],function(h,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=h('
          ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('
        • '),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});d.append(a),o.append(s),o.append(d)}else this.template(e,t);return h.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):rthis.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):h(t).append(r)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
            '),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('
          • ×
          • ')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×
            ');n.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;0=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):n.call(o,i,r)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()||i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('
          • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(p,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||p(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=p(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){p(this).data("select2-scroll-position",{x:p(this).scrollLeft(),y:p(this).scrollTop()})}),s.on(i,function(e){var t=p(this).data("select2-scroll-position");p(this).scrollTop(t.y)}),p(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),p(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=p(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ar.bottom+s,d={left:r.left,top:o.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();d.top-=f.top,d.left-=f.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-f.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},u}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(r,e,o,t){if(null==r.fn.select2){var s=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,i)}),-1'),this.element.appendChild(t)),(n=t.getElementsByTagName("span")[0])&&(null!=n.textContent?n.textContent=this.options.dictFallbackMessage:null!=n.innerText&&(n.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,i;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),i=t.optWidth/t.optHeight,e.height'+this.options.dictRemoveFile+""),t.previewElement.appendChild(t._removeLink)),f=this,e=function(e){return e.preventDefault(),e.stopPropagation(),t.status===H.UPLOADING?H.confirm(f.options.dictCancelUploadConfirmation,function(){return f.removeFile(t)}):f.options.dictRemoveFileConfirmation?H.confirm(f.options.dictRemoveFileConfirmation,function(){return f.removeFile(t)}):f.removeFile(t)},h=[],o=0,l=(d=t.previewElement.querySelectorAll("[data-dz-remove]")).length;o\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n Check\n \n \n \n \n \n
            \n
            \n \n Error\n \n \n \n \n \n \n \n
            \n'},F=function(){var e,t,n,i,r,o,s;for(i=arguments[0],o=0,s=(n=2<=arguments.length?a.call(arguments,1):[]).length;o'+this.options.dictDefaultMessage+"")),this.clickableElements.length&&(a=this,(r=function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||1',this.options.dictFallbackText&&(n+="

            "+this.options.dictFallbackText+"

            "),n+='',t=H.createElement(n),"FORM"!==this.element.tagName?(i=H.createElement('
            ')).appendChild(t):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:t)},H.prototype.getExistingFallback=function(){var e,t,n,i,r,o;for(t=function(e){var t,n,i;for(n=0,i=e.length;n"+n+" "+i},H.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},H.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&((n=e.dataTransfer.items)&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},H.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),(t=e.clipboardData.items).length?this._addFilesFromItems(t):void 0},H.prototype.handleFiles=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;n1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):H.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)},H.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=H.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(n=this,function(e){return e?(t.accepted=!1,n._errorProcessing([t],e)):(t.accepted=!0,n.options.autoQueue&&n.enqueueFile(t)),n._updateMaxFilesReachedClass()}));var n},H.prototype.enqueueFiles=function(e){var t,n,i;for(n=0,i=e.length;n>1;return 0==(a=s/o)?1:a},h=function(e,t,n,i,r,o,s,a,l,c){var u;return u=d(t),e.drawImage(t,n,i,r,o,s,a,l,c/u)},e=function(t,n){var e,i,r,o,s,a,l,c,u;if(u=!(r=!1),i=t.document,c=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(e){if("readystatechange"!==e.type||"complete"===i.readyState)return("load"===e.type?t:i)[l](a+e.type,o,!1),!r&&(r=!0)?n.call(t,e.type||e):void 0},s=function(){try{c.doScroll("left")}catch(e){return e,void setTimeout(s,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{u=!t.frameElement}catch(e){}u&&s()}return i[e](a+"DOMContentLoaded",o,!1),i[e](a+"readystatechange",o,!1),t[e](a+"load",o,!1)}},s._autoDiscoverFunction=function(){if(s.autoDiscover)return s.discover()},e(window,s._autoDiscoverFunction)}.call(this),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SimpleMDE=e()}}(function(){return function o(s,a,l){function c(n,e){if(!a[n]){if(!s[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[n]={exports:{}};s[n][0].call(r.exports,function(e){var t=s[n][1][e];return c(t||e)},r,r.exports,o,s,a,l)}return a[n].exports}for(var u="function"==typeof require&&require,e=0;e>18&63]+c[s>>12&63]+c[s>>6&63]+c[63&s]);var s;return r.join("")}n.toByteArray=function(e){var t,n,i,r,o,s,a=e.length;if(0>16&255,s[l++]=r>>8&255,s[l++]=255&r;return 2==o?(r=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[l++]=255&r):1==o&&(r=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[l++]=r>>8&255,s[l++]=255&r),s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,r="",o=[],s=0,a=n-i;s>2],r+=c[t<<4&63],r+="=="):2==i&&(t=(e[n-2]<<8)+e[n-1],r+=c[t>>10],r+=c[t>>4&63],r+=c[t<<2&63],r+="="),o.push(r),o.join("")};var c=[],u=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array;!function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function c(e,t){if(d.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(i)return E(e).length;t=(""+t).toLowerCase(),i=!0}}function u(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function h(e,t,n,i){function r(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s/=o=2,a/=2,n/=2}for(var l=-1,c=0;n+c>>10&1023|55296),u=56320|1023&u),i.push(u),r+=d}return function(e){var t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);for(var n="",i=0;ie.length)throw new RangeError("Index out of range")}function k(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function C(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function S(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,i,r){return r||S(e,0,n,4),A.write(e,t,n,i,23,4),n+4}function _(e,t,n,i,r){return r||S(e,0,n,8),A.write(e,t,n,i,52,8),n+8}function E(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function D(e){return M.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(t,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,n,i){for(var r=0;r=t.length||r>=e.length);r++)t[r+n]=e[r];return r}var M=O("base64-js"),A=O("ieee754"),$=O("isarray");I.Buffer=d,I.SlowBuffer=function(e){return+e!=e&&(e=0),d.alloc(+e)},I.INSPECT_MAX_BYTES=50,d.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),I.kMaxLength=n(),d.poolSize=8192,d._augment=function(e){return e.__proto__=d.prototype,e},d.from=function(e,t,n){return i(null,e,t,n)},d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0})),d.alloc=function(e,t,n){return function(e,t,n,i){return o(t),t<=0?r(e,t):void 0!==n?"string"==typeof i?r(e,t).fill(n,i):r(e,t).fill(n):r(e,t)}(null,e,t,n)},d.allocUnsafe=function(e){return s(null,e)},d.allocUnsafeSlow=function(e){return s(null,e)},d.isBuffer=function(e){return!(null==e||!e._isBuffer)},d.compare=function(e,t){if(!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return y(this,t,n);case"utf8":case"utf-8":return f(this,t,n);case"ascii":return p(this,t,n);case"binary":return v(this,t,n);case"base64":return i=this,o=n,0===(r=t)&&o===i.length?M.fromByteArray(i):M.fromByteArray(i.slice(r,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}.apply(this,arguments)},d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){var e="",t=I.INSPECT_MAX_BYTES;return 0t&&(e+=" ... ")),""},d.prototype.compare=function(e,t,n,i,r){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(r<=i&&n<=t)return 0;if(r<=i)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(i,r),c=e.slice(t,n),u=0;u>=0,0===this.length)return-1;if(t>=this.length)return-1;if(t<0&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=d.from(e,n)),d.isBuffer(e))return 0===e.length?-1:h(this,e,t,n);if("number"==typeof e)return d.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):h(this,[e],t,n);throw new TypeError("val must be string, number or Buffer")},d.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},d.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r,o,s,a,l,c,u,d,h,f=this.length-t;if((void 0===n||fthis.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var p=!1;;)switch(i){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return d=t,h=n,L(E(e,(u=this).length-d),u,d,h);case"ascii":return g(this,e,t,n);case"binary":return g(this,e,t,n);case"base64":return a=this,l=t,c=n,L(D(e),a,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o=t,s=n,L(function(e,t){for(var n,i,r,o=[],s=0;s>8,r=n%256,o.push(r),o.push(i);return o}(e,(r=this).length-o),r,o,s);default:if(p)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),p=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;d.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):i>>8):k(this,e,t,!0),t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},d.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},d.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);x(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;0<=--o&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),d.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):k(this,e,t,!0),t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):k(this,e,t,!1),t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),d.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},d.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),0=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,m=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,g=/[*+-]\s/;f.commands.newlineAndIndentContinueMarkdownList=function(e){if(e.getOption("disableInput"))return f.Pass;for(var t=e.listSelections(),n=[],i=0;i")?c[2]:parseInt(c[3],10)+1+c[4];n[i]="\n"+u+h+d}}e.replaceSelections(n)}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],8:[function(e,t,n){(function(t){"use strict";t.overlayMode=function(n,i,r){return{startState:function(){return{base:t.startState(n),overlay:t.startState(i),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(e){return{base:t.copyState(n,e.base),overlay:t.copyState(i,e.overlay),basePos:e.basePos,baseCur:null,overlayPos:e.overlayPos,overlayCur:null}},token:function(e,t){return(e!=t.streamSeen||Math.min(t.basePos,t.overlayPos)=n.line,u=c?n:f(l,0),d=e.markText(a,u,{className:o});if(null==i?r.push(d):r.splice(i++,0,d),c)break;s=l}}function l(e){for(var t=e.state.markedSelection,n=0;nn.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)})}function m(e){var t=Ii(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1=s&&(o=li(t,ci(ii(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function b(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==xt(e))return!1;w(e)&&(yt(e),t.dims=A(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),$r&&(o=Mn(e.doc,o),s=An(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=mt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=mt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,bt(e,n)))),i.viewTo=n})(e,o,s),n.viewOffset=ci(ii(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=xt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi();return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);i=!1){L(e);var r=g(e);Te(e),s(e,r),D(e,r)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function E(e,t){var n=new S(e,t);if(T(e,n)){L(e),_(e,n);var i=g(e);Te(e),s(e,i),D(e,i),n.finish()}}function D(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pe(e)+"px"}function L(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;in?Nr(n,ii(e,n).text.length):function(e,t){var n=e.ch;return null==n||t=e.first&&t=t.ch:a.to>t.ch))){if(r&&(Lo(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c,u=l.find(i<0?1:-1);if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(u=Se(e,u,-i,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=Or(u,n))&&(i<0?c<0:0e.first?le(e,Nr(t.line-1)):null:0=e.display.viewTo||a.to().linet||t==n&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(t,n,"ltr")}(ui(i),l||0,null==c?f:c,function(e,t,n){var i,r,o,s=u(e,"left");if(e==t)r=o=(i=s).left;else{if(i=u(t-1,"right"),"rtl"==n){var a=s;s=i,i=a}r=s.left,o=i.right}null==l&&0==e&&(r=m),3h.bottom||i.bottom==h.bottom&&i.right>h.right)&&(h=i),r=l.display.viewTo)){var u=+new Date+l.options.workTime,d=io(c.mode,$e(l,c.frontier)),h=[];c.iter(c.frontier,Math.min(c.first+c.size,l.display.viewTo+500),function(e){if(c.frontier>=l.display.viewFrom){var t=e.styles,n=e.text.length>l.options.maxHighlightLength,i=Wn(l,e,n?io(c.mode,d):d,!0);e.styles=i.styles;var r=e.styleClasses,o=i.classes;o?e.styleClasses=o:r&&(e.styleClasses=null);for(var s=!t||t.length!=e.styles.length||r!=o&&(!r||!o||r.bgClass!=o.bgClass||r.textClass!=o.textClass),a=0;!s&&au?(Me(l,l.options.workDelay),!0):void 0}),h.length&&ut(l,function(){for(var e=0;er.first&&ii(r,s-1).stateAfter;return a=a?io(r.mode,a):ro(r.mode),r.iter(s,i,function(e){Yn(n,e.text,a);var t=s==i-1||s%5==0||s>=o.viewFrom&&sn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function je(e,t,n,i){return Ye(e,ze(e,t),n,i)}function We(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(r=(o=c-l)-1,c<=t&&(s="right")),null!=r){if(i=e[a+2],l==c&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)i=e[2+(a-=3)],s="left";if("right"==n&&r==c-l)for(;an.from?l(e-1):l(e,i)}o=o||ii(i.doc,e.line),s||(s=ze(i,o));var c=ui(o),n=e.ch;if(!c)return l(n);var u=t(n,or(c,n));return null!=is&&(u.other=t(n,is)),u}function et(e,t){var n=0;t=le(e.doc,t);e.options.lineWrapping||(n=ot(e.display)*t.ch);var i=ii(e.doc,t.line),r=ci(i)+Ne(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function tt(e,t,n,i){var r=Nr(e,t);return r.xRel=i,n&&(r.outside=!0),r}function nt(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return tt(i.first,0,!0,-1);var r=li(i,n),o=i.first+i.size-1;if(oc.from.ch||a.ch==c.from.ch&&0t.bottom?t.left-l:s=o.viewTo)||o.maxLineChanged&&r.options.lineWrapping,i.update=i.mustUpdate&&new S(r,i.mustUpdate&&{top:i.scrollTop,ensure:i.scrollToPos},i.forceUpdate);var i,r,o;for(var n=0;n(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!kr){var o=Bi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ne(e.display))+"px; height: "+(t.bottom-t.top+Pe(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}(t,r)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;at)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)$r&&Mn(e.doc,t)r.viewFrom?yt(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)yt(e);else if(t<=r.viewFrom){(o=wt(e,n,n+i,1))?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yt(e)}else if(n>=r.viewTo){var o;(o=wt(e,t,t,-1))?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):yt(e)}else{var s=wt(e,t,t,-1),a=wt(e,n,n+i,1);s&&a?(r.view=r.view.slice(0,s.index).concat(mt(e,s.lineN,a.lineN)).concat(r.view.slice(a.index)),r.viewTo+=i):yt(e)}var l=r.externalMeasured;l&&(n=r.lineN&&t=i.viewTo)){var o=i.view[bt(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Ii(s,n)&&s.push(n)}}}function yt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function bt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;ir-400&&0==Or(Rr.pos,n)?i="triple":Fr&&Fr.time>r-400&&0==Or(Fr.pos,n)?(i="double",Rr={time:r,pos:n}):(i="single",Fr={time:r,pos:n});var o,s=e.doc.sel,a=Tr?t.metaKey:t.ctrlKey;e.options.dragDrop&&Zo&&!e.isReadOnly()&&"single"==i&&-1<(o=s.contains(n))&&(Or((o=s.ranges[o]).from(),n)<0||0u&&t.push(new re(Nr(a,u),Nr(a,Fo(c,s,n))))}t.length||t.push(new re(g,g)),ve(y,oe(x.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),m.scrollIntoView(e)}else{var d=b,h=d.anchor,f=e;if("single"!=v){if("double"==v)var p=m.findWordAt(e);else var p=new re(Nr(e.line,0),le(y,Nr(e.line+1,0)));h=0=i.to||n.linel.bottom?20:0;r&&setTimeout(dt(m,function(){c==t&&(s.scroller.scrollTop+=r,o(e))}),50)}}function n(e){m.state.selectingText=!1,c=1/0,Co(e),s.input.focus(),Do(document,"mousemove",u),Do(document,"mouseup",d),y.history.lastSelOrigin=null}var s=m.display,y=m.doc;Co(e);var b,w,x=y.sel,i=x.ranges;if(t&&!e.shiftKey?(w=y.sel.contains(g),b=-1=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Co(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Mi(e,n))return ki(t);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=li(e.doc,o),d=e.options.gutters[l];return Lo(e,n,e,u,d,t),ki(t)}}}function Et(e,t){return _t(e,t,"gutterClick",!0)}function Dt(e){var r=this;if(Lt(r),!Di(r,e)&&!Ct(r.display,e)){Co(e),pr&&(zr=+new Date);var o=St(r,e,!0),t=e.dataTransfer.files;if(o&&!r.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var s=t.length,a=Array(s),l=0,n=function(e,n){if(!r.options.allowDropFileTypes||-1!=Ii(r.options.allowDropFileTypes,e.type)){var i=new FileReader;i.onload=dt(r,function(){var e=i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),a[n]=e,++l==s){var t={from:o=le(r.doc,o),to:o,text:r.doc.splitLines(a.join(r.doc.lineSeparator())),origin:"paste"};Ut(r.doc,t),ge(r.doc,se(o,Vr(t)))}}),i.readAsText(e)}},i=0;is.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Tr&&gr)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var d=0;de.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Nr(o,ii(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ri(e,t.from,t.to),n||(n=Yt(e,t)),e.cm?function(e,t,n){var i=e.doc,r=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=ai(Ln(ii(i,o.line))),i.iter(l,s.line+1,function(e){return e==r.maxLine?a=!0:void 0})),-1r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),Me(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?gt(e):o.line!=s.line||1!=t.text.length||Zn(e.doc,t)?gt(e,o.line,s.line+1,c):vt(e,o.line,"text");var u=Mi(e,"changes"),d=Mi(e,"change");if(d||u){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&_i(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,i):Kn(e,t,i),ye(e,n,No)}}function Zt(e,t,n,i,r){if(i||(i=n),Or(i,n)<0){var o=i;i=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Ut(e,{from:n,to:i,text:t,origin:r})}function Kt(e,t,n,i,r){var o=e.display,s=rt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Re(e),c={};lo.first?Po(ii(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)h+=s,d+="\t";if(h=n.first+n.size)&&(c=ii(n,s=e))}())return!1;a=r?(i<0?nr:tr)(c):i<0?c.text.length:0}else a=t;return!0}var s=e.line,a=e.ch,l=i,c=ii(n,s);if("char"==t)o();else if("column"==t)o(!0);else if("word"==t||"group"==t)for(var u=null,d="group"==t,h=n.cm&&n.cm.getHelper(e,"wordChars"),f=!0;!(i<0)||o(!f);f=!1){var p=c.text.charAt(a)||"\n",m=Wi(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||m||(m="s"),u&&u!=m){i<0&&(i=1,o());break}if(m&&(u=m),0=o.height){l.hitSide=!0;break}r+=5*n}return l}function ln(e,t,i,n){l.defaults[e]=t,i&&(Qr[e]=n?function(e,t,n){n!=Zr&&i(e,t,n)}:i)}function cn(e){for(var t,n,i,r,o=e.split(/-(?!$)/),s=(e=o[o.length-1],0);s=t:o.to>t);(i||(i=[])).push(new pn(s,o.from,a?null:o.to))}}return i}(n,r,s),l=function(e,t,n){if(e)for(var i,r=0;r=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.frome.lastLine())return t;var n,i=ii(e,t);if(!$n(e,i))return t;for(;n=En(i);)i=n.find(1,!0).line;return ai(i)+1}function $n(e,t){var n=$r&&t.markedSpans;if(n)for(var i,r=0;rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Hn(e,t,n,i){function r(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?io(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=le(s,t);var l,c=ii(s,t.line),u=$e(e,t.line,n),d=new uo(c.text,e.options.tabSize);for(i&&(l=[]);(i||d.pose.options.maxHighlightLength?(a=!1,s&&Yn(e,t,i,d.pos),d.pos=t.length,null):Pn(Rn(n,d,i,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;ce.options.maxHighlightLength?io(e.doc.mode,i):i);t.stateAfter=i,t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Yn(e,t,n,i){var r=e.doc.mode,o=new uo(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&Fn(r,n);!o.eol();)Rn(r,o,n),o.start=o.pos}function Bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yo:vo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function qn(e,t){var n=Bi("span",null,null,gr?"padding-right: .1px":null),i={pre:Bi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(pr||gr)&&e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,s=r?t.rest[r-1]:t.line;i.pos=0,i.addToken=Un,Ki(e.display.measure)&&(o=ui(s))&&(i.addToken=Vn(i.addToken,o)),i.map=[],Qn(s,i,zn(e,s,t!=e.display.externalMeasured&&ai(s))),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=Xi(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=Xi(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Zi(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(gr){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Lo(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=Xi(i.pre.className,i.textClass||"")),i}function Un(e,t,n,i,r,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Gn):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),d=0;;){l.lastIndex=d;var h=l.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(a.slice(d,d+f));pr&&mr<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=1+f,"\t"==h[0]){var m=e.cm.options.tabSize,g=m-e.col%m;(p=u.appendChild(Bi("span",Ni(g),"cm-tab"))).setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=g}else if("\r"==h[0]||"\n"==h[0]){(p=u.appendChild(Bi("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1}else{(p=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),pr&&mr<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),pr&&mr<9&&(c=!0),e.pos+=t.length}if(n||i||r||c||s){var v=n||"";i&&(v+=i),r&&(v+=r);var y=Bi("span",[u],v,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Gn(e){for(var t=" ",n=0;na&&u.from<=a)break}if(u.to>=l)return d(e,t,n,i,r,o,s);d(e,t.slice(0,u.to-a),n,i,null,o,s),i=null,t=t.slice(u.to-a),a=u.to}}}function Xn(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t}function Qn(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,c,u,d,h,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=d=a="",h=null,v=1/0;for(var y,b=[],w=0;wp||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||Sn(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(w=0;w=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(ts-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(fi(e.done),Oi(e.done)):e.done.length&&!Oi(e.done).ranges?Oi(e.done):1r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||Lo(e,"historyAdded")}function mi(e,t){var n=Oi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function gi(t,n,e,i){var r=n["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,i),function(e){e.markedSpans&&((r||(r=n["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function vi(e){if(!e)return null;for(var t,n=0;nt)return i;if(r.from==t||r.to==t){if(null!=n)return o=e,s=r.level,a=e[n].level,void 0,l=o[0].level,s==l||a!=l&&ss.from&&ae.text.length?null:r}var cr=navigator.userAgent,ur=navigator.platform,dr=/gecko\/\d/i.test(cr),hr=/MSIE \d/.test(cr),fr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cr),pr=hr||fr,mr=pr&&(hr?document.documentMode||6:fr[1]),gr=/WebKit\//.test(cr),vr=gr&&/Qt\/\d+\.\d+/.test(cr),yr=/Chrome\//.test(cr),br=/Opera\//.test(cr),wr=/Apple Computer/.test(navigator.vendor),xr=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(cr),kr=/PhantomJS/.test(cr),Cr=/AppleWebKit/.test(cr)&&/Mobile\/\w+/.test(cr),Sr=Cr||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(cr),Tr=Cr||/Mac/.test(ur),_r=/\bCrOS\b/.test(cr),Er=/win/i.test(ur),Dr=br&&cr.match(/Version\/(\d*\.\d*)/);Dr&&(Dr=Number(Dr[1])),Dr&&15<=Dr&&(gr=!(br=!1));var Lr=Tr&&(vr||br&&(null==Dr||Dr<12.11)),Mr=dr||pr&&9<=mr,Ar=!1,$r=!1;e.prototype=Hi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0n.viewTo-1)return!1;if(r.line==n.viewFrom||0==(e=bt(t,r.line)))var s=ai(n.view[0].line),a=n.view[0].node;else s=ai(n.view[e].line),a=n.view[e-1].node.nextSibling;var l=bt(t,o.line);if(l==n.view.length-1)var c=n.viewTo-1,u=n.lineDiv.lastChild;else c=ai(n.view[l+1].line)-1,u=n.view[l+1].node.previousSibling;for(var d=t.doc.splitLines(function(a,e,t,l,c){function u(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(null!=t)return""==t&&(t=e.textContent.replace(/\u200b/g,"")),void(d+=t);var n,i=e.getAttribute("cm-marker");if(i){var r=a.findMarks(Nr(l,0),Nr(c+1,0),function(t){return function(e){return e.id==t}}(+i));return void(r.length&&(n=r[0].find())&&(d+=ri(a.doc,n.from,n.to).join(f)))}if("false"==e.getAttribute("contenteditable"))return;for(var o=0;on&&(nn(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&en(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&function(e,t,n,i,r){var o=Kt(e,t,n,i,r);null!=o.scrollTop&&Mt(e,o.scrollTop),null!=o.scrollLeft&&At(e,o.scrollLeft)}(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:ht(Pt),triggerOnKeyPress:ht(Rt),triggerOnKeyUp:Ft,execCommand:function(e){return oo.hasOwnProperty(e)?oo[e].call(null,this):void 0},triggerElectric:ht(function(e){G(this,e)}),findPosH:function(e,t,n,i){var r=1;t<0&&(r=-1,t=-t);for(var o=0,s=le(this.doc,e);os.doc.first){var o=ii(s.doc,i.line-1).text;o&&s.replaceRange(r.charAt(0)+s.doc.lineSeparator()+o.charAt(o.length-1),Nr(i.line-1,o.length-1),Nr(i.line,1),"+transpose")}t.push(new re(i,i))}s.setSelections(t)})},newlineAndIndent:function(i){ut(i,function(){for(var e=i.listSelections().length,t=0;t=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return-1e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&>(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&we(e.doc)),e&&_i(e,"markerCleared",e,this),t&&at(e),this.parent&&this.parent.clear()}},fo.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;r=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(r,o,s){r=le(this,r),o=le(this,o);var a=[],l=r.line;return this.iter(r.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var n=0;n=i.to||null==i.from&&l!=r.line||null!=i.from&&l==o.line&&i.from>=o.ch||s&&!s(i.marker)||a.push(i.marker.parent||i.marker)}++l}),a},getAllMarks:function(){var i=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var n=0;nt&&(t=e.from),null!=e.to&&e.to]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;s.defineMode("gfm",function(e,r){var o=0,t={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,t){if(t.combineTokens=null,t.codeBlock)return e.match(/^```+/)?t.codeBlock=!1:e.skipToEnd(),null;if(e.sol()&&(t.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),t.codeBlock=!0,null;if("`"===e.peek()){e.next();var n=e.pos;e.eatWhile("`");var i=1+e.pos-n;return t.code?i===o&&(t.code=!1):(o=i,t.code=!0),null}if(t.code)return e.next(),null;if(e.eatSpace())return t.ateSpace=!0,null;if((e.sol()||t.ateSpace)&&(t.ateSpace=!1)!==r.gitHubSpice){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return t.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return t.combineTokens=!0,"link"}return e.match(a)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(t.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},n={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var i in r)n[i]=r[i];return n.name="markdown",s.overlayMode(s.getMode(e,n),t)},"markdown"),s.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror"),e("../markdown/markdown"),e("../../addon/mode/overlay")):i(CodeMirror)},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(e,t,n){var i;i=function(A){"use strict";A.defineMode("markdown",function(a,v){function l(e,t,n){return t.f=t.inline=n,n(e,t)}function c(e){return!e||!/\S/.test(e.string)}function r(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,f&&e.f==y&&(e.f=s,e.block=o),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null}function o(e,t){var n=e.sol(),i=!1!==t.list,r=t.indentedCode;t.indentedCode=!1,i&&(0<=t.indentationDiff?(t.indentationDiff<4&&(t.indentation-=t.indentationDiff),t.list=null):0"))return t.quote=n?1:t.quote+1,v.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),b(t);if("["===e.peek())return l(e,t,d);if(e.match(p,!0))return t.hr=!0,C.hr;if(!c(t.prevLine)&&!i||!e.match(m,!1)&&!e.match(g,!1))return v.fencedCodeBlocks&&(o=e.match(D,!0))?(t.fencedChars=o[1],t.localMode=function(e){if(A.findModeByName){var t=A.findModeByName(e);t&&(e=t.mime||t.mimes[0])}var n=A.getMode(a,e);return"null"==n.name?null:n}(o[2]),t.localMode&&(t.localState=A.startState(t.localMode)),t.f=t.block=u,v.highlightFormatting&&(t.formatting="code-block"),t.code=-1,b(t)):l(e,t,t.inline);var s=null;for(s=e.match(m,!0)?"ul":(e.match(g,!0),"ol"),t.indentation=e.column()+e.current().length,t.list=!0;t.listStack&&e.column()"))&&(t.f=s,t.block=o,t.htmlState=null)}return n}function u(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=n,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),C.code)}function n(e,t){e.match(t.fencedChars),t.block=o,t.f=s,t.fencedChars=null,v.highlightFormatting&&(t.formatting="code-block"),t.code=1;var n=b(t);return t.code=0,n}function b(e){var t=[];if(e.formatting){t.push(C.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n=e.quote?t.push(C.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(C.linkHref,"url"):(e.strong&&t.push(C.strong),e.em&&t.push(C.em),e.strikethrough&&t.push(C.strikethrough),e.linkText&&t.push(C.linkText),e.code&&t.push(C.code)),e.header&&t.push(C.header,C.header+"-"+e.header),e.quote&&(t.push(C.quote),!v.maxBlockquoteDepth||v.maxBlockquoteDepth>=e.quote?t.push(C.quote+"-"+e.quote):t.push(C.quote+"-"+v.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1==i?t.push(C.list2):t.push(C.list3):t.push(C.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function e(e,t){return e.match(E,!0)?b(t):void 0}function s(e,t){var n=t.text(e,t);if(void 0!==n)return n;if(t.list)return t.list=null,b(t);if(t.taskList)return"x"!==e.match(S,!0)[1]?t.taskOpen=!0:t.taskClosed=!0,v.highlightFormatting&&(t.formatting="task"),t.taskList=!1,b(t);if(t.taskOpen=!1,t.taskClosed=!1,t.header&&e.match(/^#+$/,!0))return v.highlightFormatting&&(t.formatting="header"),b(t);var i=e.sol(),r=e.next();if(t.linkTitle){t.linkTitle=!1;var o=r;"("===r&&(o=")");var s="^\\s*(?:[^"+(o=(o+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+o;if(e.match(new RegExp(s),!0))return C.linkHref}if("`"===r){var a=t.formatting;v.highlightFormatting&&(t.formatting="code"),e.eatWhile("`");var l=e.current().length;if(0==t.code)return t.code=l,b(t);if(l!=t.code)return t.formatting=a,b(t);var c=b(t);return t.code=0,c}if(t.code)return b(t);if("\\"===r&&(e.next(),v.highlightFormatting)){var u=b(t),d=C.formatting+"-escape";return u?u+" "+d:d}if("!"===r&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),t.inline=t.f=x,C.image;if("["===r&&e.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return t.linkText=!0,v.highlightFormatting&&(t.formatting="link"),b(t);if("]"===r&&t.linkText&&e.match(/\(.*?\)| ?\[.*?\]/,!1)){v.highlightFormatting&&(t.formatting="link");var u=b(t);return t.linkText=!1,t.inline=t.f=x,u}if("<"===r&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=w,v.highlightFormatting&&(t.formatting="link"),(u=b(t))?u+=" ":u="",u+C.linkInline;if("<"===r&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=w,v.highlightFormatting&&(t.formatting="link"),(u=b(t))?u+=" ":u="",u+C.linkEmail;if("<"===r&&e.match(/^(!--|\w)/,!1)){var h=e.string.indexOf(">",e.pos);if(-1!=h){var f=e.string.substring(e.start,h);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(f)&&(t.md_inside=!0)}return e.backUp(1),t.htmlState=A.startState(k),function(e,t,n){return t.f=t.block=n,n(e,t)}(e,t,y)}if("<"===r&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";var p=!1;if(!v.underscoresBreakWords&&"_"===r&&"_"!==e.peek()&&e.match(/(\w)/,!1)){var m=e.pos-2;if(0<=m){var g=e.string.charAt(m);"_"!==g&&g.match(/(\w)/,!1)&&(p=!0)}}if("*"===r||"_"===r&&!p)if(i&&" "===e.peek());else{if(t.strong===r&&e.eat(r)){v.highlightFormatting&&(t.formatting="strong");c=b(t);return t.strong=!1,c}if(!t.strong&&e.eat(r))return t.strong=r,v.highlightFormatting&&(t.formatting="strong"),b(t);if(t.em===r){v.highlightFormatting&&(t.formatting="em");c=b(t);return t.em=!1,c}if(!t.em)return t.em=r,v.highlightFormatting&&(t.formatting="em"),b(t)}else if(" "===r&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return b(t);e.backUp(1)}if(v.strikethrough)if("~"===r&&e.eatWhile(r)){if(t.strikethrough){v.highlightFormatting&&(t.formatting="strikethrough");c=b(t);return t.strikethrough=!1,c}if(e.match(/^[^\s]/,!1))return t.strikethrough=!0,v.highlightFormatting&&(t.formatting="strikethrough"),b(t)}else if(" "===r&&e.match(/^~~/,!0)){if(" "===e.peek())return b(t);e.backUp(2)}return" "===r&&(e.match(/ +$/,!1)?t.trailingSpace++:t.trailingSpace&&(t.trailingSpaceNewLine=!0)),b(t)}function w(e,t){if(">"!==e.next())return e.match(/^[^>]+/,!0),C.linkInline;t.f=t.inline=s,v.highlightFormatting&&(t.formatting="link");var n=b(t);return n?n+=" ":n="",n+C.linkInline}function x(e,t){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(t.f=t.inline=function(r){return function(e,t){var n=e.next();if(n!==r)return e.match(L[r]),t.linkHref=!0,b(t);t.f=t.inline=s,v.highlightFormatting&&(t.formatting="link-string");var i=b(t);return t.linkHref=!1,i}}("("===n?")":"]"),v.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,b(t)):"error"}function d(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=i,e.next(),v.highlightFormatting&&(t.formatting="link"),t.linkText=!0,b(t)):l(e,t,s)}function i(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=h,v.highlightFormatting&&(t.formatting="link");var n=b(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function h(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=s,C.linkHref+" url")}var k=A.getMode(a,"text/html"),f="null"==k.name;void 0===v.highlightFormatting&&(v.highlightFormatting=!1),void 0===v.maxBlockquoteDepth&&(v.maxBlockquoteDepth=0),void 0===v.underscoresBreakWords&&(v.underscoresBreakWords=!0),void 0===v.taskLists&&(v.taskLists=!1),void 0===v.strikethrough&&(v.strikethrough=!1),void 0===v.tokenTypeOverrides&&(v.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var t in C)C.hasOwnProperty(t)&&v.tokenTypeOverrides[t]&&(C[t]=v.tokenTypeOverrides[t]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,m=/^[*\-+]\s+/,g=/^[0-9]+([.)])\s+/,S=/^\[(x| )\](?=\s)/,T=v.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,_=/^ *(?:\={1,}|-{1,})\s*$/,E=/^[^#!\[\]*_\\<>` "'(~]+/,D=new RegExp("^("+(!0===v.fencedCodeBlocks?"~~~+|```+":v.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},M={startState:function(){return{f:o,prevLine:null,thisLine:null,block:o,htmlState:null,indentation:0,inline:s,text:e,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&A.copyState(k,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?A.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,header:e.header,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedChars:e.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(r(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var i=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(i-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,0")):null:t.match("--")?e(r("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function i(r){return function(e,t){for(var n;null!=(n=e.next());){if("<"==n)return t.tokenize=i(r+1),t.tokenize(e,t);if(">"==n){if(1!=r)return t.tokenize=i(r-1),t.tokenize(e,t);t.tokenize=s;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),n.tokenize=r("meta","?>"),"meta"):(y=t.eat("/")?"closeTag":"openTag",n.tokenize=a,"tag bracket"):"&"!=i?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=s,y=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return y="equals",null;if("<"!=n)return/[\'\"]/.test(n)?(t.tokenize=function(n){var e=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=a;break}return"string"};return e.isInAttribute=!0,e}(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=s,t.state=u,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}function r(n,i){return function(e,t){for(;!e.eol();){if(e.match(i)){t.tokenize=s;break}e.next()}return n}}function o(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function l(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!x.contextGrabbers.hasOwnProperty(n)||!x.contextGrabbers[n].hasOwnProperty(t))return;l(e)}}function u(e,t,n){return"openTag"==e?(n.tagStart=t.column(),i):"closeTag"==e?d:u}function i(e,t,n){return"word"==e?(n.tagName=t.current(),b="tag",p):(b="error",i)}function d(e,t,n){if("word"!=e)return b="error",f;var i=t.current();return n.context&&n.context.tagName!=i&&x.implicitlyClosed.hasOwnProperty(n.context.tagName)&&l(n),n.context&&n.context.tagName==i||!1===x.matchClosing?(b="tag",h):(b="tag error",f)}function h(e,t,n){return"endTag"!=e?(b="error",h):(l(n),u)}function f(e,t,n){return b="error",h(e,0,n)}function p(e,t,n){if("word"==e)return b="attribute",m;if("endTag"!=e&&"selfcloseTag"!=e)return b="error",p;var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(i)?c(n,i):(c(n,i),n.context=new o(n,i,r==n.indented)),u}function m(e,t,n){return"equals"==e?g:(x.allowMissing||(b="error"),p(e,0,n))}function g(e,t,n){return"string"==e?v:"word"==e&&x.allowUnquoted?(b="string",p):(b="error",p(e,0,n))}function v(e,t,n){return"string"==e?v:p(e,0,n)}var y,b,w=e.indentUnit,x={},n=t.htmlMode?S:T;for(var k in n)x[k]=n[k];for(var k in t)x[k]=t[k];return s.isInText=!0,{startState:function(e){var t={tokenize:s,state:u,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;y=null;var n=t.tokenize(e,t);return(n||y)&&"comment"!=n&&(b=null,t.state=t.state(y||n,e,t),b&&(n="error"==b?n+" error":b)),n},indent:function(e,t,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+w;if(i&&i.noIndent)return C.Pass;if(e.tokenize!=a&&e.tokenize!=s)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==x.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(e){e.state==g&&(e.state=p)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,u=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;0>=-u,u+=i;0>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(t+=1<=s+d?h/l:h*Math.pow(2,1-d))*l&&(s++,l/=2),u<=s+d?(a=0,s=u):1<=s+d?(a=(t*l-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));8<=r;e[n+f]=255&a,f+=p,a/=256,r-=8);for(s=s</g,">").replace(/"/g,""").replace(/'/g,"'")}function e(i,r){return i=i.source,r=r||"",function e(t,n){return t?(n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),i=i.replace(t,n),e):new RegExp(i,r)}}function t(){}function d(e){for(var t,n,i=1;iAn error occured:

            "+u(e.message+"",!0)+"
            ";throw e}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:t,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:t,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:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:t,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/,bullet:/(?:[*+-]|\d+\.)/,item:/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/};f.item=e(f.item,"gm")(/bull/g,f.bullet)(),f.list=e(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=e(f.blockquote)("def",f.def)(),f._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",f.html=e(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=e(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=d({},f),f.gfm=d({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=e(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=d({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),l.rules=f,l.lex=function(e,t){return new l(t).lex(e)},l.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)},l.prototype.token=function(e,t,n){var i,r,o,s,a,l,c,u,d;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),1 ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:1])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:t,tag:/^|^<\/?\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:t,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/};r.link=e(r.link)("inside",r._inside)("href",r._href)(),r.reflink=e(r.reflink)("inside",r._inside)(),r.normal=d({},r),r.pedantic=d({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),r.gfm=d({},r.normal,{escape:e(r.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:e(r.text)("]|","~]|")("|","|https?://|")()}),r.breaks=d({},r.gfm,{br:e(r.br)("{2,}","*")(),text:e(r.gfm.text)("{2,}","*")()}),i.rules=r,i.output=function(e,t,n){return new i(t,n).output(e)},i.prototype.output=function(e){for(var t,n,i,r,o="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),i="@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),this.mangle("mailto:")+n):n=u(r[1]),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):u(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),o+=this.renderer.codespan(u(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),o+=this.renderer.text(u(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),i=n=u(r[1]),o+=this.renderer.link(i,null,n);return o},i.prototype.outputLink=function(e,t){var n=u(t.href),i=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,u(e[1]))},i.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},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r'+(n?e:u(e,!0))+"\n\n":"
            "+(n?e:u(e,!0))+"\n
            "},n.prototype.blockquote=function(e){return"
            \n"+e+"
            \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
            \n":"
            \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
          • "+e+"
          • \n"},n.prototype.paragraph=function(e){return"

            "+e+"

            \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
            \n"},n.prototype.tablerow=function(e){return"