lujanfernaud/prevy

View on GitHub
public/assets/application-236a7ce1734fbb55d484f6212c0e0870483d47985dc385227878eba72bb6843b.js

Summary

Maintainability
A
0 mins
Test Coverage
(function(){var t=this;(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(t);var e=t.Rails;(function(){(function(){var t,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,e.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},t="_ujsData",e.getData=function(e,n){var i;return null!=(i=e[t])?i[n]:void 0},e.setData=function(e,n,i){return null==e[t]&&(e[t]={}),e[t][n]=i},e.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}).call(this),function(){var t,n,i;t=e.$,i=e.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},n=e.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},e.CSRFProtection=function(t){var e;if(null!=(e=i()))return t.setRequestHeader("X-CSRF-Token",e)},e.refreshCSRFTokens=function(){var e,o;if(o=i(),e=n(),null!=o&&null!=e)return t('form input[name="'+e+'"]').forEach(function(t){return t.value=o})}}.call(this),function(){var t,n,i;i=e.matches,"function"!=typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype),n=e.fire=function(e,n,i){var o;return o=new t(n,{bubbles:!0,cancelable:!0,detail:i}),e.dispatchEvent(o),!o.defaultPrevented},e.stopEverything=function(t){return n(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},e.delegate=function(t,e,n,o){return t.addEventListener(n,function(t){var n;for(n=t.target;n instanceof Element&&!i(n,e);)n=n.parentNode;if(n instanceof Element&&!1===o.call(n,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var t,n,i,o,r;n=e.CSRFProtection,e.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},e.ajax=function(t){var e;return t=o(t),e=i(t,function(){var n;return n=r(e.response,e.getResponseHeader("Content-Type")),2===Math.floor(e.status/100)?"function"==typeof t.success&&t.success(n,e.statusText,e):"function"==typeof t.error&&t.error(n,e.statusText,e),"function"==typeof t.complete?t.complete(e,e.statusText):void 0}),!("function"!=typeof t.beforeSend||!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)},o=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},i=function(t,e){var i;return(i=new XMLHttpRequest).open(t.type,t.url,!0),i.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),n(i),i.withCredentials=!!t.withCredentials,i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)return e(i)},i},r=function(t,e){var n,i;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(o){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(o){}}return t},e.href=function(t){return t.href},e.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return i,!0}}}.call(this),function(){var t,n;t=e.matches,n=function(t){return Array.prototype.slice.call(t)},e.serializeElement=function(e,i){var o,r;return o=[e],t(e,"form")&&(o=n(e.elements)),r=[],o.forEach(function(e){if(e.name&&!e.disabled)return t(e,"select")?n(e.options).forEach(function(t){if(t.selected)return r.push({name:e.name,value:t.value})}):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?r.push({name:e.name,value:e.value}):void 0}),i&&r.push(i),r.map(function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t}).join("&")},e.formElements=function(e,i){return t(e,"form")?n(e.elements).filter(function(e){return t(e,i)}):n(e.querySelectorAll(i))}}.call(this),function(){var t,n,i;n=e.fire,i=e.stopEverything,e.handleConfirm=function(e){if(!t(this))return i(e)},t=function(t){var e,i,o;if(!(o=t.getAttribute("data-confirm")))return!0;if(e=!1,n(t,"confirm")){try{e=confirm(o)}catch(r){}i=n(t,"confirm:complete",[e])}return e&&i}}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h;l=e.matches,u=e.getData,c=e.setData,h=e.stopEverything,a=e.formElements,e.handleDisabledElement=function(t){if(this.disabled)return h(t)},e.enableElement=function(t){var n;return n=t instanceof Event?t.target:t,l(n,e.linkDisableSelector)?s(n):l(n,e.buttonDisableSelector)||l(n,e.formEnableSelector)?o(n):l(n,e.formSubmitSelector)?r(n):void 0},e.disableElement=function(o){var r;return r=o instanceof Event?o.target:o,l(r,e.linkDisableSelector)?i(r):l(r,e.buttonDisableSelector)||l(r,e.formDisableSelector)?t(r):l(r,e.formSubmitSelector)?n(r):void 0},i=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",h),c(t,"ujs:disabled",!0)},s=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(t.innerHTML=e,c(t,"ujs:enable-with",null)),t.removeEventListener("click",h),c(t,"ujs:disabled",null)},n=function(n){return a(n,e.formDisableSelector).forEach(t)},t=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(l(t,"button")?(c(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(c(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,c(t,"ujs:disabled",!0)},r=function(t){return a(t,e.formEnableSelector).forEach(o)},o=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(l(t,"button")?t.innerHTML=e:t.value=e,c(t,"ujs:enable-with",null)),t.disabled=!1,c(t,"ujs:disabled",null)}}.call(this),function(){var t;t=e.stopEverything,e.handleMethod=function(n){var i,o,r,s,a,u,l;if(l=(u=this).getAttribute("data-method"))return a=e.href(u),o=e.csrfToken(),i=e.csrfParam(),r=document.createElement("form"),s="<input name='_method' value='"+l+"' type='hidden' />",null==i||null==o||e.isCrossDomain(a)||(s+="<input name='"+i+"' value='"+o+"' type='hidden' />"),s+='<input type="submit" />',r.method="post",r.action=a,r.target=u.target,r.innerHTML=s,r.style.display="none",document.body.appendChild(r),r.querySelector('[type="submit"]').click(),t(n)}}.call(this),function(){var t,n,i,o,r,s,a,u,l,c=[].slice;s=e.matches,i=e.getData,u=e.setData,n=e.fire,l=e.stopEverything,t=e.ajax,o=e.isCrossDomain,a=e.serializeElement,r=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},e.handleRemote=function(h){var d,p,f,m,g,v,y;return!r(m=this)||(n(m,"ajax:before")?(y=m.getAttribute("data-with-credentials"),f=m.getAttribute("data-type")||"script",s(m,e.formSubmitSelector)?(d=i(m,"ujs:submit-button"),g=i(m,"ujs:submit-button-formmethod")||m.method,v=i(m,"ujs:submit-button-formaction")||m.getAttribute("action")||location.href,"GET"===g.toUpperCase()&&(v=v.replace(/\?.*$/,"")),"multipart/form-data"===m.enctype?(p=new FormData(m),null!=d&&p.append(d.name,d.value)):p=a(m,d),u(m,"ujs:submit-button",null),u(m,"ujs:submit-button-formmethod",null),u(m,"ujs:submit-button-formaction",null)):s(m,e.buttonClickSelector)||s(m,e.inputChangeSelector)?(g=m.getAttribute("data-method"),v=m.getAttribute("data-url"),p=a(m,m.getAttribute("data-params"))):(g=m.getAttribute("data-method"),v=e.href(m),p=m.getAttribute("data-params")),t({type:g||"GET",url:v,data:p,dataType:f,beforeSend:function(t,e){return n(m,"ajax:beforeSend",[t,e])?n(m,"ajax:send",[t]):(n(m,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],n(m,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],n(m,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?c.call(arguments,0):[],n(m,"ajax:complete",t)},crossDomain:o(v),withCredentials:null!=y&&"false"!==y}),l(h)):(n(m,"ajax:stopped"),!1))},e.formSubmitButtonClick=function(){var t,e;if(e=(t=this).form)return t.name&&u(e,"ujs:submit-button",{name:t.name,value:t.value}),u(e,"ujs:formnovalidate-button",t.formNoValidate),u(e,"ujs:submit-button-formaction",t.getAttribute("formaction")),u(e,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},e.handleMetaClick=function(t){var e,n,i;if(i=((n=this).getAttribute("data-method")||"GET").toUpperCase(),e=n.getAttribute("data-params"),(t.metaKey||t.ctrlKey)&&"GET"===i&&!e)return t.stopImmediatePropagation()}}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h,d,p,f;s=e.fire,i=e.delegate,u=e.getData,t=e.$,f=e.refreshCSRFTokens,n=e.CSRFProtection,r=e.enableElement,o=e.disableElement,c=e.handleDisabledElement,l=e.handleConfirm,p=e.handleRemote,a=e.formSubmitButtonClick,h=e.handleMetaClick,d=e.handleMethod,"undefined"==typeof jQuery||null===jQuery||null==jQuery.ajax||jQuery.rails||(jQuery.rails=e,jQuery.ajaxPrefilter(function(t,e,i){if(!t.crossDomain)return n(i)})),e.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(e.formEnableSelector).forEach(function(t){if(u(t,"ujs:disabled"))return r(t)}),t(e.linkDisableSelector).forEach(function(t){if(u(t,"ujs:disabled"))return r(t)})}),i(document,e.linkDisableSelector,"ajax:complete",r),i(document,e.linkDisableSelector,"ajax:stopped",r),i(document,e.buttonDisableSelector,"ajax:complete",r),i(document,e.buttonDisableSelector,"ajax:stopped",r),i(document,e.linkClickSelector,"click",c),i(document,e.linkClickSelector,"click",l),i(document,e.linkClickSelector,"click",h),i(document,e.linkClickSelector,"click",o),i(document,e.linkClickSelector,"click",p),i(document,e.linkClickSelector,"click",d),i(document,e.buttonClickSelector,"click",c),i(document,e.buttonClickSelector,"click",l),i(document,e.buttonClickSelector,"click",o),i(document,e.buttonClickSelector,"click",p),i(document,e.inputChangeSelector,"change",c),i(document,e.inputChangeSelector,"change",l),i(document,e.inputChangeSelector,"change",p),i(document,e.formSubmitSelector,"submit",c),i(document,e.formSubmitSelector,"submit",l),i(document,e.formSubmitSelector,"submit",p),i(document,e.formSubmitSelector,"submit",function(t){return setTimeout(function(){return o(t)},13)}),i(document,e.formSubmitSelector,"ajax:send",o),i(document,e.formSubmitSelector,"ajax:complete",r),i(document,e.formInputClickSelector,"click",c),i(document,e.formInputClickSelector,"click",l),i(document,e.formInputClickSelector,"click",a),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===e&&s(document,"rails:attachBindings")&&e.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd&&define(e)}).call(this),function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function n(t,e){var n=(e=e||nt).createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}function i(t){var e=!!t&&"length"in t&&t.length,n=mt.type(t);return"function"!==n&&!mt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function o(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function r(t,e,n){return mt.isFunction(e)?mt.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?mt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?mt.grep(t,function(t){return at.call(e,t)>-1!==n}):Ct.test(e)?mt.filter(e,t,n):(e=mt.filter(e,t),mt.grep(t,function(t){return at.call(e,t)>-1!==n&&1===t.nodeType}))}function s(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function a(t){var e={};return mt.each(t.match(Pt)||[],function(t,n){e[n]=!0}),e}function u(t){return t}function l(t){throw t}function c(t,e,n,i){var o;try{t&&mt.isFunction(o=t.promise)?o.call(t).done(e).fail(n):t&&mt.isFunction(o=t.then)?o.call(t,e,n):e.apply(undefined,[t].slice(i))}catch(t){n.apply(undefined,[t])}}function h(){nt.removeEventListener("DOMContentLoaded",h),t.removeEventListener("load",h),mt.ready()}function d(){this.expando=mt.expando+d.uid++}function p(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Bt.test(t)?JSON.parse(t):t)}function f(t,e,n){var i;if(n===undefined&&1===t.nodeType)if(i="data-"+e.replace(jt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=p(n)}catch(o){}Mt.set(t,e,n)}else n=undefined;return n}function m(t,e,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return mt.css(t,e,"")},u=a(),l=n&&n[3]||(mt.cssNumber[e]?"":"px"),c=(mt.cssNumber[e]||"px"!==l&&+u)&&Ht.exec(mt.css(t,e));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{c/=r=r||".5",mt.style(t,e,c+l)}while(r!==(r=a()/u)&&1!==r&&--s)}return n&&(c=+c||+u||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=c,i.end=o)),o}function g(t){var e,n=t.ownerDocument,i=t.nodeName,o=Vt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=mt.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),Vt[i]=o,o)}function v(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=Nt.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&Wt(i)&&(o[r]=g(i))):"none"!==n&&(o[r]="none",Nt.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}function y(t,e){var n;return n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],e===undefined||e&&o(t,e)?mt.merge([t],n):n}function _(t,e){for(var n=0,i=t.length;n<i;n++)Nt.set(t[n],"globalEval",!e||Nt.get(e[n],"globalEval"))}function b(t,e,n,i,o){for(var r,s,a,u,l,c,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((r=t[p])||0===r)if("object"===mt.type(r))mt.merge(d,r.nodeType?[r]:r);else if($t.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(Zt.exec(r)||["",""])[1].toLowerCase(),u=Kt[a]||Kt._default,s.innerHTML=u[1]+mt.htmlPrefilter(r)+u[2],c=u[0];c--;)s=s.lastChild;mt.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(e.createTextNode(r));for(h.textContent="",p=0;r=d[p++];)if(i&&mt.inArray(r,i)>-1)o&&o.push(r);else if(l=mt.contains(r.ownerDocument,r),s=y(h.appendChild(r),"script"),l&&_(s),n)for(c=0;r=s[c++];)Gt.test(r.type||"")&&n.push(r);return h}function w(){return!0}function x(){return!1}function A(){try{return nt.activeElement}catch(t){}}function E(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=undefined),e)E(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=undefined):null==o&&("string"==typeof n?(o=i,i=undefined):(o=i,i=n,n=undefined)),!1===o)o=x;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return mt().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=mt.guid++)),t.each(function(){mt.event.add(this,e,o,i,n)})}function C(t,e){return o(t,"table")&&o(11!==e.nodeType?e:e.firstChild,"tr")&&mt(">tbody",t)[0]||t}function T(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function S(t){var e=re.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function L(t,e){var n,i,o,r,s,a,u,l;if(1===e.nodeType){if(Nt.hasData(t)&&(r=Nt.access(t),s=Nt.set(e,r),l=r.events))for(o in delete s.handle,s.events={},l)for(n=0,i=l[o].length;n<i;n++)mt.event.add(e,o,l[o][n]);Mt.hasData(t)&&(a=Mt.access(t),u=mt.extend({},a),Mt.set(e,u))}}function k(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Ut.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function P(t,e,i,o){e=rt.apply([],e);var r,s,a,u,l,c,h=0,d=t.length,p=d-1,f=e[0],m=mt.isFunction(f);if(m||d>1&&"string"==typeof f&&!pt.checkClone&&oe.test(f))return t.each(function(n){var r=t.eq(n);m&&(e[0]=f.call(this,n,r.html())),P(r,e,i,o)});if(d&&(s=(r=b(e,t[0].ownerDocument,!1,t,o)).firstChild,1===r.childNodes.length&&(r=s),s||o)){for(u=(a=mt.map(y(r,"script"),T)).length;h<d;h++)l=r,h!==p&&(l=mt.clone(l,!0,!0),u&&mt.merge(a,y(l,"script"))),i.call(t[h],l,h);if(u)for(c=a[a.length-1].ownerDocument,mt.map(a,S),h=0;h<u;h++)l=a[h],Gt.test(l.type||"")&&!Nt.access(l,"globalEval")&&mt.contains(c,l)&&(l.src?mt._evalUrl&&mt._evalUrl(l.src):n(l.textContent.replace(se,""),c))}return t}function D(t,e,n){for(var i,o=e?mt.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||mt.cleanData(y(i)),i.parentNode&&(n&&mt.contains(i.ownerDocument,i)&&_(y(i,"script")),i.parentNode.removeChild(i));return t}function O(t,e,n){var i,o,r,s,a=t.style;return(n=n||le(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||mt.contains(t.ownerDocument,t)||(s=mt.style(t,e)),!pt.pixelMarginRight()&&ue.test(s)&&ae.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),s!==undefined?s+"":s}function I(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function R(t){if(t in me)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=fe.length;n--;)if((t=fe[n]+e)in me)return t}function N(t){var e=mt.cssProps[t];return e||(e=mt.cssProps[t]=R(t)||t),e}function M(t,e,n){var i=Ht.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function B(t,e,n,i,o){var r,s=0;for(r=n===(i?"border":"content")?4:"width"===e?1:0;r<4;r+=2)"margin"===n&&(s+=mt.css(t,n+zt[r],!0,o)),i?("content"===n&&(s-=mt.css(t,"padding"+zt[r],!0,o)),"margin"!==n&&(s-=mt.css(t,"border"+zt[r]+"Width",!0,o))):(s+=mt.css(t,"padding"+zt[r],!0,o),"padding"!==n&&(s+=mt.css(t,"border"+zt[r]+"Width",!0,o)));return s}function j(t,e,n){var i,o=le(t),r=O(t,e,o),s="border-box"===mt.css(t,"boxSizing",!1,o);return ue.test(r)?r:(i=s&&(pt.boxSizingReliable()||r===t.style[e]),"auto"===r&&(r=t["offset"+e[0].toUpperCase()+e.slice(1)]),(r=parseFloat(r)||0)+B(t,e,n||(s?"border":"content"),i,o)+"px")}function F(t,e,n,i,o){return new F.prototype.init(t,e,n,i,o)}function H(){ve&&(!1===nt.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(H):t.setTimeout(H,mt.fx.interval),mt.fx.tick())}function z(){return t.setTimeout(function(){ge=undefined}),ge=mt.now()}function W(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=zt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function q(t,e,n){for(var i,o=(Z.tweeners[e]||[]).concat(Z.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function V(t,e,n){var i,o,r,s,a,u,l,c,h="width"in e||"height"in e,d=this,p={},f=t.style,m=t.nodeType&&Wt(t),g=Nt.get(t,"fxshow");for(i in n.queue||(null==(s=mt._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,mt.queue(t,"fx").length||s.empty.fire()})})),e)if(o=e[i],be.test(o)){if(delete e[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||g[i]===undefined)continue;m=!0}p[i]=g&&g[i]||mt.style(t,i)}if((u=!mt.isEmptyObject(e))||!mt.isEmptyObject(p))for(i in h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=g&&g.display)&&(l=Nt.get(t,"display")),"none"===(c=mt.css(t,"display"))&&(l?c=l:(v([t],!0),l=t.style.display||l,c=mt.css(t,"display"),v([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===mt.css(t,"float")&&(u||(d.done(function(){f.display=l}),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),u=!1,p)u||(g?"hidden"in g&&(m=g.hidden):g=Nt.access(t,"fxshow",{display:l}),r&&(g.hidden=!m),m&&v([t],!0),d.done(function(){for(i in m||v([t]),Nt.remove(t,"fxshow"),p)mt.style(t,i,p[i])})),u=q(m?g[i]:0,i,d),i in g||(g[i]=u.start,m&&(u.end=u.start,u.start=0))}function U(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=mt.camelCase(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=mt.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}function Z(t,e,n){var i,o,r=0,s=Z.prefilters.length,a=mt.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var e=ge||z(),n=Math.max(0,l.startTime+l.duration-e),i=1-(n/l.duration||0),r=0,s=l.tweens.length;r<s;r++)l.tweens[r].run(i);return a.notifyWith(t,[l,i,n]),i<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:mt.extend({},e),opts:mt.extend(!0,{specialEasing:{},easing:mt.easing._default},n),originalProperties:e,originalOptions:n,startTime:ge||z(),duration:n.duration,tweens:[],createTween:function(e,n){var i=mt.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(i),i},stop:function(e){var n=0,i=e?l.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(U(c,l.opts.specialEasing);r<s;r++)if(i=Z.prefilters[r].call(l,t,c,l.opts))return mt.isFunction(i.stop)&&(mt._queueHooks(l.elem,l.opts.queue).stop=mt.proxy(i.stop,i)),i;return mt.map(c,q,l),mt.isFunction(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),mt.fx.timer(mt.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}function G(t){return(t.match(Pt)||[]).join(" ")}function K(t){return t.getAttribute&&t.getAttribute("class")||""}function J(t,e,n,i){var o;if(Array.isArray(e))mt.each(e,function(e,o){n||De.test(t)?i(t,o):J(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==mt.type(e))i(t,e);else for(o in e)J(t+"["+o+"]",e[o],n,i)}function Y(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(Pt)||[];if(mt.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function $(t,e,n,i){function o(a){var u;return r[a]=!0,mt.each(t[a]||[],function(t,a){var l=a(e,n,i);return"string"!=typeof l||s||r[l]?s?!(u=l):void 0:(e.dataTypes.unshift(l),o(l),!1)}),u}var r={},s=t===qe;return o(e.dataTypes[0])||!r["*"]&&o("*")}function X(t,e){var n,i,o=mt.ajaxSettings.flatOptions||{};for(n in e)e[n]!==undefined&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&mt.extend(!0,t,i),t}function Q(t,e,n){for(var i,o,r,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),i===undefined&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){u.unshift(o);break}if(u[0]in n)r=u[0];else{for(o in n){if(!u[0]||t.converters[o+" "+u[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==u[0]&&u.unshift(r),n[r]}function tt(t,e,n,i){var o,r,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!u&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=r,r=c.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(s=l[u+" "+r]||l["* "+r]))for(o in l)if((a=o.split(" "))[1]===r&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[o]:!0!==l[o]&&(r=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+u+" to "+r}}}return{state:"success",data:e}}var et=[],nt=t.document,it=Object.getPrototypeOf,ot=et.slice,rt=et.concat,st=et.push,at=et.indexOf,ut={},lt=ut.toString,ct=ut.hasOwnProperty,ht=ct.toString,dt=ht.call(Object),pt={},ft="3.2.1",mt=function(t,e){return new mt.fn.init(t,e)},gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,vt=/^-ms-/,yt=/-([a-z])/g,_t=function(t,e){return e.toUpperCase()};mt.fn=mt.prototype={jquery:ft,constructor:mt,length:0,toArray:function(){return ot.call(this)},get:function(t){return null==t?ot.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=mt.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return mt.each(this,t)},map:function(t){return this.pushStack(mt.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:et.sort,splice:et.splice},mt.extend=mt.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||mt.isFunction(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],s!==(i=t[e])&&(l&&i&&(mt.isPlainObject(i)||(o=Array.isArray(i)))?(o?(o=!1,r=n&&Array.isArray(n)?n:[]):r=n&&mt.isPlainObject(n)?n:{},s[e]=mt.extend(l,r,i)):i!==undefined&&(s[e]=i));return s},mt.extend({expando:"jQuery"+(ft+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===mt.type(t)},isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=mt.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==lt.call(t))&&(!(e=it(t))||"function"==typeof(n=ct.call(e,"constructor")&&e.constructor)&&ht.call(n)===dt)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?ut[lt.call(t)]||"object":typeof t},globalEval:function(t){n(t)},camelCase:function(t){return t.replace(vt,"ms-").replace(yt,_t)},each:function(t,e){var n,o=0;if(i(t))for(n=t.length;o<n&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},trim:function(t){return null==t?"":(t+"").replace(gt,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?mt.merge(n,"string"==typeof t?[t]:t):st.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:at.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var o,r,s=0,a=[];if(i(t))for(o=t.length;s<o;s++)null!=(r=e(t[s],s,n))&&a.push(r);else for(s in t)null!=(r=e(t[s],s,n))&&a.push(r);return rt.apply([],a)},guid:1,proxy:function(t,e){var n,i,o;return"string"==typeof e&&(n=t[e],e=t,t=n),mt.isFunction(t)?(i=ot.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(ot.call(arguments)))}).guid=t.guid=t.guid||mt.guid++,o):undefined},now:Date.now,support:pt}),"function"==typeof Symbol&&(mt.fn[Symbol.iterator]=et[Symbol.iterator]),mt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){ut["[object "+e+"]"]=e.toLowerCase()});var bt=function(t){function e(t,e,n,i){var o,r,s,a,u,l,c,d=e&&e.ownerDocument,f=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==f&&9!==f&&11!==f)return n;if(!i&&((e?e.ownerDocument||e:z)!==I&&O(e),e=e||I,N)){if(11!==f&&(u=vt.exec(t)))if(o=u[1]){if(9===f){if(!(s=e.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(d&&(s=d.getElementById(o))&&F(e,s)&&s.id===o)return n.push(s),n}else{if(u[2])return X.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&x.getElementsByClassName&&e.getElementsByClassName)return X.apply(n,e.getElementsByClassName(o)),n}if(x.qsa&&!Z[t+" "]&&(!M||!M.test(t))){if(1!==f)d=e,c=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(wt,xt):e.setAttribute("id",a=H),r=(l=T(t)).length;r--;)l[r]="#"+a+" "+p(l[r]);c=l.join(","),d=yt.test(t)&&h(e.parentNode)||e}if(c)try{return X.apply(n,d.querySelectorAll(c)),n}catch(m){}finally{a===H&&e.removeAttribute("id")}}}return L(t.replace(at,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>A.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[H]=!0,t}function o(t){var e=I.createElement("fieldset");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=n.length;i--;)A.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function u(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(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&&Et(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function c(t){return i(function(e){return e=+e,i(function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function h(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function p(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function f(t,e,n){var i=e.dir,o=e.next,r=o||i,s=n&&"parentNode"===r,a=q++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,u){var l,c,h,d=[W,a];if(u){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(c=(h=e[H]||(e[H]={}))[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((l=c[r])&&l[0]===W&&l[1]===a)return d[2]=l[2];if(c[r]=d,d[2]=t(e,n,u))return!0}return!1}}function m(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var o=0,r=n.length;o<r;o++)e(t,n[o],i);return i}function v(t,e,n,i,o){for(var r,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),l&&e.push(a)));return s}function y(t,e,n,o,r,s){return o&&!o[H]&&(o=y(o)),r&&!r[H]&&(r=y(r,s)),i(function(i,s,a,u){var l,c,h,d=[],p=[],f=s.length,m=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?m:v(m,d,t,a,u),_=n?r||(i?t:f||o)?[]:s:y;if(n&&n(y,_,a,u),o)for(l=v(_,p),o(l,[],a,u),c=l.length;c--;)(h=l[c])&&(_[p[c]]=!(y[p[c]]=h));if(i){if(r||t){if(r){for(l=[],c=_.length;c--;)(h=_[c])&&l.push(y[c]=h);r(null,_=[],l,u)}for(c=_.length;c--;)(h=_[c])&&(l=r?tt(i,h):d[c])>-1&&(i[l]=!(s[l]=h))}}else _=v(_===s?_.splice(f,_.length):_),r?r(null,s,_,u):X.apply(s,_)})}function _(t){for(var e,n,i,o=t.length,r=A.relative[t[0].type],s=r||A.relative[" "],a=r?1:0,u=f(function(t){return t===e},s,!0),l=f(function(t){return tt(e,t)>-1},s,!0),c=[function(t,n,i){var o=!r&&(i||n!==k)||((e=n).nodeType?u(t,n,i):l(t,n,i));return e=null,o}];a<o;a++)if(n=A.relative[t[a].type])c=[f(m(c),n)];else{if((n=A.filter[t[a].type].apply(null,t[a].matches))[H]){for(i=++a;i<o&&!A.relative[t[i].type];i++);
return y(a>1&&m(c),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,a<i&&_(t.slice(a,i)),i<o&&_(t=t.slice(i)),i<o&&p(t))}c.push(n)}return m(c)}function b(t,n){var o=n.length>0,r=t.length>0,s=function(i,s,a,u,l){var c,h,d,p=0,f="0",m=i&&[],g=[],y=k,_=i||r&&A.find.TAG("*",l),b=W+=null==y?1:Math.random()||.1,w=_.length;for(l&&(k=s===I||s||l);f!==w&&null!=(c=_[f]);f++){if(r&&c){for(h=0,s||c.ownerDocument===I||(O(c),a=!N);d=t[h++];)if(d(c,s||I,a)){u.push(c);break}l&&(W=b)}o&&((c=!d&&c)&&p--,i&&m.push(c))}if(p+=f,o&&f!==p){for(h=0;d=n[h++];)d(m,g,s,a);if(i){if(p>0)for(;f--;)m[f]||g[f]||(g[f]=Y.call(u));g=v(g)}X.apply(u,g),l&&!i&&g.length>0&&p+n.length>1&&e.uniqueSort(u)}return l&&(W=b,k=y),m};return o?i(s):s}var w,x,A,E,C,T,S,L,k,P,D,O,I,R,N,M,B,j,F,H="sizzle"+1*new Date,z=t.document,W=0,q=0,V=n(),U=n(),Z=n(),G=function(t,e){return t===e&&(D=!0),0},K={}.hasOwnProperty,J=[],Y=J.pop,$=J.push,X=J.push,Q=J.slice,tt=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ot="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",rt=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(nt+"+","g"),at=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ut=new RegExp("^"+nt+"*,"+nt+"*"),lt=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ht=new RegExp(rt),dt=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),bt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},wt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xt=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},At=function(){O()},Et=f(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{X.apply(J=Q.call(z.childNodes),z.childNodes),J[z.childNodes.length].nodeType}catch(Ct){X={apply:J.length?function(t,e){$.apply(t,Q.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}for(w in x=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},O=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:z;return i!==I&&9===i.nodeType&&i.documentElement?(R=(I=i).documentElement,N=!C(I),z!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",At,!1):n.attachEvent&&n.attachEvent("onunload",At)),x.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=o(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=gt.test(I.getElementsByClassName),x.getById=o(function(t){return R.appendChild(t).id=H,!I.getElementsByName||!I.getElementsByName(H).length}),x.getById?(A.filter.ID=function(t){var e=t.replace(_t,bt);return function(t){return t.getAttribute("id")===e}},A.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}}):(A.filter.ID=function(t){var e=t.replace(_t,bt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},A.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),A.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},A.find.CLASS=x.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&N)return e.getElementsByClassName(t)},B=[],M=[],(x.qsa=gt.test(I.querySelectorAll))&&(o(function(t){R.appendChild(t).innerHTML="<a id='"+H+"'></a><select id='"+H+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+H+"-]").length||M.push("~="),t.querySelectorAll(":checked").length||M.push(":checked"),t.querySelectorAll("a#"+H+"+*").length||M.push(".#.+[+~]")}),o(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&M.push("name"+nt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&M.push(":enabled",":disabled"),R.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&M.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),M.push(",.*:")})),(x.matchesSelector=gt.test(j=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&o(function(t){x.disconnectedMatch=j.call(t,"*"),j.call(t,"[s!='']:x"),B.push("!=",rt)}),M=M.length&&new RegExp(M.join("|")),B=B.length&&new RegExp(B.join("|")),e=gt.test(R.compareDocumentPosition),F=e||gt.test(R.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},G=e?function(t,e){if(t===e)return D=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===z&&F(z,t)?-1:e===I||e.ownerDocument===z&&F(z,e)?1:P?tt(P,t)-tt(P,e):0:4&n?-1:1)}:function(t,e){if(t===e)return D=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,a=[t],u=[e];if(!o||!r)return t===I?-1:e===I?1:o?-1:r?1:P?tt(P,t)-tt(P,e):0;if(o===r)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;a[i]===u[i];)i++;return i?s(a[i],u[i]):a[i]===z?-1:u[i]===z?1:0},I):I},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==I&&O(t),n=n.replace(ct,"='$1']"),x.matchesSelector&&N&&!Z[n+" "]&&(!B||!B.test(n))&&(!M||!M.test(n)))try{var i=j.call(t,n);if(i||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(Ct){}return e(n,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&O(t),F(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&O(t);var n=A.attrHandle[e.toLowerCase()],i=n&&K.call(A.attrHandle,e.toLowerCase())?n(t,e,!N):undefined;return i!==undefined?i:x.attributes||!N?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.escape=function(t){return(t+"").replace(wt,xt)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(D=!x.detectDuplicates,P=!x.sortStable&&t.slice(0),t.sort(G),D){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return P=null,t},E=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=E(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=E(e);return n},(A=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,bt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,bt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ht.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,bt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=V[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&V(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var r=e.attr(o,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(st," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,u){var l,c,h,d,p,f,m=r!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a,_=!1;if(g){if(r){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(_=(p=(l=(c=(h=(d=g)[H]||(d[H]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===W&&l[1])&&l[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(_=p=0)||f.pop();)if(1===d.nodeType&&++_&&d===e){c[t]=[W,p,_];break}}else if(y&&(_=p=(l=(c=(h=(d=e)[H]||(d[H]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===W&&l[1]),!1===_)for(;(d=++p&&d&&d[m]||(_=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++_||(y&&((c=(h=d[H]||(d[H]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]=[W,_]),d!==e)););return(_-=o)===i||_%i==0&&_/i>=0}}},PSEUDO:function(t,n){var o,r=A.pseudos[t]||A.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[H]?r(n):r.length>1?(o=[t,t,"",n],A.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=r(t,n),s=o.length;s--;)t[i=tt(t,o[s])]=!(e[i]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:i(function(t){var e=[],n=[],o=S(t.replace(at,"$1"));return o[H]?i(function(t,e,n,i){for(var r,s=o(t,null,i,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(_t,bt),function(e){return(e.textContent||e.innerText||E(e)).indexOf(t)>-1}}),lang:i(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,bt).toLowerCase(),function(e){var n;do{if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===R},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!A.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[n<0?n+e:n]}),even:c(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:c(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:c(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:c(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=A.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})A.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})A.pseudos[w]=u(w);return d.prototype=A.filters=A.pseudos,A.setFilters=new d,T=e.tokenize=function(t,n){var i,o,r,s,a,u,l,c=U[t+" "];if(c)return n?0:c.slice(0);for(a=t,u=[],l=A.preFilter;a;){for(s in i&&!(o=ut.exec(a))||(o&&(a=a.slice(o[0].length)||a),u.push(r=[])),i=!1,(o=lt.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(at," ")}),a=a.slice(i.length)),A.filter)!(o=pt[s].exec(a))||l[s]&&!(o=l[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):U(t,u).slice(0)},S=e.compile=function(t,e){var n,i=[],o=[],r=Z[t+" "];if(!r){for(e||(e=T(t)),n=e.length;n--;)(r=_(e[n]))[H]?i.push(r):o.push(r);(r=Z(t,b(o,i))).selector=t}return r},L=e.select=function(t,e,n,i){var o,r,s,a,u,l="function"==typeof t&&t,c=!i&&T(t=l.selector||t);if(n=n||[],1===c.length){if((r=c[0]=c[0].slice(0)).length>2&&"ID"===(s=r[0]).type&&9===e.nodeType&&N&&A.relative[r[1].type]){if(!(e=(A.find.ID(s.matches[0].replace(_t,bt),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(s=r[o],!A.relative[a=s.type]);)if((u=A.find[a])&&(i=u(s.matches[0].replace(_t,bt),yt.test(r[0].type)&&h(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&p(r)))return X.apply(n,i),n;break}}return(l||S(t,c))(i,e,!N,n,!e||yt.test(t)&&h(e.parentNode)||e),n},x.sortStable=H.split("").sort(G).join("")===H,x.detectDuplicates=!!D,O(),x.sortDetached=o(function(t){return 1&t.compareDocumentPosition(I.createElement("fieldset"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(et,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);mt.find=bt,mt.expr=bt.selectors,mt.expr[":"]=mt.expr.pseudos,mt.uniqueSort=mt.unique=bt.uniqueSort,mt.text=bt.getText,mt.isXMLDoc=bt.isXML,mt.contains=bt.contains,mt.escapeSelector=bt.escape;var wt=function(t,e,n){for(var i=[],o=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&mt(t).is(n))break;i.push(t)}return i},xt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},At=mt.expr.match.needsContext,Et=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ct=/^.[^:#\[\.,]*$/;mt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?mt.find.matchesSelector(i,t)?[i]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e<i;e++)if(mt.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)mt.find(t,o[e],n);return i>1?mt.uniqueSort(n):n},filter:function(t){return this.pushStack(r(this,t||[],!1))},not:function(t){return this.pushStack(r(this,t||[],!0))},is:function(t){return!!r(this,"string"==typeof t&&At.test(t)?mt(t):t||[],!1).length}});var Tt,St=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(mt.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||Tt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:St.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),Et.test(i[1])&&mt.isPlainObject(e))for(i in e)mt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=nt.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):mt.isFunction(t)?n.ready!==undefined?n.ready(t):t(mt):mt.makeArray(t,this)}).prototype=mt.fn,Tt=mt(nt);var Lt=/^(?:parents|prev(?:Until|All))/,kt={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e=mt(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(mt.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&mt(t);if(!At.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&mt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?mt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?at.call(mt(t),this[0]):at.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(mt.uniqueSort(mt.merge(this.get(),mt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),mt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return wt(t,"parentNode")},parentsUntil:function(t,e,n){return wt(t,"parentNode",n)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return wt(t,"nextSibling")},prevAll:function(t){return wt(t,"previousSibling")},nextUntil:function(t,e,n){return wt(t,"nextSibling",n)},prevUntil:function(t,e,n){return wt(t,"previousSibling",n)},siblings:function(t){return xt((t.parentNode||{}).firstChild,t)},children:function(t){return xt(t.firstChild)},contents:function(t){return o(t,"iframe")?t.contentDocument:(o(t,"template")&&(t=t.content||t),mt.merge([],t.childNodes))}},function(t,e){mt.fn[t]=function(n,i){var o=mt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=mt.filter(i,o)),this.length>1&&(kt[t]||mt.uniqueSort(o),Lt.test(t)&&o.reverse()),this.pushStack(o)}});var Pt=/[^\x20\t\r\n\f]+/g;mt.Callbacks=function(t){t="string"==typeof t?a(t):mt.extend({},t);var e,n,i,o,r=[],s=[],u=-1,l=function(){for(o=o||t.once,i=e=!0;s.length;u=-1)for(n=s.shift();++u<r.length;)!1===r[u].apply(n[0],n[1])&&t.stopOnFalse&&(u=r.length,n=!1);t.memory||(n=!1),e=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!e&&(u=r.length-1,s.push(n)),function i(e){mt.each(e,function(e,n){mt.isFunction(n)?t.unique&&c.has(n)||r.push(n):n&&n.length&&"string"!==mt.type(n)&&i(n)})}(arguments),n&&!e&&l()),this},remove:function(){return mt.each(arguments,function(t,e){for(var n;(n=mt.inArray(e,r,n))>-1;)r.splice(n,1),n<=u&&u--}),this},has:function(t){return t?mt.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},mt.extend({Deferred:function(e){var n=[["notify","progress",mt.Callbacks("memory"),mt.Callbacks("memory"),2],["resolve","done",mt.Callbacks("once memory"),mt.Callbacks("once memory"),0,"resolved"],["reject","fail",mt.Callbacks("once memory"),mt.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},"catch":function(t){return o.then(null,t)},pipe:function(){var t=arguments;return mt.Deferred(function(e){mt.each(n,function(n,i){var o=mt.isFunction(t[i[4]])&&t[i[4]];r[i[1]](function(){var t=o&&o.apply(this,arguments);t&&mt.isFunction(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(e,i,o){function r(e,n,i,o){return function(){var a=this,c=arguments,h=function(){var t,h;if(!(e<s)){if((t=i.apply(a,c))===n.promise())throw new TypeError("Thenable self-resolution");h=t&&("object"==typeof t||"function"==typeof t)&&t.then,mt.isFunction(h)?o?h.call(t,r(s,n,u,o),r(s,n,l,o)):(s++,h.call(t,r(s,n,u,o),r(s,n,l,o),r(s,n,u,n.notifyWith))):(i!==u&&(a=undefined,c=[t]),(o||n.resolveWith)(a,c))}},d=o?h:function(){try{h()}catch(t){mt.Deferred.exceptionHook&&mt.Deferred.exceptionHook(t,d.stackTrace),e+1>=s&&(i!==l&&(a=undefined,c=[t]),n.rejectWith(a,c))}};e?d():(mt.Deferred.getStackHook&&(d.stackTrace=mt.Deferred.getStackHook()),t.setTimeout(d))}}var s=0;return mt.Deferred(function(t){n[0][3].add(r(0,t,mt.isFunction(o)?o:u,t.notifyWith)),n[1][3].add(r(0,t,mt.isFunction(e)?e:u)),n[2][3].add(r(0,t,mt.isFunction(i)?i:l))}).promise()},promise:function(t){return null!=t?mt.extend(t,o):o}},r={};return mt.each(n,function(t,e){var s=e[2],a=e[5];o[e[1]]=s.add,a&&s.add(function(){i=a},n[3-t][2].disable,n[0][2].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?undefined:this,arguments),this},r[e[0]+"With"]=s.fireWith}),o.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=ot.call(arguments),r=mt.Deferred(),s=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?ot.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(c(t,r.done(s(n)).resolve,r.reject,!e),"pending"===r.state()||mt.isFunction(o[n]&&o[n].then)))return r.then();for(;n--;)c(o[n],s(n),r.reject);return r.promise()}});var Dt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;mt.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&Dt.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},mt.readyException=function(e){t.setTimeout(function(){throw e})};var Ot=mt.Deferred();mt.fn.ready=function(t){return Ot.then(t)["catch"](function(t){mt.readyException(t)}),this},mt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--mt.readyWait:mt.isReady)||(mt.isReady=!0,!0!==t&&--mt.readyWait>0||Ot.resolveWith(nt,[mt]))}}),mt.ready.then=Ot.then,"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll?t.setTimeout(mt.ready):(nt.addEventListener("DOMContentLoaded",h),t.addEventListener("load",h));var It=function(t,e,n,i,o,r,s){var a=0,u=t.length,l=null==n;if("object"===mt.type(n))for(a in o=!0,n)It(t,e,a,n[a],!0,r,s);else if(i!==undefined&&(o=!0,mt.isFunction(i)||(s=!0),l&&(s?(e.call(t,i),e=null):(l=e,e=function(t,e,n){return l.call(mt(t),n)})),e))for(;a<u;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:l?e.call(t):u?e(t[0],n):r},Rt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};d.uid=1,d.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Rt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[mt.camelCase(e)]=n;else for(i in e)o[mt.camelCase(i)]=e[i];return o},get:function(t,e){return e===undefined?this.cache(t):t[this.expando]&&t[this.expando][mt.camelCase(e)]},access:function(t,e,n){return e===undefined||e&&"string"==typeof e&&n===undefined?this.get(t,e):(this.set(t,e,n),n!==undefined?n:e)},remove:function(t,e){var n,i=t[this.expando];if(i!==undefined){if(e!==undefined){n=(e=Array.isArray(e)?e.map(mt.camelCase):(e=mt.camelCase(e))in i?[e]:e.match(Pt)||[]).length;for(;n--;)delete i[e[n]]}(e===undefined||mt.isEmptyObject(i))&&(t.nodeType?t[this.expando]=undefined:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return e!==undefined&&!mt.isEmptyObject(e)}};var Nt=new d,Mt=new d,Bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,jt=/[A-Z]/g;mt.extend({hasData:function(t){return Mt.hasData(t)||Nt.hasData(t)},data:function(t,e,n){return Mt.access(t,e,n)},removeData:function(t,e){Mt.remove(t,e)},_data:function(t,e,n){return Nt.access(t,e,n)},_removeData:function(t,e){Nt.remove(t,e)}}),mt.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(t===undefined){if(this.length&&(o=Mt.get(r),1===r.nodeType&&!Nt.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=mt.camelCase(i.slice(5)),f(r,i,o[i]));Nt.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){Mt.set(this,t)}):It(this,function(e){var n;if(r&&e===undefined)return(n=Mt.get(r,t))!==undefined?n:(n=f(r,t))!==undefined?n:void 0;this.each(function(){Mt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Mt.remove(this,t)})}}),mt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Nt.get(t,e),n&&(!i||Array.isArray(n)?i=Nt.access(t,e,mt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=mt.queue(t,e),i=n.length,o=n.shift(),r=mt._queueHooks(t,e),s=function(){mt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Nt.get(t,n)||Nt.access(t,n,{empty:mt.Callbacks("once memory").add(function(){Nt.remove(t,[e+"queue",n])})})}}),mt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?mt.queue(this[0],t):e===undefined?this:this.each(function(){var n=mt.queue(this,t,e);mt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&mt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){mt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=mt.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=undefined),t=t||"fx";s--;)(n=Nt.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var Ft=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ht=new RegExp("^(?:([+-])=|)("+Ft+")([a-z%]*)$","i"),zt=["Top","Right","Bottom","Left"],Wt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&mt.contains(t.ownerDocument,t)&&"none"===mt.css(t,"display")},qt=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=s[r];return o},Vt={};mt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Wt(this)?mt(this).show():mt(this).hide()})}});var Ut=/^(?:checkbox|radio)$/i,Zt=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Gt=/^$|\/(?:java|ecma)script/i,Kt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Kt.optgroup=Kt.option,Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td;var Jt,Yt,$t=/<|&#?\w+;/;Jt=nt.createDocumentFragment().appendChild(nt.createElement("div")),(Yt=nt.createElement("input")).setAttribute("type","radio"),Yt.setAttribute("checked","checked"),Yt.setAttribute("name","t"),Jt.appendChild(Yt),pt.checkClone=Jt.cloneNode(!0).cloneNode(!0).lastChild.checked,Jt.innerHTML="<textarea>x</textarea>",pt.noCloneChecked=!!Jt.cloneNode(!0).lastChild.defaultValue;var Xt=nt.documentElement,Qt=/^key/,te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ee=/^([^.]*)(?:\.(.+)|)/;mt.event={global:{},add:function(t,e,n,i,o){var r,s,a,u,l,c,h,d,p,f,m,g=Nt.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&mt.find.matchesSelector(Xt,o),n.guid||(n.guid=mt.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==mt&&mt.event.triggered!==e.type?mt.event.dispatch.apply(t,arguments):undefined}),l=(e=(e||"").match(Pt)||[""]).length;l--;)p=m=(a=ee.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=mt.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=mt.event.special[p]||{},c=mt.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&mt.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=u[p])||((d=u[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),mt.event.global[p]=!0)},remove:function(t,e,n,i,o){var r,s,a,u,l,c,h,d,p,f,m,g=Nt.hasData(t)&&Nt.get(t);if(g&&(u=g.events)){for(l=(e=(e||"").match(Pt)||[""]).length;l--;)if(p=m=(a=ee.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=mt.event.special[p]||{},d=u[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)c=d[r],!o&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(d.splice(r,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,g.handle)||mt.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)mt.event.remove(t,p+e[l],n,i,!0);mt.isEmptyObject(u)&&Nt.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=mt.event.fix(t),u=new Array(arguments.length),l=(Nt.get(this,"events")||{})[a.type]||[],c=mt.event.special[a.type]||{};for(u[0]=a,e=1;e<arguments.length;e++)u[e]=arguments[e];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(s=mt.event.handlers.call(this,a,l),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,(i=((mt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,u))!==undefined&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(r=[],s={},n=0;n<u;n++)s[o=(i=e[n]).selector+" "]===undefined&&(s[o]=i.needsContext?mt(o,this).index(l)>-1:mt.find(o,this,null,[l]).length),s[o]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(mt.Event.prototype,t,{enumerable:!0,configurable:!0,get:mt.isFunction(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[mt.expando]?t:new mt.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==A()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===A()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&o(this,"input"))return this.click(),!1},_default:function(t){return o(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==undefined&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},mt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},mt.Event=function(t,e){if(!(this instanceof mt.Event))return new mt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.defaultPrevented===undefined&&!1===t.returnValue?w:x,
this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&mt.extend(this,e),this.timeStamp=t&&t.timeStamp||mt.now(),this[mt.expando]=!0},mt.Event.prototype={constructor:mt.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=w,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=w,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=w,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},mt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Qt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&e!==undefined&&te.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},mt.event.addProp),mt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){mt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||mt.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}}),mt.fn.extend({on:function(t,e,n,i){return E(this,t,e,n,i)},one:function(t,e,n,i){return E(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,mt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=undefined),!1===n&&(n=x),this.each(function(){mt.event.remove(this,t,n,e)})}});var ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ie=/<script|<style|<link/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,re=/^true\/(.*)/,se=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;mt.extend({htmlPrefilter:function(t){return t.replace(ne,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),u=mt.contains(t.ownerDocument,t);if(!(pt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(s=y(a),i=0,o=(r=y(t)).length;i<o;i++)k(r[i],s[i]);if(e)if(n)for(r=r||y(t),s=s||y(a),i=0,o=r.length;i<o;i++)L(r[i],s[i]);else L(t,a);return(s=y(a,"script")).length>0&&_(s,!u&&y(t,"script")),a},cleanData:function(t){for(var e,n,i,o=mt.event.special,r=0;(n=t[r])!==undefined;r++)if(Rt(n)){if(e=n[Nt.expando]){if(e.events)for(i in e.events)o[i]?mt.event.remove(n,i):mt.removeEvent(n,i,e.handle);n[Nt.expando]=undefined}n[Mt.expando]&&(n[Mt.expando]=undefined)}}}),mt.fn.extend({detach:function(t){return D(this,t,!0)},remove:function(t){return D(this,t)},text:function(t){return It(this,function(t){return t===undefined?mt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return P(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||C(this,t).appendChild(t)})},prepend:function(){return P(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=C(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return P(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return P(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(mt.cleanData(y(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return mt.clone(this,t,e)})},html:function(t){return It(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!ie.test(t)&&!Kt[(Zt.exec(t)||["",""])[1].toLowerCase()]){t=mt.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(mt.cleanData(y(e,!1)),e.innerHTML=t);e=0}catch(o){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return P(this,arguments,function(e){var n=this.parentNode;mt.inArray(this,t)<0&&(mt.cleanData(y(this)),n&&n.replaceChild(e,this))},t)}}),mt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){mt.fn[t]=function(t){for(var n,i=[],o=mt(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),mt(o[s])[e](n),st.apply(i,n.get());return this.pushStack(i)}});var ae=/^margin/,ue=new RegExp("^("+Ft+")(?!px)[a-z%]+$","i"),le=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)};!function(){function e(){if(a){a.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Xt.appendChild(s);var e=t.getComputedStyle(a);n="1%"!==e.top,r="2px"===e.marginLeft,i="4px"===e.width,a.style.marginRight="50%",o="4px"===e.marginRight,Xt.removeChild(s),a=null}}var n,i,o,r,s=nt.createElement("div"),a=nt.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",pt.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),mt.extend(pt,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return e(),i},pixelMarginRight:function(){return e(),o},reliableMarginLeft:function(){return e(),r}}))}();var ce=/^(none|table(?!-c[ea]).+)/,he=/^--/,de={position:"absolute",visibility:"hidden",display:"block"},pe={letterSpacing:"0",fontWeight:"400"},fe=["Webkit","Moz","ms"],me=nt.createElement("div").style;mt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=O(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=mt.camelCase(e),u=he.test(e),l=t.style;if(u||(e=N(a)),s=mt.cssHooks[e]||mt.cssHooks[a],n===undefined)return s&&"get"in s&&(o=s.get(t,!1,i))!==undefined?o:l[e];"string"===(r=typeof n)&&(o=Ht.exec(n))&&o[1]&&(n=m(t,e,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(mt.cssNumber[a]?"":"px")),pt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&(n=s.set(t,n,i))===undefined||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,i){var o,r,s,a=mt.camelCase(e);return he.test(e)||(e=N(a)),(s=mt.cssHooks[e]||mt.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),o===undefined&&(o=O(t,e,i)),"normal"===o&&e in pe&&(o=pe[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),mt.each(["height","width"],function(t,e){mt.cssHooks[e]={get:function(t,n,i){if(n)return!ce.test(mt.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?j(t,e,i):qt(t,de,function(){return j(t,e,i)})},set:function(t,n,i){var o,r=i&&le(t),s=i&&B(t,e,i,"border-box"===mt.css(t,"boxSizing",!1,r),r);return s&&(o=Ht.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=mt.css(t,e)),M(t,n,s)}}}),mt.cssHooks.marginLeft=I(pt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(O(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),mt.each({margin:"",padding:"",border:"Width"},function(t,e){mt.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+zt[i]+e]=r[i]||r[i-2]||r[0];return o}},ae.test(t)||(mt.cssHooks[t+e].set=M)}),mt.fn.extend({css:function(t,e){return It(this,function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=le(t),o=e.length;s<o;s++)r[e[s]]=mt.css(t,e[s],!1,i);return r}return n!==undefined?mt.style(t,e,n):mt.css(t,e)},t,e,arguments.length>1)}}),mt.Tween=F,F.prototype={constructor:F,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||mt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(mt.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=mt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=mt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){mt.fx.step[t.prop]?mt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[mt.cssProps[t.prop]]&&!mt.cssHooks[t.prop]?t.elem[t.prop]=t.now:mt.style(t.elem,t.prop,t.now+t.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},mt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},mt.fx=F.prototype.init,mt.fx.step={};var ge,ve,ye,_e,be=/^(?:toggle|show|hide)$/,we=/queueHooks$/;mt.Animation=mt.extend(Z,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return m(n.elem,t,Ht.exec(e),n),n}]},tweener:function(t,e){mt.isFunction(t)?(e=t,t=["*"]):t=t.match(Pt);for(var n,i=0,o=t.length;i<o;i++)n=t[i],Z.tweeners[n]=Z.tweeners[n]||[],Z.tweeners[n].unshift(e)},prefilters:[V],prefilter:function(t,e){e?Z.prefilters.unshift(t):Z.prefilters.push(t)}}),mt.speed=function(t,e,n){var i=t&&"object"==typeof t?mt.extend({},t):{complete:n||!n&&e||mt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!mt.isFunction(e)&&e};return mt.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in mt.fx.speeds?i.duration=mt.fx.speeds[i.duration]:i.duration=mt.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){mt.isFunction(i.old)&&i.old.call(this),i.queue&&mt.dequeue(this,i.queue)},i},mt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Wt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=mt.isEmptyObject(t),r=mt.speed(e,n,i),s=function(){var e=Z(this,mt.extend({},t),r);(o||Nt.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=undefined),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=mt.timers,s=Nt.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&we.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||mt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=Nt.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=mt.timers,s=i?i.length:0;for(n.finish=!0,mt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),mt.each(["toggle","show","hide"],function(t,e){var n=mt.fn[e];mt.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(W(e,!0),t,i,o)}}),mt.each({slideDown:W("show"),slideUp:W("hide"),slideToggle:W("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){mt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),mt.timers=[],mt.fx.tick=function(){var t,e=0,n=mt.timers;for(ge=mt.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||mt.fx.stop(),ge=undefined},mt.fx.timer=function(t){mt.timers.push(t),mt.fx.start()},mt.fx.interval=13,mt.fx.start=function(){ve||(ve=!0,H())},mt.fx.stop=function(){ve=null},mt.fx.speeds={slow:600,fast:200,_default:400},mt.fn.delay=function(e,n){return e=mt.fx&&mt.fx.speeds[e]||e,n=n||"fx",this.queue(n,function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}})},ye=nt.createElement("input"),_e=nt.createElement("select").appendChild(nt.createElement("option")),ye.type="checkbox",pt.checkOn=""!==ye.value,pt.optSelected=_e.selected,(ye=nt.createElement("input")).value="t",ye.type="radio",pt.radioValue="t"===ye.value;var xe,Ae=mt.expr.attrHandle;mt.fn.extend({attr:function(t,e){return It(this,mt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){mt.removeAttr(this,t)})}}),mt.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?mt.prop(t,e,n):(1===r&&mt.isXMLDoc(t)||(o=mt.attrHooks[e.toLowerCase()]||(mt.expr.match.bool.test(e)?xe:undefined)),n!==undefined?null===n?void mt.removeAttr(t,e):o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=mt.find.attr(t,e))?undefined:i)},attrHooks:{type:{set:function(t,e){if(!pt.radioValue&&"radio"===e&&o(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(Pt);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?mt.removeAttr(t,n):t.setAttribute(n,n),n}},mt.each(mt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Ae[e]||mt.find.attr;Ae[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=Ae[s],Ae[s]=o,o=null!=n(t,e,i)?s:null,Ae[s]=r),o}});var Ee=/^(?:input|select|textarea|button)$/i,Ce=/^(?:a|area)$/i;mt.fn.extend({prop:function(t,e){return It(this,mt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[mt.propFix[t]||t]})}}),mt.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&mt.isXMLDoc(t)||(e=mt.propFix[e]||e,o=mt.propHooks[e]),n!==undefined?o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=mt.find.attr(t,"tabindex");return e?parseInt(e,10):Ee.test(t.nodeName)||Ce.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),pt.optSelected||(mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){mt.propFix[this.toLowerCase()]=this}),mt.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,u=0;if(mt.isFunction(t))return this.each(function(e){mt(this).addClass(t.call(this,e,K(this)))});if("string"==typeof t&&t)for(e=t.match(Pt)||[];n=this[u++];)if(o=K(n),i=1===n.nodeType&&" "+G(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=G(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,u=0;if(mt.isFunction(t))return this.each(function(e){mt(this).removeClass(t.call(this,e,K(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Pt)||[];n=this[u++];)if(o=K(n),i=1===n.nodeType&&" "+G(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=G(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):mt.isFunction(t)?this.each(function(n){mt(this).toggleClass(t.call(this,n,K(this),e),e)}):this.each(function(){var e,i,o,r;if("string"===n)for(i=0,o=mt(this),r=t.match(Pt)||[];e=r[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else t!==undefined&&"boolean"!==n||((e=K(this))&&Nt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Nt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+G(K(n))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;mt.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=mt.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,mt(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=mt.map(o,function(t){return null==t?"":t+""})),(e=mt.valHooks[this.type]||mt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&e.set(this,o,"value")!==undefined||(this.value=o))})):o?(e=mt.valHooks[o.type]||mt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&(n=e.get(o,"value"))!==undefined?n:"string"==typeof(n=o.value)?n.replace(Te,""):null==n?"":n:void 0}}),mt.extend({valHooks:{option:{get:function(t){var e=mt.find.attr(t,"value");return null!=e?e:G(mt.text(t))}},select:{get:function(t){var e,n,i,r=t.options,s=t.selectedIndex,a="select-one"===t.type,u=a?null:[],l=a?s+1:r.length;for(i=s<0?l:a?s:0;i<l;i++)if(((n=r[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(e=mt(n).val(),a)return e;u.push(e)}return u},set:function(t,e){for(var n,i,o=t.options,r=mt.makeArray(e),s=o.length;s--;)((i=o[s]).selected=mt.inArray(mt.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),mt.each(["radio","checkbox"],function(){mt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=mt.inArray(mt(t).val(),e)>-1}},pt.checkOn||(mt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Se=/^(?:focusinfocus|focusoutblur)$/;mt.extend(mt.event,{trigger:function(e,n,i,o){var r,s,a,u,l,c,h,d=[i||nt],p=ct.call(e,"type")?e.type:e,f=ct.call(e,"namespace")?e.namespace.split("."):[];if(s=a=i=i||nt,3!==i.nodeType&&8!==i.nodeType&&!Se.test(p+mt.event.triggered)&&(p.indexOf(".")>-1&&(p=(f=p.split(".")).shift(),f.sort()),l=p.indexOf(":")<0&&"on"+p,(e=e[mt.expando]?e:new mt.Event(p,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=i),n=null==n?[e]:mt.makeArray(n,[e]),h=mt.event.special[p]||{},o||!h.trigger||!1!==h.trigger.apply(i,n))){if(!o&&!h.noBubble&&!mt.isWindow(i)){for(u=h.delegateType||p,Se.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(i.ownerDocument||nt)&&d.push(a.defaultView||a.parentWindow||t)}for(r=0;(s=d[r++])&&!e.isPropagationStopped();)e.type=r>1?u:h.bindType||p,(c=(Nt.get(s,"events")||{})[e.type]&&Nt.get(s,"handle"))&&c.apply(s,n),(c=l&&s[l])&&c.apply&&Rt(s)&&(e.result=c.apply(s,n),!1===e.result&&e.preventDefault());return e.type=p,o||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(d.pop(),n)||!Rt(i)||l&&mt.isFunction(i[p])&&!mt.isWindow(i)&&((a=i[l])&&(i[l]=null),mt.event.triggered=p,i[p](),mt.event.triggered=undefined,a&&(i[l]=a)),e.result}},simulate:function(t,e,n){var i=mt.extend(new mt.Event,n,{type:t,isSimulated:!0});mt.event.trigger(i,null,e)}}),mt.fn.extend({trigger:function(t,e){return this.each(function(){mt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return mt.event.trigger(t,e,n,!0)}}),mt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){mt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),mt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),pt.focusin="onfocusin"in t,pt.focusin||mt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){mt.event.simulate(e,t.target,mt.event.fix(t))};mt.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=Nt.access(i,e);o||i.addEventListener(t,n,!0),Nt.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Nt.access(i,e)-1;o?Nt.access(i,e,o):(i.removeEventListener(t,n,!0),Nt.remove(i,e))}}});var Le=t.location,ke=mt.now(),Pe=/\?/;mt.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){n=undefined}return n&&!n.getElementsByTagName("parsererror").length||mt.error("Invalid XML: "+e),n};var De=/\[\]$/,Oe=/\r?\n/g,Ie=/^(?:submit|button|image|reset|file)$/i,Re=/^(?:input|select|textarea|keygen)/i;mt.param=function(t,e){var n,i=[],o=function(t,e){var n=mt.isFunction(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!mt.isPlainObject(t))mt.each(t,function(){o(this.name,this.value)});else for(n in t)J(n,t[n],e,o);return i.join("&")},mt.fn.extend({serialize:function(){return mt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=mt.prop(this,"elements");return t?mt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!mt(this).is(":disabled")&&Re.test(this.nodeName)&&!Ie.test(t)&&(this.checked||!Ut.test(t))}).map(function(t,e){var n=mt(this).val();return null==n?null:Array.isArray(n)?mt.map(n,function(t){return{name:e.name,value:t.replace(Oe,"\r\n")}}):{name:e.name,value:n.replace(Oe,"\r\n")}}).get()}});var Ne=/%20/g,Me=/#.*$/,Be=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,He=/^(?:GET|HEAD)$/,ze=/^\/\//,We={},qe={},Ve="*/".concat("*"),Ue=nt.createElement("a");Ue.href=Le.href,mt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Le.href,type:"GET",isLocal:Fe.test(Le.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ve,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":mt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?X(X(t,mt.ajaxSettings),e):X(mt.ajaxSettings,t)},ajaxPrefilter:Y(We),ajaxTransport:Y(qe),ajax:function(e,n){function i(e,n,i,a){var l,d,p,b,w,x=n;c||(c=!0,u&&t.clearTimeout(u),o=undefined,s=a||"",A.readyState=e>0?4:0,l=e>=200&&e<300||304===e,i&&(b=Q(f,A,i)),b=tt(f,b,A,l),l?(f.ifModified&&((w=A.getResponseHeader("Last-Modified"))&&(mt.lastModified[r]=w),(w=A.getResponseHeader("etag"))&&(mt.etag[r]=w)),204===e||"HEAD"===f.type?x="nocontent":304===e?x="notmodified":(x=b.state,d=b.data,l=!(p=b.error))):(p=x,!e&&x||(x="error",e<0&&(e=0))),A.status=e,A.statusText=(n||x)+"",l?v.resolveWith(m,[d,x,A]):v.rejectWith(m,[A,x,p]),A.statusCode(_),_=undefined,h&&g.trigger(l?"ajaxSuccess":"ajaxError",[A,f,l?d:p]),y.fireWith(m,[A,x]),h&&(g.trigger("ajaxComplete",[A,f]),--mt.active||mt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=undefined),n=n||{};var o,r,s,a,u,l,c,h,d,p,f=mt.ajaxSetup({},n),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?mt(m):mt.event,v=mt.Deferred(),y=mt.Callbacks("once memory"),_=f.statusCode||{},b={},w={},x="canceled",A={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=je.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)A.always(t[A.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||x;return o&&o.abort(e),i(0,e),this}};if(v.promise(A),f.url=((e||f.url||Le.href)+"").replace(ze,Le.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Pt)||[""],null==f.crossDomain){l=nt.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ue.protocol+"//"+Ue.host!=l.protocol+"//"+l.host}catch(E){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=mt.param(f.data,f.traditional)),$(We,f,n,A),c)return A;for(d in(h=mt.event&&f.global)&&0==mt.active++&&mt.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!He.test(f.type),r=f.url.replace(Me,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ne,"+")):(p=f.url.slice(r.length),f.data&&(r+=(Pe.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Be,"$1"),p=(Pe.test(r)?"&":"?")+"_="+ke+++p),f.url=r+p),f.ifModified&&(mt.lastModified[r]&&A.setRequestHeader("If-Modified-Since",mt.lastModified[r]),mt.etag[r]&&A.setRequestHeader("If-None-Match",mt.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&A.setRequestHeader("Content-Type",f.contentType),A.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ve+"; q=0.01":""):f.accepts["*"]),f.headers)A.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(m,A,f)||c))return A.abort();if(x="abort",y.add(f.complete),A.done(f.success),A.fail(f.error),o=$(qe,f,n,A)){if(A.readyState=1,h&&g.trigger("ajaxSend",[A,f]),c)return A;f.async&&f.timeout>0&&(u=t.setTimeout(function(){A.abort("timeout")},f.timeout));try{c=!1,o.send(b,i)}catch(E){if(c)throw E;i(-1,E)}}else i(-1,"No Transport");return A},getJSON:function(t,e,n){return mt.get(t,e,n,"json")},getScript:function(t,e){return mt.get(t,undefined,e,"script")}}),mt.each(["get","post"],function(t,e){mt[e]=function(t,n,i,o){return mt.isFunction(n)&&(o=o||i,i=n,n=undefined),mt.ajax(mt.extend({url:t,type:e,dataType:o,data:n,success:i},mt.isPlainObject(t)&&t))}}),mt._evalUrl=function(t){return mt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},mt.fn.extend({wrapAll:function(t){var e;return this[0]&&(mt.isFunction(t)&&(t=t.call(this[0])),e=mt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return mt.isFunction(t)?this.each(function(e){mt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=mt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=mt.isFunction(t);return this.each(function(n){mt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){mt(this).replaceWith(this.childNodes)}),this}}),mt.expr.pseudos.hidden=function(t){return!mt.expr.pseudos.visible(t)},mt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},mt.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Ze={0:200,1223:204},Ge=mt.ajaxSettings.xhr();pt.cors=!!Ge&&"withCredentials"in Ge,pt.ajax=Ge=!!Ge,mt.ajaxTransport(function(e){var n,i;if(pt.cors||Ge&&!e.crossDomain)return{send:function(o,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),a.onabort!==undefined?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}}),mt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),mt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return mt.globalEval(t),t}}}),mt.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),mt.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(i,o){e=mt("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),nt.head.appendChild(e[0])},abort:function(){n&&n()}}});var Ke,Je=[],Ye=/(=)\?(?=&|$)|\?\?/;mt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||mt.expando+"_"+ke++;return this[t]=!0,t}}),mt.ajaxPrefilter("json jsonp",function(e,n,i){var o,r,s,a=!1!==e.jsonp&&(Ye.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=mt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ye,"$1"+o):!1!==e.jsonp&&(e.url+=(Pe.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||mt.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},i.always(function(){r===undefined?mt(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,Je.push(o)),s&&mt.isFunction(r)&&r(s[0]),s=r=undefined}),"script"}),pt.createHTMLDocument=((Ke=nt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ke.childNodes.length),mt.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(pt.createHTMLDocument?((i=(e=nt.implementation.createHTMLDocument("")).createElement("base")).href=nt.location.href,e.head.appendChild(i)):e=nt),r=!n&&[],(o=Et.exec(t))?[e.createElement(o[1])]:(o=b([t],e,r),r&&r.length&&mt(r).remove(),mt.merge([],o.childNodes)));var i,o,r},mt.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=G(t.slice(a)),t=t.slice(0,a)),mt.isFunction(e)?(n=e,e=undefined):e&&"object"==typeof e&&(o="POST"),s.length>0&&mt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?mt("<div>").append(mt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},mt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){mt.fn[e]=function(t){return this.on(e,t)}}),mt.expr.pseudos.animated=function(t){return mt.grep(mt.timers,function(e){return t===e.elem}).length},mt.offset={setOffset:function(t,e,n){var i,o,r,s,a,u,l=mt.css(t,"position"),c=mt(t),h={};"static"===l&&(t.style.position="relative"),a=c.offset(),r=mt.css(t,"top"),u=mt.css(t,"left"),("absolute"===l||"fixed"===l)&&(r+u).indexOf("auto")>-1?(s=(i=c.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(u)||0),mt.isFunction(e)&&(e=e.call(t,n,mt.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):c.css(h)}},mt.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){mt.offset.setOffset(this,t,e)});var e,n,i,o,r=this[0];return r?r.getClientRects().length?(i=r.getBoundingClientRect(),n=(e=r.ownerDocument).documentElement,o=e.defaultView,{top:i.top+o.pageYOffset-n.clientTop,left:i.left+o.pageXOffset-n.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===mt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),o(t[0],"html")||(i=t.offset()),i={top:i.top+mt.css(t[0],"borderTopWidth",!0),left:i.left+mt.css(t[0],"borderLeftWidth",!0)}),{top:e.top-i.top-mt.css(n,"marginTop",!0),left:e.left-i.left-mt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===mt.css(t,"position");)t=t.offsetParent
;return t||Xt})}}),mt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;mt.fn[t]=function(i){return It(this,function(t,i,o){var r;if(mt.isWindow(t)?r=t:9===t.nodeType&&(r=t.defaultView),o===undefined)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o},t,i,arguments.length)}}),mt.each(["top","left"],function(t,e){mt.cssHooks[e]=I(pt.pixelPosition,function(t,n){if(n)return n=O(t,e),ue.test(n)?mt(t).position()[e]+"px":n})}),mt.each({Height:"height",Width:"width"},function(t,e){mt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){mt.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return It(this,function(e,n,o){var r;return mt.isWindow(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):o===undefined?mt.css(e,n,a):mt.style(e,n,o,a)},e,s?o:undefined,s)}})}),mt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),mt.holdReady=function(t){t?mt.readyWait++:mt.ready(!0)},mt.isArray=Array.isArray,mt.parseJSON=JSON.parse,mt.nodeName=o,"function"==typeof define&&define.amd&&define("jquery",[],function(){return mt});var $e=t.jQuery,Xe=t.$;return mt.noConflict=function(e){return t.$===mt&&(t.$=Xe),e&&t.jQuery===mt&&(t.jQuery=$e),mt},e||(t.jQuery=t.$=mt),mt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";function t(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}function e(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},at))}}function n(t){return t&&"[object Function]"==={}.toString.call(t)}function i(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function o(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function r(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=i(t),n=e.overflow,s=e.overflowX,a=e.overflowY;return/(auto|scroll)/.test(n+a+s)?t:r(o(t))}function s(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===i(e,"position")?s(e):e:t?t.ownerDocument.documentElement:document.documentElement}function a(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||s(t.firstElementChild)===t)}function u(t){return null!==t.parentNode?u(t.parentNode):t}function l(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var c=r.commonAncestorContainer;if(t!==c&&e!==c||i.contains(o))return a(c)?c:s(c);var h=u(t);return h.host?l(h.host,e):l(t,u(e).host)}function c(t){var e="top"===(arguments.length>1&&arguments[1]!==undefined?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}return t[e]}function h(t,e){var n=arguments.length>2&&arguments[2]!==undefined&&arguments[2],i=c(e,"top"),o=c(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function d(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function p(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],ht()?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function f(){var t=document.body,e=document.documentElement,n=ht()&&getComputedStyle(e);return{height:p("Height",t,e,n),width:p("Width",t,e,n)}}function m(t){return mt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function g(t){var e={};if(ht())try{e=t.getBoundingClientRect();var n=c(t,"top"),o=c(t,"left");e.top+=n,e.left+=o,e.bottom+=n,e.right+=o}catch(g){}else e=t.getBoundingClientRect();var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},s="HTML"===t.nodeName?f():{},a=s.width||t.clientWidth||r.right-r.left,u=s.height||t.clientHeight||r.bottom-r.top,l=t.offsetWidth-a,h=t.offsetHeight-u;if(l||h){var p=i(t);l-=d(p,"x"),h-=d(p,"y"),r.width-=l,r.height-=h}return m(r)}function v(t,e){var n=ht(),o="HTML"===e.nodeName,s=g(t),a=g(e),u=r(t),l=i(e),c=parseFloat(l.borderTopWidth,10),d=parseFloat(l.borderLeftWidth,10),p=m({top:s.top-a.top-c,left:s.left-a.left-d,width:s.width,height:s.height});if(p.marginTop=0,p.marginLeft=0,!n&&o){var f=parseFloat(l.marginTop,10),v=parseFloat(l.marginLeft,10);p.top-=c-f,p.bottom-=c-f,p.left-=d-v,p.right-=d-v,p.marginTop=f,p.marginLeft=v}return(n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(p=h(p,e)),p}function y(t){var e=t.ownerDocument.documentElement,n=v(t,e),i=Math.max(e.clientWidth,window.innerWidth||0),o=Math.max(e.clientHeight,window.innerHeight||0),r=c(e),s=c(e,"left");return m({top:r-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o})}function _(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===i(t,"position")||_(o(t)))}function b(t,e,n,i){var s={top:0,left:0},a=l(t,e);if("viewport"===i)s=y(a);else{var u=void 0;"scrollParent"===i?"BODY"===(u=r(o(e))).nodeName&&(u=t.ownerDocument.documentElement):u="window"===i?t.ownerDocument.documentElement:i;var c=v(u,a);if("HTML"!==u.nodeName||_(a))s=c;else{var h=f(),d=h.height,p=h.width;s.top+=c.top-c.marginTop,s.bottom=d+c.top,s.left+=c.left-c.marginLeft,s.right=p+c.left}}return s.left+=n,s.top+=n,s.right-=n,s.bottom-=n,s}function w(t){return t.width*t.height}function x(t,e,n,i,o){var r=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=b(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},u=Object.keys(a).map(function(t){return mt({key:t},a[t],{area:w(a[t])})}).sort(function(t,e){return e.area-t.area}),l=u.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),c=l.length>0?l[0].key:u[0].key,h=t.split("-")[1];return c+(h?"-"+h:"")}function A(t,e,n){return v(n,l(e,n))}function E(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function C(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function T(t,e,n){n=n.split("-")[0];var i=E(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",u=r?"height":"width",l=r?"width":"height";return o[s]=e[s]+e[u]/2-i[u]/2,o[a]=n===a?e[a]-i[l]:e[C(a)],o}function S(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=S(t,function(t){return t[e]===n});return t.indexOf(i)}function k(t,e,i){return(i===undefined?t:t.slice(0,L(t,"name",i))).forEach(function(t){t["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t["function"]||t.fn;t.enabled&&n(i)&&(e.offsets.popper=m(e.offsets.popper),e.offsets.reference=m(e.offsets.reference),e=i(e,t))}),e}function P(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=A(this.state,this.popper,this.reference),t.placement=x(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=T(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=k(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function D(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function O(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length-1;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function I(){return this.state.isDestroyed=!0,D(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[O("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function R(t){var e=t.ownerDocument;return e?e.defaultView:window}function N(t,e,n,i){var o="BODY"===t.nodeName,s=o?t.ownerDocument.defaultView:t;s.addEventListener(e,n,{passive:!0}),o||N(r(s.parentNode),e,n,i),i.push(s)}function M(t,e,n,i){n.updateBound=i,R(t).addEventListener("resize",n.updateBound,{passive:!0});var o=r(t);return N(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=M(this.reference,this.options,this.state,this.scheduleUpdate))}function j(t,e){return R(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function F(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function H(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function z(t,e){Object.keys(e).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&H(e[n])&&(i="px"),t.style[n]=e[n]+i})}function W(t,e){Object.keys(e).forEach(function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function q(t){return z(t.instance.popper,t.styles),W(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&z(t.arrowElement,t.arrowStyles),t}function V(t,e,n,i,o){var r=A(o,e,t),s=x(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),z(e,{position:"absolute"}),n}function U(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=S(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;r!==undefined&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=r!==undefined?r:e.gpuAcceleration,u=g(s(t.instance.popper)),l={position:o.position},c={left:Math.floor(o.left),top:Math.floor(o.top),bottom:Math.floor(o.bottom),right:Math.floor(o.right)},h="bottom"===n?"top":"bottom",d="right"===i?"left":"right",p=O("transform"),f=void 0,m=void 0;if(m="bottom"===h?-u.height+c.bottom:c.top,f="right"===d?-u.width+c.right:c.left,a&&p)l[p]="translate3d("+f+"px, "+m+"px, 0)",l[h]=0,l[d]=0,l.willChange="transform";else{var v="bottom"===h?-1:1,y="right"===d?-1:1;l[h]=m*v,l[d]=f*y,l.willChange=h+", "+d}var _={"x-placement":t.placement};return t.attributes=mt({},_,t.attributes),t.styles=mt({},l,t.styles),t.arrowStyles=mt({},t.offsets.arrow,t.arrowStyles),t}function Z(t,e,n){var i=S(t,function(t){return t.name===e}),o=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function G(t,e){var n;if(!Z(t.instance.modifiers,"arrow","keepTogether"))return t;var o=e.element;if("string"==typeof o){if(!(o=t.instance.popper.querySelector(o)))return t}else if(!t.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],s=t.offsets,a=s.popper,u=s.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",h=l?"Top":"Left",d=h.toLowerCase(),p=l?"left":"top",f=l?"bottom":"right",g=E(o)[c];u[f]-g<a[d]&&(t.offsets.popper[d]-=a[d]-(u[f]-g)),u[d]+g>a[f]&&(t.offsets.popper[d]+=u[d]+g-a[f]),t.offsets.popper=m(t.offsets.popper);var v=u[d]+u[c]/2-g/2,y=i(t.instance.popper),_=parseFloat(y["margin"+h],10),b=parseFloat(y["border"+h+"Width"],10),w=v-t.offsets.popper[d]-_-b;return w=Math.max(Math.min(a[c]-g,w),0),t.arrowElement=o,t.offsets.arrow=(ft(n={},d,Math.round(w)),ft(n,p,""),n),t}function K(t){return"end"===t?"start":"start"===t?"end":t}function J(t){var e=arguments.length>1&&arguments[1]!==undefined&&arguments[1],n=vt.indexOf(t),i=vt.slice(n+1).concat(vt.slice(0,n));return e?i.reverse():i}function Y(t,e){if(D(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=b(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),i=t.placement.split("-")[0],o=C(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case yt.FLIP:s=[i,o];break;case yt.CLOCKWISE:s=J(i);break;case yt.COUNTERCLOCKWISE:s=J(i,!0);break;default:s=e.behavior}return s.forEach(function(a,u){if(i!==a||s.length===u+1)return t;i=t.placement.split("-")[0],o=C(i);var l=t.offsets.popper,c=t.offsets.reference,h=Math.floor,d="left"===i&&h(l.right)>h(c.left)||"right"===i&&h(l.left)<h(c.right)||"top"===i&&h(l.bottom)>h(c.top)||"bottom"===i&&h(l.top)<h(c.bottom),p=h(l.left)<h(n.left),f=h(l.right)>h(n.right),m=h(l.top)<h(n.top),g=h(l.bottom)>h(n.bottom),v="left"===i&&p||"right"===i&&f||"top"===i&&m||"bottom"===i&&g,y=-1!==["top","bottom"].indexOf(i),_=!!e.flipVariations&&(y&&"start"===r&&p||y&&"end"===r&&f||!y&&"start"===r&&m||!y&&"end"===r&&g);(d||v||_)&&(t.flipped=!0,(d||v)&&(i=s[u+1]),_&&(r=K(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=mt({},t.offsets.popper,T(t.instance.popper,t.offsets.reference,t.placement)),t=k(t.instance.modifiers,t,"flip"))}),t}function $(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",u=s?"left":"top",l=s?"width":"height";return n[a]<r(i[u])&&(t.offsets.popper[u]=r(i[u])-n[l]),n[u]>r(i[a])&&(t.offsets.popper[u]=r(i[a])),t}function X(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return m(a)[e]/100*r}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}function Q(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=s.indexOf(S(s,function(t){return-1!==t.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==a?[s.slice(0,a).concat([s[a].split(u)[0]]),[s[a].split(u)[1]].concat(s.slice(a+1))]:[s];return(l=l.map(function(t,i){var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)},[]).map(function(t){return X(t,o,e,n)})})).forEach(function(t,e){t.forEach(function(n,i){H(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))})}),o}function tt(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],u=void 0;return u=H(+n)?[+n,0]:Q(n,r,s,a),"left"===a?(r.top+=u[0],r.left-=u[1]):"right"===a?(r.top+=u[0],r.left+=u[1]):"top"===a?(r.left+=u[0],r.top-=u[1]):"bottom"===a&&(r.left+=u[0],r.top+=u[1]),t.popper=r,t}function et(t,e){var n=e.boundariesElement||s(t.instance.popper);t.instance.reference===n&&(n=s(n));var i=b(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=i;var o=e.priority,r=t.offsets.popper,a={primary:function(t){var n=r[t];return r[t]<i[t]&&!e.escapeWithReference&&(n=Math.max(r[t],i[t])),ft({},t,n)},secondary:function(t){var n="right"===t?"left":"top",o=r[n];return r[t]>i[t]&&!e.escapeWithReference&&(o=Math.min(r[n],i[t]-("right"===t?r.width:r.height))),ft({},n,o)}};return o.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";r=mt({},r,a[e](t))}),t.offsets.popper=r,t}function nt(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),u=a?"left":"top",l=a?"width":"height",c={start:ft({},u,r[u]),end:ft({},u,r[u]+r[l]-s[l])};t.offsets.popper=mt({},s,c[i])}return t}function it(t){if(!Z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=S(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function ot(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=C(e),t.offsets.popper=m(o),t}for(var rt="undefined"!=typeof window&&"undefined"!=typeof document,st=["Edge","Trident","Firefox"],at=0,ut=0;ut<st.length;ut+=1)if(rt&&navigator.userAgent.indexOf(st[ut])>=0){at=1;break}var lt=rt&&window.Promise?t:e,ct=undefined,ht=function(){return ct===undefined&&(ct=-1!==navigator.appVersion.indexOf("MSIE 10")),ct},dt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},pt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),ft=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},mt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},gt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],vt=gt.slice(3),yt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},_t={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:nt},offset:{order:200,enabled:!0,fn:tt,offset:0},preventOverflow:{order:300,enabled:!0,fn:et,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:$},arrow:{order:500,enabled:!0,fn:G,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Y,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ot},hide:{order:800,enabled:!0,fn:it},computeStyle:{order:850,enabled:!0,fn:U,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:q,onLoad:V,gpuAcceleration:undefined}}},bt=function(){function t(e,i){var o=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};dt(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=lt(this.update.bind(this)),this.options=mt({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(mt({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){o.options.modifiers[e]=mt({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return mt({name:t},o.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&n(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return pt(t,[{key:"update",value:function(){return P.call(this)}},{key:"destroy",value:function(){return I.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),t}();return bt.Utils=("undefined"!=typeof window?window:global).PopperUtils,bt.placements=gt,bt.Defaults=_t,bt}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}e=e&&e.hasOwnProperty("default")?e["default"]:e,n=n&&n.hasOwnProperty("default")?n["default"]:n;var a,u,l,c,h,d,p,f,m,g,v,y,_,b,w,x,A,E,C,T,S,L,k,P,D,O,I,R,N,M,B,j,F,H,z,W,q,V,U,Z,G,K,J,Y,$,X,Q,tt,et,nt,it,ot,rt,st,at,ut,lt,ct,ht,dt,pt,ft,mt,gt,vt,yt,_t,bt,wt,xt,At,Et,Ct,Tt,St,Lt,kt,Pt,Dt,Ot,It,Rt,Nt,Mt,Bt,jt,Ft,Ht,zt,Wt,qt,Vt,Ut,Zt,Gt,Kt,Jt,Yt,$t,Xt,Qt,te,ee,ne,ie,oe,re,se,ae,ue,le,ce,he,de,pe,fe,me,ge,ve,ye,_e,be,we,xe,Ae,Ee,Ce,Te,Se,Le,ke,Pe,De,Oe,Ie,Re,Ne,Me,Be,je,Fe,He,ze,We,qe,Ve,Ue,Ze,Ge,Ke,Je,Ye=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(){return{bindType:a.end,delegateType:a.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):undefined}}}function i(){return("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"}}function o(e){var n=this,i=!1;return t(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},e),this}function r(){a=i(),t.fn.emulateTransitionEnd=o,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=n())}function s(e){return e="function"==typeof t.escapeSelector?t.escapeSelector(e).substr(1):e.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")}var a=!1,u=1e6,l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(Math.random()*u)}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n=e.getAttribute("data-target");n&&"#"!==n||(n=e.getAttribute("href")||""),"#"===n.charAt(0)&&(n=s(n));try{return t(document).find(n).length>0?n:null}catch(i){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,n,i){for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)){var r=i[o],s=n[o],a=s&&l.isElement(s)?"element":e(s);if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+a+'" but expected type "'+r+'".')}}};return r(),l}(e),$e=(u="alert",l="4.0.0",h="."+(c="bs.alert"),d=".data-api",p=(a=e).fn[u],f=150,m={DISMISS:'[data-dismiss="alert"]'},g={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+d},v={ALERT:"alert",FADE:"fade",SHOW:"show"},y=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){a.removeData(this._element,c),this._element=null},e._getRootElement=function(t){var e=Ye.getSelectorFromElement(t),n=!1;return e&&(n=a(e)[0]),n||(n=a(t).closest("."+v.ALERT)[0]),n},e._triggerCloseEvent=function(t){var e=a.Event(g.CLOSE);return a(t).trigger(e),e},e._removeElement=function(t){var e=this;a(t).removeClass(v.SHOW),Ye.supportsTransitionEnd()&&a(t).hasClass(v.FADE)?a(t).one(Ye.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(f):this._destroyElement(t)},e._destroyElement=function(t){a(t).detach().trigger(g.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=a(this),i=n.data(c);i||(i=new t(this),n.data(c,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return l}}]),t}(),a(document).on(g.CLICK_DATA_API,m.DISMISS,y._handleDismiss(new y)),a.fn[u]=y._jQueryInterface,a.fn[u].Constructor=y,a.fn[u].noConflict=function(){return a.fn[u]=p,y._jQueryInterface},y),Xe=(b="button",w="4.0.0",A="."+(x="bs.button"),E=".data-api",C=(_=e).fn[b],T={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},S={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},L={CLICK_DATA_API:"click"+A+E,FOCUS_BLUR_DATA_API:"focus"+A+E+" blur"+A+E},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=_(this._element).closest(S.DATA_TOGGLE)[0];if(n){var i=_(this._element).find(S.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&_(this._element).hasClass(T.ACTIVE))t=!1;else{var o=_(n).find(S.ACTIVE)[0];o&&_(o).removeClass(T.ACTIVE)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!_(this._element).hasClass(T.ACTIVE),_(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!_(this._element).hasClass(T.ACTIVE)),t&&_(this._element).toggleClass(T.ACTIVE)},e.dispose=function(){_.removeData(this._element,x),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=_(this).data(x);n||(n=new t(this),_(this).data(x,n)),"toggle"===e&&n[e]()})},o(t,null,[{key:"VERSION",get:function(){return w}}]),t}(),_(document).on(L.CLICK_DATA_API,S.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var e=t.target;_(e).hasClass(T.BUTTON)||(e=_(e).closest(S.BUTTON)),k._jQueryInterface.call(_(e),"toggle")}).on(L.FOCUS_BLUR_DATA_API,S.DATA_TOGGLE_CARROT,function(t){var e=_(t.target).closest(S.BUTTON)[0];_(e).toggleClass(T.FOCUS,/^focus(in)?$/.test(t.type))}),_.fn[b]=k._jQueryInterface,_.fn[b].Constructor=k,_.fn[b].noConflict=function(){return _.fn[b]=C,k._jQueryInterface},k),Qe=(D="carousel",O="4.0.0",R="."+(I="bs.carousel"),N=".data-api",M=(P=e).fn[D],B=600,j=37,F=39,H=500,z={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},W={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},V={SLIDE:"slide"+R,SLID:"slid"+R,KEYDOWN:"keydown"+R,MOUSEENTER:"mouseenter"+R,MOUSELEAVE:"mouseleave"+R,TOUCHEND:"touchend"+R,LOAD_DATA_API:"load"+R+N,CLICK_DATA_API:"click"+R+N},U={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},Z={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},G=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=P(this._element).find(Z.INDICATORS)[0],this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(q.NEXT)},e.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(q.PREV)},e.pause=function(t){t||(this._isPaused=!0),P(this._element).find(Z.NEXT_PREV)[0]&&Ye.supportsTransitionEnd()&&(Ye.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=P(this._element).find(Z.ACTIVE_ITEM)[0];var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(V.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=t>n?q.NEXT:q.PREV;this._slide(i,this._items[t])}},e.dispose=function(){P(this._element).off(R),P.removeData(this._element,I),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},z,t),Ye.typeCheckConfig(D,t,W),t},e._addEventListeners=function(){var t=this;this._config.keyboard&&P(this._element).on(V.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(P(this._element).on(V.MOUSEENTER,function(e){return t.pause(e)}).on(V.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&P(this._element).on(V.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},H+t._config.interval)}))},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case j:t.preventDefault(),this.prev();break;case F:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=P.makeArray(P(t).parent().find(Z.ITEM)),this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===q.NEXT,i=t===q.PREV,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===q.PREV?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(P(this._element).find(Z.ACTIVE_ITEM)[0]),o=P.Event(V.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return P(this._element).trigger(o),o},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){P(this._indicatorsElement).find(Z.ACTIVE).removeClass(U.ACTIVE);var e=this._indicatorsElement.children[this._getItemIndex(t)];e&&P(e).addClass(U.ACTIVE)}},e._slide=function(t,e){var n,i,o,r=this,s=P(this._element).find(Z.ACTIVE_ITEM)[0],a=this._getItemIndex(s),u=e||s&&this._getItemByDirection(t,s),l=this._getItemIndex(u),c=Boolean(this._interval);if(t===q.NEXT?(n=U.LEFT,i=U.NEXT,o=q.LEFT):(n=U.RIGHT,i=U.PREV,o=q.RIGHT),u&&P(u).hasClass(U.ACTIVE))this._isSliding=!1;else if(!this._triggerSlideEvent(u,o).isDefaultPrevented()&&s&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u);var h=P.Event(V.SLID,{relatedTarget:u,direction:o,from:a,to:l});Ye.supportsTransitionEnd()&&P(this._element).hasClass(U.SLIDE)?(P(u).addClass(i),Ye.reflow(u),P(s).addClass(n),P(u).addClass(n),P(s).one(Ye.TRANSITION_END,function(){P(u).removeClass(n+" "+i).addClass(U.ACTIVE),P(s).removeClass(U.ACTIVE+" "+i+" "+n),r._isSliding=!1,setTimeout(function(){return P(r._element).trigger(h)},0)}).emulateTransitionEnd(B)):(P(s).removeClass(U.ACTIVE),P(u).addClass(U.ACTIVE),this._isSliding=!1,P(this._element).trigger(h)),c&&this.cycle()}},t._jQueryInterface=function(e){return this.each(function(){var n=P(this).data(I),i=r({},z,P(this).data());"object"==typeof e&&(i=r({},i,e));var o="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),P(this).data(I,n)),"number"==typeof e)n.to(e);else if("string"==typeof o){if("undefined"==typeof n[o])throw new TypeError('No method named "'+o+'"');n[o]()}else i.interval&&(n.pause(),n.cycle())})},t._dataApiClickHandler=function(e){var n=Ye.getSelectorFromElement(this);if(n){var i=P(n)[0];if(i&&P(i).hasClass(U.CAROUSEL)){var o=r({},P(i).data(),P(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),t._jQueryInterface.call(P(i),o),s&&P(i).data(I).to(s),e.preventDefault()}}},
o(t,null,[{key:"VERSION",get:function(){return O}},{key:"Default",get:function(){return z}}]),t}(),P(document).on(V.CLICK_DATA_API,Z.DATA_SLIDE,G._dataApiClickHandler),P(window).on(V.LOAD_DATA_API,function(){P(Z.DATA_RIDE).each(function(){var t=P(this);G._jQueryInterface.call(t,t.data())})}),P.fn[D]=G._jQueryInterface,P.fn[D].Constructor=G,P.fn[D].noConflict=function(){return P.fn[D]=M,G._jQueryInterface},G),tn=(J="collapse",Y="4.0.0",X="."+($="bs.collapse"),Q=".data-api",tt=(K=e).fn[J],et=600,nt={toggle:!0,parent:""},it={toggle:"boolean",parent:"(string|element)"},ot={SHOW:"show"+X,SHOWN:"shown"+X,HIDE:"hide"+X,HIDDEN:"hidden"+X,CLICK_DATA_API:"click"+X+Q},rt={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},st={WIDTH:"width",HEIGHT:"height"},at={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},ut=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=K.makeArray(K('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=K(at.DATA_TOGGLE),i=0;i<n.length;i++){var o=n[i],r=Ye.getSelectorFromElement(o);null!==r&&K(r).filter(t).length>0&&(this._selector=r,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){K(this._element).hasClass(rt.SHOW)?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!this._isTransitioning&&!K(this._element).hasClass(rt.SHOW)&&(this._parent&&0===(e=K.makeArray(K(this._parent).find(at.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(n=K(e).not(this._selector).data($))&&n._isTransitioning))){var o=K.Event(ot.SHOW);if(K(this._element).trigger(o),!o.isDefaultPrevented()){e&&(t._jQueryInterface.call(K(e).not(this._selector),"hide"),n||K(e).data($,null));var r=this._getDimension();K(this._element).removeClass(rt.COLLAPSE).addClass(rt.COLLAPSING),this._element.style[r]=0,this._triggerArray.length>0&&K(this._triggerArray).removeClass(rt.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var s=function(){K(i._element).removeClass(rt.COLLAPSING).addClass(rt.COLLAPSE).addClass(rt.SHOW),i._element.style[r]="",i.setTransitioning(!1),K(i._element).trigger(ot.SHOWN)};if(Ye.supportsTransitionEnd()){var a="scroll"+(r[0].toUpperCase()+r.slice(1));K(this._element).one(Ye.TRANSITION_END,s).emulateTransitionEnd(et),this._element.style[r]=this._element[a]+"px"}else s()}}},e.hide=function(){var t=this;if(!this._isTransitioning&&K(this._element).hasClass(rt.SHOW)){var e=K.Event(ot.HIDE);if(K(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();if(this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",Ye.reflow(this._element),K(this._element).addClass(rt.COLLAPSING).removeClass(rt.COLLAPSE).removeClass(rt.SHOW),this._triggerArray.length>0)for(var i=0;i<this._triggerArray.length;i++){var o=this._triggerArray[i],r=Ye.getSelectorFromElement(o);if(null!==r)K(r).hasClass(rt.SHOW)||K(o).addClass(rt.COLLAPSED).attr("aria-expanded",!1)}this.setTransitioning(!0);var s=function(){t.setTransitioning(!1),K(t._element).removeClass(rt.COLLAPSING).addClass(rt.COLLAPSE).trigger(ot.HIDDEN)};this._element.style[n]="",Ye.supportsTransitionEnd()?K(this._element).one(Ye.TRANSITION_END,s).emulateTransitionEnd(et):s()}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){K.removeData(this._element,$),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=r({},nt,t)).toggle=Boolean(t.toggle),Ye.typeCheckConfig(J,t,it),t},e._getDimension=function(){return K(this._element).hasClass(st.WIDTH)?st.WIDTH:st.HEIGHT},e._getParent=function(){var e=this,n=null;Ye.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=K(this._config.parent)[0];var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return K(n).find(i).each(function(n,i){e._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])}),n},e._addAriaAndCollapsedClass=function(t,e){if(t){var n=K(t).hasClass(rt.SHOW);e.length>0&&K(e).toggleClass(rt.COLLAPSED,!n).attr("aria-expanded",n)}},t._getTargetFromElement=function(t){var e=Ye.getSelectorFromElement(t);return e?K(e)[0]:null},t._jQueryInterface=function(e){return this.each(function(){var n=K(this),i=n.data($),o=r({},nt,n.data(),"object"==typeof e&&e);if(!i&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),i||(i=new t(this,o),n.data($,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},o(t,null,[{key:"VERSION",get:function(){return Y}},{key:"Default",get:function(){return nt}}]),t}(),K(document).on(ot.CLICK_DATA_API,at.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=K(this),n=Ye.getSelectorFromElement(this);K(n).each(function(){var t=K(this),n=t.data($)?"toggle":e.data();ut._jQueryInterface.call(t,n)})}),K.fn[J]=ut._jQueryInterface,K.fn[J].Constructor=ut,K.fn[J].noConflict=function(){return K.fn[J]=tt,ut._jQueryInterface},ut),en=(ct="dropdown",ht="4.0.0",pt="."+(dt="bs.dropdown"),ft=".data-api",mt=(lt=e).fn[ct],gt=27,vt=32,yt=9,_t=38,bt=40,wt=3,xt=new RegExp(_t+"|"+bt+"|"+gt),At={HIDE:"hide"+pt,HIDDEN:"hidden"+pt,SHOW:"show"+pt,SHOWN:"shown"+pt,CLICK:"click"+pt,CLICK_DATA_API:"click"+pt+ft,KEYDOWN_DATA_API:"keydown"+pt+ft,KEYUP_DATA_API:"keyup"+pt+ft},Et={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},Ct={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},Tt={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},St={offset:0,flip:!0,boundary:"scrollParent"},Lt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},kt=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!lt(this._element).hasClass(Et.DISABLED)){var e=t._getParentFromElement(this._element),i=lt(this._menu).hasClass(Et.SHOW);if(t._clearMenus(),!i){var o={relatedTarget:this._element},r=lt.Event(At.SHOW,o);if(lt(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if(void 0===n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var s=this._element;lt(e).hasClass(Et.DROPUP)&&(lt(this._menu).hasClass(Et.MENULEFT)||lt(this._menu).hasClass(Et.MENURIGHT))&&(s=e),"scrollParent"!==this._config.boundary&&lt(e).addClass(Et.POSITION_STATIC),this._popper=new n(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===lt(e).closest(Ct.NAVBAR_NAV).length&&lt("body").children().on("mouseover",null,lt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),lt(this._menu).toggleClass(Et.SHOW),lt(e).toggleClass(Et.SHOW).trigger(lt.Event(At.SHOWN,o))}}}},e.dispose=function(){lt.removeData(this._element,dt),lt(this._element).off(pt),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;lt(this._element).on(At.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},e._getConfig=function(t){return t=r({},this.constructor.Default,lt(this._element).data(),t),Ye.typeCheckConfig(ct,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);this._menu=lt(e).find(Ct.MENU)[0]}return this._menu},e._getPlacement=function(){var t=lt(this._element).parent(),e=Tt.BOTTOM;return t.hasClass(Et.DROPUP)?(e=Tt.TOP,lt(this._menu).hasClass(Et.MENURIGHT)&&(e=Tt.TOPEND)):t.hasClass(Et.DROPRIGHT)?e=Tt.RIGHT:t.hasClass(Et.DROPLEFT)?e=Tt.LEFT:lt(this._menu).hasClass(Et.MENURIGHT)&&(e=Tt.BOTTOMEND),e},e._detectNavbar=function(){return lt(this._element).closest(".navbar").length>0},e._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},t._jQueryInterface=function(e){return this.each(function(){var n=lt(this).data(dt);if(n||(n=new t(this,"object"==typeof e?e:null),lt(this).data(dt,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},t._clearMenus=function(e){if(!e||e.which!==wt&&("keyup"!==e.type||e.which===yt))for(var n=lt.makeArray(lt(Ct.DATA_TOGGLE)),i=0;i<n.length;i++){var o=t._getParentFromElement(n[i]),r=lt(n[i]).data(dt),s={relatedTarget:n[i]};if(r){var a=r._menu;if(lt(o).hasClass(Et.SHOW)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&e.which===yt)&&lt.contains(o,e.target))){var u=lt.Event(At.HIDE,s);lt(o).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&lt("body").children().off("mouseover",null,lt.noop),n[i].setAttribute("aria-expanded","false"),lt(a).removeClass(Et.SHOW),lt(o).removeClass(Et.SHOW).trigger(lt.Event(At.HIDDEN,s)))}}}},t._getParentFromElement=function(t){var e,n=Ye.getSelectorFromElement(t);return n&&(e=lt(n)[0]),e||t.parentNode},t._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(e.which===vt||e.which!==gt&&(e.which!==bt&&e.which!==_t||lt(e.target).closest(Ct.MENU).length)):xt.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!lt(this).hasClass(Et.DISABLED))){var n=t._getParentFromElement(this),i=lt(n).hasClass(Et.SHOW);if((i||e.which===gt&&e.which===vt)&&(!i||e.which!==gt&&e.which!==vt)){var o=lt(n).find(Ct.VISIBLE_ITEMS).get();if(0!==o.length){var r=o.indexOf(e.target);e.which===_t&&r>0&&r--,e.which===bt&&r<o.length-1&&r++,r<0&&(r=0),o[r].focus()}}else{if(e.which===gt){var s=lt(n).find(Ct.DATA_TOGGLE)[0];lt(s).trigger("focus")}lt(this).trigger("click")}}},o(t,null,[{key:"VERSION",get:function(){return ht}},{key:"Default",get:function(){return St}},{key:"DefaultType",get:function(){return Lt}}]),t}(),lt(document).on(At.KEYDOWN_DATA_API,Ct.DATA_TOGGLE,kt._dataApiKeydownHandler).on(At.KEYDOWN_DATA_API,Ct.MENU,kt._dataApiKeydownHandler).on(At.CLICK_DATA_API+" "+At.KEYUP_DATA_API,kt._clearMenus).on(At.CLICK_DATA_API,Ct.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),kt._jQueryInterface.call(lt(this),"toggle")}).on(At.CLICK_DATA_API,Ct.FORM_CHILD,function(t){t.stopPropagation()}),lt.fn[ct]=kt._jQueryInterface,lt.fn[ct].Constructor=kt,lt.fn[ct].noConflict=function(){return lt.fn[ct]=mt,kt._jQueryInterface},kt),nn=(Dt="modal",Ot="4.0.0",Rt="."+(It="bs.modal"),Nt=".data-api",Mt=(Pt=e).fn[Dt],Bt=300,jt=150,Ft=27,Ht={backdrop:!0,keyboard:!0,focus:!0,show:!0},zt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Wt={HIDE:"hide"+Rt,HIDDEN:"hidden"+Rt,SHOW:"show"+Rt,SHOWN:"shown"+Rt,FOCUSIN:"focusin"+Rt,RESIZE:"resize"+Rt,CLICK_DISMISS:"click.dismiss"+Rt,KEYDOWN_DISMISS:"keydown.dismiss"+Rt,MOUSEUP_DISMISS:"mouseup.dismiss"+Rt,MOUSEDOWN_DISMISS:"mousedown.dismiss"+Rt,CLICK_DATA_API:"click"+Rt+Nt},qt={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},Vt={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},Ut=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=Pt(t).find(Vt.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){Ye.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE)&&(this._isTransitioning=!0);var n=Pt.Event(Wt.SHOW,{relatedTarget:t});Pt(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),Pt(document.body).addClass(qt.OPEN),this._setEscapeEvent(),this._setResizeEvent(),Pt(this._element).on(Wt.CLICK_DISMISS,Vt.DATA_DISMISS,function(t){return e.hide(t)}),Pt(this._dialog).on(Wt.MOUSEDOWN_DISMISS,function(){Pt(e._element).one(Wt.MOUSEUP_DISMISS,function(t){Pt(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=Pt.Event(Wt.HIDE);if(Pt(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=Ye.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE);i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),Pt(document).off(Wt.FOCUSIN),Pt(this._element).removeClass(qt.SHOW),Pt(this._element).off(Wt.CLICK_DISMISS),Pt(this._dialog).off(Wt.MOUSEDOWN_DISMISS),i?Pt(this._element).one(Ye.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(Bt):this._hideModal()}}},e.dispose=function(){Pt.removeData(this._element,It),Pt(window,document,this._element,this._backdrop).off(Rt),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=r({},Ht,t),Ye.typeCheckConfig(Dt,t,zt),t},e._showElement=function(t){var e=this,n=Ye.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&Ye.reflow(this._element),Pt(this._element).addClass(qt.SHOW),this._config.focus&&this._enforceFocus();var i=Pt.Event(Wt.SHOWN,{relatedTarget:t}),o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,Pt(e._element).trigger(i)};n?Pt(this._dialog).one(Ye.TRANSITION_END,o).emulateTransitionEnd(Bt):o()},e._enforceFocus=function(){var t=this;Pt(document).off(Wt.FOCUSIN).on(Wt.FOCUSIN,function(e){document!==e.target&&t._element!==e.target&&0===Pt(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?Pt(this._element).on(Wt.KEYDOWN_DISMISS,function(e){e.which===Ft&&(e.preventDefault(),t.hide())}):this._isShown||Pt(this._element).off(Wt.KEYDOWN_DISMISS)},e._setResizeEvent=function(){var t=this;this._isShown?Pt(window).on(Wt.RESIZE,function(e){return t.handleUpdate(e)}):Pt(window).off(Wt.RESIZE)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){Pt(document.body).removeClass(qt.OPEN),t._resetAdjustments(),t._resetScrollbar(),Pt(t._element).trigger(Wt.HIDDEN)})},e._removeBackdrop=function(){this._backdrop&&(Pt(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=Pt(this._element).hasClass(qt.FADE)?qt.FADE:"";if(this._isShown&&this._config.backdrop){var i=Ye.supportsTransitionEnd()&&n;if(this._backdrop=document.createElement("div"),this._backdrop.className=qt.BACKDROP,n&&Pt(this._backdrop).addClass(n),Pt(this._backdrop).appendTo(document.body),Pt(this._element).on(Wt.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),i&&Ye.reflow(this._backdrop),Pt(this._backdrop).addClass(qt.SHOW),!t)return;if(!i)return void t();Pt(this._backdrop).one(Ye.TRANSITION_END,t).emulateTransitionEnd(jt)}else if(!this._isShown&&this._backdrop){Pt(this._backdrop).removeClass(qt.SHOW);var o=function(){e._removeBackdrop(),t&&t()};Ye.supportsTransitionEnd()&&Pt(this._element).hasClass(qt.FADE)?Pt(this._backdrop).one(Ye.TRANSITION_END,o).emulateTransitionEnd(jt):o()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){Pt(Vt.FIXED_CONTENT).each(function(e,n){var i=Pt(n)[0].style.paddingRight,o=Pt(n).css("padding-right");Pt(n).data("padding-right",i).css("padding-right",parseFloat(o)+t._scrollbarWidth+"px")}),Pt(Vt.STICKY_CONTENT).each(function(e,n){var i=Pt(n)[0].style.marginRight,o=Pt(n).css("margin-right");Pt(n).data("margin-right",i).css("margin-right",parseFloat(o)-t._scrollbarWidth+"px")}),Pt(Vt.NAVBAR_TOGGLER).each(function(e,n){var i=Pt(n)[0].style.marginRight,o=Pt(n).css("margin-right");Pt(n).data("margin-right",i).css("margin-right",parseFloat(o)+t._scrollbarWidth+"px")});var e=document.body.style.paddingRight,n=Pt("body").css("padding-right");Pt("body").data("padding-right",e).css("padding-right",parseFloat(n)+this._scrollbarWidth+"px")}},e._resetScrollbar=function(){Pt(Vt.FIXED_CONTENT).each(function(t,e){var n=Pt(e).data("padding-right");void 0!==n&&Pt(e).css("padding-right",n).removeData("padding-right")}),Pt(Vt.STICKY_CONTENT+", "+Vt.NAVBAR_TOGGLER).each(function(t,e){var n=Pt(e).data("margin-right");void 0!==n&&Pt(e).css("margin-right",n).removeData("margin-right")});var t=Pt("body").data("padding-right");void 0!==t&&Pt("body").css("padding-right",t).removeData("padding-right")},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className=qt.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each(function(){var i=Pt(this).data(It),o=r({},t.Default,Pt(this).data(),"object"==typeof e&&e);if(i||(i=new t(this,o),Pt(this).data(It,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](n)}else o.show&&i.show(n)})},o(t,null,[{key:"VERSION",get:function(){return Ot}},{key:"Default",get:function(){return Ht}}]),t}(),Pt(document).on(Wt.CLICK_DATA_API,Vt.DATA_TOGGLE,function(t){var e,n=this,i=Ye.getSelectorFromElement(this);i&&(e=Pt(i)[0]);var o=Pt(e).data(It)?"toggle":r({},Pt(e).data(),Pt(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=Pt(e).one(Wt.SHOW,function(t){t.isDefaultPrevented()||s.one(Wt.HIDDEN,function(){Pt(n).is(":visible")&&n.focus()})});Ut._jQueryInterface.call(Pt(e),o,this)}),Pt.fn[Dt]=Ut._jQueryInterface,Pt.fn[Dt].Constructor=Ut,Pt.fn[Dt].noConflict=function(){return Pt.fn[Dt]=Mt,Ut._jQueryInterface},Ut),on=(Gt="tooltip",Kt="4.0.0",Yt="."+(Jt="bs.tooltip"),$t=(Zt=e).fn[Gt],Xt=150,Qt="bs-tooltip",te=new RegExp("(^|\\s)"+Qt+"\\S+","g"),ee={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},ne={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},ie={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},oe={SHOW:"show",OUT:"out"},re={HIDE:"hide"+Yt,HIDDEN:"hidden"+Yt,SHOW:"show"+Yt,SHOWN:"shown"+Yt,INSERTED:"inserted"+Yt,CLICK:"click"+Yt,FOCUSIN:"focusin"+Yt,FOCUSOUT:"focusout"+Yt,MOUSEENTER:"mouseenter"+Yt,MOUSELEAVE:"mouseleave"+Yt},se={FADE:"fade",SHOW:"show"},ae={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},ue={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},le=function(){function t(t,e){if(void 0===n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=Zt(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(Zt(this.getTipElement()).hasClass(se.SHOW))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),Zt.removeData(this.element,this.constructor.DATA_KEY),Zt(this.element).off(this.constructor.EVENT_KEY),Zt(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&Zt(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var e=this;if("none"===Zt(this.element).css("display"))throw new Error("Please use show on visible elements");var i=Zt.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){Zt(this.element).trigger(i);var o=Zt.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!o)return;var r=this.getTipElement(),s=Ye.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&Zt(r).addClass(se.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(a);this.addAttachmentClass(u);var l=!1===this.config.container?document.body:Zt(this.config.container);Zt(r).data(this.constructor.DATA_KEY,this),Zt.contains(this.element.ownerDocument.documentElement,this.tip)||Zt(r).appendTo(l),Zt(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:u,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:ae.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),Zt(r).addClass(se.SHOW),"ontouchstart"in document.documentElement&&Zt("body").children().on("mouseover",null,Zt.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,Zt(e.element).trigger(e.constructor.Event.SHOWN),t===oe.OUT&&e._leave(null,e)};Ye.supportsTransitionEnd()&&Zt(this.tip).hasClass(se.FADE)?Zt(this.tip).one(Ye.TRANSITION_END,c).emulateTransitionEnd(t._TRANSITION_DURATION):c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=Zt.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==oe.SHOW&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),Zt(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};Zt(this.element).trigger(i),i.isDefaultPrevented()||(Zt(n).removeClass(se.SHOW),"ontouchstart"in document.documentElement&&Zt("body").children().off("mouseover",null,Zt.noop),this._activeTrigger[ue.CLICK]=!1,this._activeTrigger[ue.FOCUS]=!1,this._activeTrigger[ue.HOVER]=!1,Ye.supportsTransitionEnd()&&Zt(this.tip).hasClass(se.FADE)?Zt(n).one(Ye.TRANSITION_END,o).emulateTransitionEnd(Xt):o(),this._hoverState="")},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){Zt(this.getTipElement()).addClass(Qt+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||Zt(this.config.template)[0],this.tip},e.setContent=function(){var t=Zt(this.getTipElement());this.setElementContent(t.find(ae.TOOLTIP_INNER),this.getTitle()),t.removeClass(se.FADE+" "+se.SHOW)},e.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?Zt(e).parent().is(t)||t.empty().append(e):t.text(Zt(e).text()):t[n?"html":"text"](e)},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getAttachment=function(t){return ne[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)Zt(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(e!==ue.MANUAL){var n=e===ue.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=e===ue.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;Zt(t.element).on(n,t.config.selector,function(e){return t._enter(e)}).on(i,t.config.selector,function(e){return t._leave(e)})}Zt(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||Zt(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?ue.FOCUS:ue.HOVER]=!0),Zt(e.getTipElement()).hasClass(se.SHOW)||e._hoverState===oe.SHOW?e._hoverState=oe.SHOW:(clearTimeout(e._timeout),e._hoverState=oe.SHOW,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===oe.SHOW&&e.show()},e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||Zt(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),Zt(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?ue.FOCUS:ue.HOVER]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=oe.OUT,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===oe.OUT&&e.hide()},e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){return"number"==typeof(t=r({},this.constructor.Default,Zt(this.element).data(),t)).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Ye.typeCheckConfig(Gt,t,this.constructor.DefaultType),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=Zt(this.getTipElement()),e=t.attr("class").match(te);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(Zt(t).removeClass(se.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each(function(){var n=Zt(this).data(Jt),i="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new t(this,i),Zt(this).data(Jt,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},o(t,null,[{key:"VERSION",get:function(){return Kt}},{key:"Default",get:function(){return ie}},{key:"NAME",get:function(){return Gt}},{key:"DATA_KEY",get:function(){return Jt}},{key:"Event",get:function(){return re}},{key:"EVENT_KEY",get:function(){return Yt}},{key:"DefaultType",get:function(){return ee}}]),t}(),Zt.fn[Gt]=le._jQueryInterface,Zt.fn[Gt].Constructor=le,Zt.fn[Gt].noConflict=function(){return Zt.fn[Gt]=$t,le._jQueryInterface},le),rn=(he="popover",de="4.0.0",fe="."+(pe="bs.popover"),me=(ce=e).fn[he],ge="bs-popover",ve=new RegExp("(^|\\s)"+ge+"\\S+","g"),ye=r({},on.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),_e=r({},on.DefaultType,{content:"(string|element|function)"}),be={FADE:"fade",SHOW:"show"},we={TITLE:".popover-header",CONTENT:".popover-body"},xe={HIDE:"hide"+fe,HIDDEN:"hidden"+fe,SHOW:"show"+fe,SHOWN:"shown"+fe,INSERTED:"inserted"+fe,CLICK:"click"+fe,FOCUSIN:"focusin"+fe,FOCUSOUT:"focusout"+fe,MOUSEENTER:"mouseenter"+fe,MOUSELEAVE:"mouseleave"+fe},Ae=function(t){function e(){return t.apply(this,arguments)||this}s(e,t);var n=e.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(t){ce(this.getTipElement()).addClass(ge+"-"+t)},n.getTipElement=function(){return this.tip=this.tip||ce(this.config.template)[0],this.tip},n.setContent=function(){var t=ce(this.getTipElement());this.setElementContent(t.find(we.TITLE),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(we.CONTENT),e),t.removeClass(be.FADE+" "+be.SHOW)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var t=ce(this.getTipElement()),e=t.attr("class").match(ve);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._jQueryInterface=function(t){return this.each(function(){var n=ce(this).data(pe),i="object"==typeof t?t:null;if((n||!/destroy|hide/.test(t))&&(n||(n=new e(this,i),ce(this).data(pe,n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},o(e,null,[{key:"VERSION",get:function(){return de}},{key:"Default",get:function(){return ye}},{key:"NAME",get:function(){return he}},{key:"DATA_KEY",get:function(){return pe}},{key:"Event",get:function(){return xe}},{key:"EVENT_KEY",get:function(){return fe}},{key:"DefaultType",get:function(){return _e}}]),e}(on),ce.fn[he]=Ae._jQueryInterface,ce.fn[he].Constructor=Ae,ce.fn[he].noConflict=function(){return ce.fn[he]=me,Ae._jQueryInterface},Ae),sn=(Ce="scrollspy",Te="4.0.0",Le="."+(Se="bs.scrollspy"),ke=".data-api",Pe=(Ee=e).fn[Ce],De={offset:10,method:"auto",target:""},Oe={offset:"number",method:"string",target:"(string|element)"},Ie={ACTIVATE:"activate"+Le,SCROLL:"scroll"+Le,LOAD_DATA_API:"load"+Le+ke},Re={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},Ne={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},Me={OFFSET:"offset",POSITION:"position"},Be=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),
this._selector=this._config.target+" "+Ne.NAV_LINKS+","+this._config.target+" "+Ne.LIST_ITEMS+","+this._config.target+" "+Ne.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,Ee(this._scrollElement).on(Ie.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?Me.OFFSET:Me.POSITION,n="auto"===this._config.method?e:this._config.method,i=n===Me.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Ee.makeArray(Ee(this._selector)).map(function(t){var e,o=Ye.getSelectorFromElement(t);if(o&&(e=Ee(o)[0]),e){var r=e.getBoundingClientRect();if(r.width||r.height)return[Ee(e)[n]().top+i,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){Ee.removeData(this._element,Se),Ee(this._scrollElement).off(Le),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},De,t)).target){var e=Ee(t.target).attr("id");e||(e=Ye.getUID(Ce),Ee(t.target).attr("id",e)),t.target="#"+e}return Ye.typeCheckConfig(Ce,t,Oe),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",");e=e.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var n=Ee(e.join(","));n.hasClass(Re.DROPDOWN_ITEM)?(n.closest(Ne.DROPDOWN).find(Ne.DROPDOWN_TOGGLE).addClass(Re.ACTIVE),n.addClass(Re.ACTIVE)):(n.addClass(Re.ACTIVE),n.parents(Ne.NAV_LIST_GROUP).prev(Ne.NAV_LINKS+", "+Ne.LIST_ITEMS).addClass(Re.ACTIVE),n.parents(Ne.NAV_LIST_GROUP).prev(Ne.NAV_ITEMS).children(Ne.NAV_LINKS).addClass(Re.ACTIVE)),Ee(this._scrollElement).trigger(Ie.ACTIVATE,{relatedTarget:t})},e._clear=function(){Ee(this._selector).filter(Ne.ACTIVE).removeClass(Re.ACTIVE)},t._jQueryInterface=function(e){return this.each(function(){var n=Ee(this).data(Se);if(n||(n=new t(this,"object"==typeof e&&e),Ee(this).data(Se,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},o(t,null,[{key:"VERSION",get:function(){return Te}},{key:"Default",get:function(){return De}}]),t}(),Ee(window).on(Ie.LOAD_DATA_API,function(){for(var t=Ee.makeArray(Ee(Ne.DATA_SPY)),e=t.length;e--;){var n=Ee(t[e]);Be._jQueryInterface.call(n,n.data())}}),Ee.fn[Ce]=Be._jQueryInterface,Ee.fn[Ce].Constructor=Be,Ee.fn[Ce].noConflict=function(){return Ee.fn[Ce]=Pe,Be._jQueryInterface},Be),an=(Fe="tab",He="4.0.0",We="."+(ze="bs.tab"),qe=".data-api",Ve=(je=e).fn[Fe],Ue=150,Ze={HIDE:"hide"+We,HIDDEN:"hidden"+We,SHOW:"show"+We,SHOWN:"shown"+We,CLICK_DATA_API:"click"+We+qe},Ge={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},Ke={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},Je=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&je(this._element).hasClass(Ge.ACTIVE)||je(this._element).hasClass(Ge.DISABLED))){var e,n,i=je(this._element).closest(Ke.NAV_LIST_GROUP)[0],o=Ye.getSelectorFromElement(this._element);if(i){var r="UL"===i.nodeName?Ke.ACTIVE_UL:Ke.ACTIVE;n=(n=je.makeArray(je(i).find(r)))[n.length-1]}var s=je.Event(Ze.HIDE,{relatedTarget:this._element}),a=je.Event(Ze.SHOW,{relatedTarget:n});if(n&&je(n).trigger(s),je(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(e=je(o)[0]),this._activate(this._element,i);var u=function(){var e=je.Event(Ze.HIDDEN,{relatedTarget:t._element}),i=je.Event(Ze.SHOWN,{relatedTarget:n});je(n).trigger(e),je(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){je.removeData(this._element,ze),this._element=null},e._activate=function(t,e,n){var i=this,o=("UL"===e.nodeName?je(e).find(Ke.ACTIVE_UL):je(e).children(Ke.ACTIVE))[0],r=n&&Ye.supportsTransitionEnd()&&o&&je(o).hasClass(Ge.FADE),s=function(){return i._transitionComplete(t,o,n)};o&&r?je(o).one(Ye.TRANSITION_END,s).emulateTransitionEnd(Ue):s()},e._transitionComplete=function(t,e,n){if(e){je(e).removeClass(Ge.SHOW+" "+Ge.ACTIVE);var i=je(e.parentNode).find(Ke.DROPDOWN_ACTIVE_CHILD)[0];i&&je(i).removeClass(Ge.ACTIVE),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(je(t).addClass(Ge.ACTIVE),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),Ye.reflow(t),je(t).addClass(Ge.SHOW),t.parentNode&&je(t.parentNode).hasClass(Ge.DROPDOWN_MENU)){var o=je(t).closest(Ke.DROPDOWN)[0];o&&je(o).find(Ke.DROPDOWN_TOGGLE).addClass(Ge.ACTIVE),t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each(function(){var n=je(this),i=n.data(ze);if(i||(i=new t(this),n.data(ze,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},o(t,null,[{key:"VERSION",get:function(){return He}}]),t}(),je(document).on(Ze.CLICK_DATA_API,Ke.DATA_TOGGLE,function(t){t.preventDefault(),Je._jQueryInterface.call(je(this),"show")}),je.fn[Fe]=Je._jQueryInterface,je.fn[Fe].Constructor=Je,je.fn[Fe].noConflict=function(){return je.fn[Fe]=Ve,Je._jQueryInterface},Je);!function(t){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split("."),n=1,i=2,o=9,r=1,s=4;if(e[0]<i&&e[1]<o||e[0]===n&&e[1]===o&&e[2]<r||e[0]>=s)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=Ye,t.Alert=$e,t.Button=Xe,t.Carousel=Qe,t.Collapse=tn,t.Dropdown=en,t.Modal=nn,t.Popover=rn,t.Scrollspy=sn,t.Tab=an,t.Tooltip=on,Object.defineProperty(t,"__esModule",{value:!0})}),function(){this.Turbolinks={supported:null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener,visit:function(t,e){return Turbolinks.controller.visit(t,e)},clearCache:function(){return Turbolinks.controller.clearCache()},setProgressBarDelay:function(t){return Turbolinks.controller.setProgressBarDelay(t)}}}.call(this),function(){var t,e,n,i,o,r,s,a,u,l=[].slice;Turbolinks.copyObject=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]=i;return n},Turbolinks.closest=function(e,n){return t.call(e,n)},t=null!=(u=document.documentElement.closest)?u:function(t){var n;for(n=this;n;){if(n.nodeType===Node.ELEMENT_NODE&&e.call(n,t))return n;n=n.parentNode}},Turbolinks.defer=function(t){return setTimeout(t,1)},Turbolinks.throttle=function(t){var e;return e=null,function(){var n,i;return n=1<=arguments.length?l.call(arguments,0):[],null!=e?e:e=requestAnimationFrame((i=this,function(){return e=null,t.apply(i,n)}))}},Turbolinks.dispatch=function(t,e){var i,o,r,s,a,u;return u=(a=null!=e?e:{}).target,i=a.cancelable,o=a.data,(r=document.createEvent("Events")).initEvent(t,!0,!0===i),r.data=null!=o?o:{},r.cancelable&&!n&&(s=r.preventDefault,r.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),s.call(this)}),(null!=u?u:document).dispatchEvent(r),r},(a=document.createEvent("Events")).initEvent("test",!0,!0),a.preventDefault(),n=a.defaultPrevented,Turbolinks.match=function(t,n){return e.call(t,n)},e=null!=(o=null!=(r=null!=(s=(i=document.documentElement).matchesSelector)?s:i.webkitMatchesSelector)?r:i.msMatchesSelector)?o:i.mozMatchesSelector,Turbolinks.uuid=function(){var t,e,n;for(n="",t=e=1;36>=e;t=++e)n+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return n}}.call(this),function(){Turbolinks.Location=function(){function t(t){var e,n;null==t&&(t=""),(n=document.createElement("a")).href=t.toString(),this.absoluteURL=n.href,2>(e=n.hash.length)?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=n.hash.slice(1))}var e,n,i,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=n(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},n=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return i(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},i=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.HttpRequest=function(){function e(e,n,i){this.delegate=e,this.requestCanceled=t(this.requestCanceled,this),this.requestTimedOut=t(this.requestTimedOut,this),this.requestFailed=t(this.requestFailed,this),this.requestLoaded=t(this.requestLoaded,this),this.requestProgressed=t(this.requestProgressed,this),this.url=Turbolinks.Location.wrap(n).requestURL,this.referrer=Turbolinks.Location.wrap(i).absoluteURL,this.createXHR()}return e.NETWORK_FAILURE=0,e.TIMEOUT_FAILURE=-1,e.timeout=60,e.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},e.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},e.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},e.prototype.requestLoaded=function(){return this.endRequest((t=this,function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}));var t},e.prototype.requestFailed=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}));var t},e.prototype.requestTimedOut=function(){return this.endRequest((t=this,function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}));var t},e.prototype.requestCanceled=function(){return this.endRequest()},e.prototype.notifyApplicationBeforeRequestStart=function(){return Turbolinks.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},e.prototype.notifyApplicationAfterRequestEnd=function(){return Turbolinks.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},e.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},e.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},e.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},e.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.ProgressBar=function(){function e(){this.trickle=t(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var n;return n=300,e.defaultCSS=".turbolinks-progress-bar {\n  position: fixed;\n  display: block;\n  top: 0;\n  left: 0;\n  height: 3px;\n  background: #0076ff;\n  z-index: 9999;\n  transition: width "+n+"ms ease-out, opacity "+n/2+"ms "+n/2+"ms ease-in;\n  transform: translate3d(0, 0, 0);\n}",e.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},e.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement((t=this,function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}))):void 0;var t},e.prototype.setValue=function(t){return this.value=t,this.refresh()},e.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},e.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},e.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*n)},e.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},e.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,n)},e.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},e.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},e.prototype.refresh=function(){return requestAnimationFrame((t=this,function(){return t.progressElement.style.width=10+90*t.value+"%"}));var t},e.prototype.createStylesheetElement=function(){var t;return(t=document.createElement("style")).type="text/css",t.textContent=this.constructor.defaultCSS,t},e.prototype.createProgressElement=function(){var t;return(t=document.createElement("div")).className="turbolinks-progress-bar",t},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.BrowserAdapter=function(){function e(e){this.controller=e,this.showProgressBar=t(this.showProgressBar,this),this.progressBar=new Turbolinks.ProgressBar}var n,i,o;return o=Turbolinks.HttpRequest,n=o.NETWORK_FAILURE,i=o.TIMEOUT_FAILURE,e.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},e.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},e.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},e.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},e.prototype.visitRequestCompleted=function(t){return t.loadResponse()},e.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},e.prototype.visitRequestFinished=function(){return this.hideProgressBar()},e.prototype.visitCompleted=function(t){return t.followRedirect()},e.prototype.pageInvalidated=function(){return this.reload()},e.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},e.prototype.showProgressBar=function(){return this.progressBar.show()},e.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},e.prototype.reload=function(){return window.location.reload()},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.History=function(){function e(e){this.delegate=e,this.onPageLoad=t(this.onPageLoad,this),this.onPopState=t(this.onPopState,this)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},e.prototype.push=function(t,e){return t=Turbolinks.Location.wrap(t),this.update("push",t,e)},e.prototype.replace=function(t,e){return t=Turbolinks.Location.wrap(t),this.update("replace",t,e)},e.prototype.onPopState=function(t){var e,n,i,o;return this.shouldHandlePopState()&&(o=null!=(n=t.state)?n.turbolinks:void 0)?(e=Turbolinks.Location.wrap(window.location),i=o.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(e,i)):void 0},e.prototype.onPageLoad=function(){return Turbolinks.defer((t=this,function(){return t.pageLoaded=!0}));var t},e.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},e.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},e.prototype.update=function(t,e,n){var i;return i={turbolinks:{restorationIdentifier:n}},history[t+"State"](i,null,e)},e}()}.call(this),function(){Turbolinks.Snapshot=function(){function t(t){var e,n;n=t.head,e=t.body,this.head=null!=n?n:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return t.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},t.fromHTML=function(t){var e;return(e=document.createElement("html")).innerHTML=t,this.fromElement(e)},t.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},t.prototype.clone=function(){return new t({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},t.prototype.getRootLocation=function(){var t,e;return e=null!=(t=this.getSetting("root"))?t:"/",new Turbolinks.Location(e)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(t){try{return this.body.querySelector("[id='"+t+"'], a[name='"+t+"']")}catch(e){}},t.prototype.hasAnchor=function(t){return null!=this.getElementForAnchor(t)},t.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},t.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},t.prototype.isVisitable=function(){return"reload"!==this.getSetting("visit-control")},t.prototype.getSetting=function(t){var e,n;return null!=(e=(n=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"))[n.length-1])?e.getAttribute("content"):void 0},t}()}.call(this),function(){var t=[].slice;Turbolinks.Renderer=function(){function e(){}var n;return e.render=function(){var e,n,i;return n=arguments[0],e=arguments[1],(i=function(t,e,n){n.prototype=t.prototype;var i=new n,o=t.apply(i,e);return Object(o)===o?o:i}(this,3<=arguments.length?t.call(arguments,2):[],function(){})).delegate=n,i.render(e),i},e.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},e.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},e.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:((e=document.createElement("script")).textContent=t.textContent,e.async=!1,n(e,t),e)},n=function(t,e){var n,i,o,r,s,a,u;for(a=[],n=0,i=(r=e.attributes).length;i>n;n++)o=(s=r[n]).name,u=s.value,a.push(t.setAttribute(o,u));return a},e}()}.call(this),function(){Turbolinks.HeadDetails=function(){function t(t){var e,n,r,s,a,u;for(this.element=t,this.elements={},r=0,a=(u=this.element.childNodes).length;a>r;r++)(n=u[r]).nodeType===Node.ELEMENT_NODE&&(s=n.outerHTML,(null!=(e=this.elements)[s]?e[s]:e[s]={type:o(n),tracked:i(n),elements:[]}).elements.push(n))}var e,n,i,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t;return function(){var e,n;for(t in n=[],e=this.elements)e[t].tracked&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var n,i,o,r,s,a;for(i in s=[],o=this.elements)a=(r=o[i]).type,n=r.elements,a!==t||e.hasElementWithKey(i)||s.push(n[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,n,i,o,r,s;for(e in n=[],i=this.elements)s=(o=i[e]).type,r=o.tracked,t=o.elements,null!=s||r?t.length>1&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},o=function(t){return e(t)?"script":n(t)?"stylesheet":void 0},i=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){return"script"===t.tagName.toLowerCase()},n=function(t){var e;return"style"===(e=t.tagName.toLowerCase())||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var o in n)e.call(n,o)&&(t[o]=n[o]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;Turbolinks.SnapshotRenderer=function(e){function n(t,e,n){this.currentSnapshot=t,this.newSnapshot=e,this.isPreview=n,this.currentHeadDetails=new Turbolinks.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new Turbolinks.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return t(n,e),n.prototype.render=function(t){return this.shouldRender()?(this.mergeHead(),this.renderView((e=this,function(){return e.replaceBody(),e.isPreview||e.focusFirstAutofocusableElement(),t()}))):this.invalidateView();var e},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadStylesheetElements()).length;n>e;e++)t=i[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadScriptElements()).length;n>e;e++)t=i[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getCurrentHeadProvisionalElements()).length;n>e;e++)t=i[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getNewHeadProvisionalElements()).length;n>e;e++)t=i[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getNewBodyPermanentElements()).length;n>e;e++)o=i[e],(t=this.findCurrentBodyPermanentElement(o))?r.push(o.parentNode.replaceChild(t,o)):r.push(void 0);return r},n.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getNewBodyScriptElements()).length;n>e;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(Turbolinks.Renderer)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var o in n)e.call(n,o)&&(t[o]=n[o]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;Turbolinks.ErrorRenderer=function(e){function n(t){this.html=t}return t(n,e),n.prototype.render=function(t){return this.renderView((e=this,function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}));var e},n.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},n.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(r=[],e=0,n=(i=this.getScriptElements()).length;n>e;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},n.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},n}(Turbolinks.Renderer)}.call(this),function(){Turbolinks.View=function(){function t(t){this.delegate=t,this.element=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(t){return this.getSnapshot().getElementForAnchor(t)},t.prototype.getSnapshot=function(){return Turbolinks.Snapshot.fromElement(this.element)},t.prototype.render=function(t,e){var n,i,o;return o=t.snapshot,n=t.error,i=t.isPreview,this.markAsPreview(i),null!=o?this.renderSnapshot(o,i,e):this.renderError(n,e)},t.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(t,e,n){return Turbolinks.SnapshotRenderer.render(this.delegate,n,this.getSnapshot(),Turbolinks.Snapshot.wrap(t),e)},t.prototype.renderError=function(t,e){return Turbolinks.ErrorRenderer.render(this.delegate,e,t)},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.ScrollManager=function(){function e(e){this.delegate=e,this.onScroll=t(this.onScroll,this),this.onScroll=Turbolinks.throttle(this.onScroll)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},e.prototype.scrollToElement=function(t){return t.scrollIntoView()},e.prototype.scrollToPosition=function(t){var e,n;return e=t.x,n=t.y,window.scrollTo(e,n)},e.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},e.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},e}()}.call(this),function(){Turbolinks.SnapshotCache=function(){function t(t){this.size=t,this.keys=[],this.snapshots={}}var e;return t.prototype.has=function(t){return e(t)in this.snapshots},t.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},t.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},t.prototype.read=function(t){var n;return n=e(t),this.snapshots[n]},t.prototype.write=function(t,n){var i;return i=e(t),this.snapshots[i]=n},t.prototype.touch=function(t){var n,i;return i=e(t),(n=this.keys.indexOf(i))>-1&&this.keys.splice(n,1),this.keys.unshift(i),this.trim()},t.prototype.trim=function(){var t,e,n,i,o;for(o=[],t=0,n=(i=this.keys.splice(this.size)).length;n>t;t++)e=i[t],o.push(delete this.snapshots[e]);return o},e=function(t){return Turbolinks.Location.wrap(t).toCacheKey()},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.Visit=function(){function e(e,n,i){this.controller=e,this.action=i,this.performScroll=t(this.performScroll,this),this.identifier=Turbolinks.uuid(),this.location=Turbolinks.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return e.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},e.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},e.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},e.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},e.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},e.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new Turbolinks.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},e.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},e.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},e.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var n;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(n=this.adapter).visitRendered&&n.visitRendered(this),t?void 0:this.complete()})):void 0},e.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({
error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},e.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},e.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},e.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},e.prototype.requestCompletedWithResponse=function(t,e){return this.response=t,null!=e&&(this.redirectedToLocation=Turbolinks.Location.wrap(e)),this.adapter.visitRequestCompleted(this)},e.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},e.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},e.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},e.prototype.scrollToRestoredPosition=function(){var t,e;return null!=(t=null!=(e=this.restorationData)?e.scrollPosition:void 0)?(this.controller.scrollToPosition(t),!0):void 0},e.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},e.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},e.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},e.prototype.getTimingMetrics=function(){return Turbolinks.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},e.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},e.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},e.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame((e=this,function(){return e.frame=null,t.call(e)}));var e},e.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Turbolinks.Controller=function(){function e(){this.clickBubbled=t(this.clickBubbled,this),this.clickCaptured=t(this.clickCaptured,this),this.pageLoaded=t(this.pageLoaded,this),this.history=new Turbolinks.History(this),this.view=new Turbolinks.View(this),this.scrollManager=new Turbolinks.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return e.prototype.start=function(){return Turbolinks.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},e.prototype.disable=function(){return this.enabled=!1},e.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},e.prototype.clearCache=function(){return this.cache=new Turbolinks.SnapshotCache(10)},e.prototype.visit=function(t,e){var n,i;return null==e&&(e={}),t=Turbolinks.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(n=null!=(i=e.action)?i:"advance",this.adapter.visitProposedToLocationWithAction(t,n)):window.location=t:void 0},e.prototype.startVisitToLocationWithAction=function(t,e,n){var i;return Turbolinks.supported?(i=this.getRestorationDataForIdentifier(n),this.startVisit(t,e,{restorationData:i})):window.location=t},e.prototype.setProgressBarDelay=function(t){return this.progressBarDelay=t},e.prototype.startHistory=function(){return this.location=Turbolinks.Location.wrap(window.location),this.restorationIdentifier=Turbolinks.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.stopHistory=function(){return this.history.stop()},e.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=Turbolinks.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},e.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=Turbolinks.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,e){var n;return this.restorationIdentifier=e,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=Turbolinks.Location.wrap(t)):this.adapter.pageInvalidated()},e.prototype.getCachedSnapshotForLocation=function(t){var e;return(e=this.cache.get(t))?e.clone():void 0},e.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},e.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},e.prototype.scrollToAnchor=function(t){var e;return(e=this.view.getElementForAnchor(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},e.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},e.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},e.prototype.scrollPositionChanged=function(t){return this.getCurrentRestorationData().scrollPosition=t},e.prototype.render=function(t,e){return this.view.render(t,e)},e.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},e.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},e.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},e.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},e.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},e.prototype.clickBubbled=function(t){var e,n,i;return this.enabled&&this.clickEventIsSignificant(t)&&(n=this.getVisitableLinkForNode(t.target))&&(i=this.getVisitableLocationForLink(n))&&this.applicationAllowsFollowingLinkToLocation(n,i)?(t.preventDefault(),e=this.getActionForLink(n),this.visit(i,{action:e})):void 0},e.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){return!this.notifyApplicationAfterClickingLinkToLocation(t,e).defaultPrevented},e.prototype.applicationAllowsVisitingLocation=function(t){return!this.notifyApplicationBeforeVisitingLocation(t).defaultPrevented},e.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,e){return Turbolinks.dispatch("turbolinks:click",{target:t,data:{url:e.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationBeforeVisitingLocation=function(t){return Turbolinks.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationAfterVisitingLocation=function(t){return Turbolinks.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},e.prototype.notifyApplicationBeforeCachingSnapshot=function(){return Turbolinks.dispatch("turbolinks:before-cache")},e.prototype.notifyApplicationBeforeRender=function(t){return Turbolinks.dispatch("turbolinks:before-render",{data:{newBody:t}})},e.prototype.notifyApplicationAfterRender=function(){return Turbolinks.dispatch("turbolinks:render")},e.prototype.notifyApplicationAfterPageLoad=function(t){return null==t&&(t={}),Turbolinks.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},e.prototype.startVisit=function(t,e,n){var i;return null!=(i=this.currentVisit)&&i.cancel(),this.currentVisit=this.createVisit(t,e,n),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},e.prototype.createVisit=function(t,e,n){var i,o,r,s,a;return s=(o=null!=n?n:{}).restorationIdentifier,r=o.restorationData,i=o.historyChanged,(a=new Turbolinks.Visit(this,t,e)).restorationIdentifier=null!=s?s:Turbolinks.uuid(),a.restorationData=Turbolinks.copyObject(r),a.historyChanged=i,a.referrer=this.location,a},e.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},e.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},e.prototype.getVisitableLinkForNode=function(t){return this.nodeIsVisitable(t)?Turbolinks.closest(t,"a[href]:not([target]):not([download])"):void 0},e.prototype.getVisitableLocationForLink=function(t){var e;return e=new Turbolinks.Location(t.getAttribute("href")),this.locationIsVisitable(e)?e:void 0},e.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},e.prototype.nodeIsVisitable=function(t){var e;return!(e=Turbolinks.closest(t,"[data-turbolinks]"))||"false"!==e.getAttribute("data-turbolinks")},e.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},e.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},e.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},e}()}.call(this),function(){!function(){var t,e;if((t=e=document.currentScript)&&!e.hasAttribute("data-turbolinks-suppress-warning"))for(;t=t.parentNode;)if(t===document.body)return console.warn("You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\n\nLoad your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\n\n\u2014\u2014\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s",e.outerHTML)}()}.call(this),function(){var t,e,n;Turbolinks.start=function(){return e()?(null==Turbolinks.controller&&(Turbolinks.controller=t()),Turbolinks.controller.start()):void 0},e=function(){return null==window.Turbolinks&&(window.Turbolinks=Turbolinks),n()},t=function(){var t;return(t=new Turbolinks.Controller).adapter=new Turbolinks.BrowserAdapter(t),t},(n=function(){return window.Turbolinks===Turbolinks})()&&Turbolinks.start()}.call(this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,function(t){"use strict";function e(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}function n(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}function i(t){return t._leaflet_id=t._leaflet_id||++me,t._leaflet_id}function o(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function r(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function s(){return!1}function a(t,e){var n=Math.pow(10,e===undefined?6:e);return Math.round(t*n)/n}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return u(t).split(/\s+/)}function c(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?fe(t.options):{}),e)t.options[n]=e[n];return t.options}function h(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}function d(t,e){return t.replace(ge,function(t,n){var i=e[n];if(i===undefined)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}function p(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function f(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var e=+new Date,n=Math.max(0,16-(e-_e));return _e=e+n,window.setTimeout(t,n)}function g(t,e,i){if(!i||be!==m)return be.call(window,n(t,e));t.call(e)}function v(t){t&&we.call(window,t)}function y(){}function _(t){if("undefined"!=typeof L&&L&&L.Mixin){t=ve(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function b(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}function w(t,e,n){return t instanceof b?t:ve(t)?new b(t[0],t[1]):t===undefined||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new b(t.x,t.y):new b(t,e,n)}function x(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function A(t,e){return!t||t instanceof x?t:new x(t,e)}function E(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function C(t,e){return t instanceof E?t:new E(t,e)}function T(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,n!==undefined&&(this.alt=+n)}function S(t,e,n){return t instanceof T?t:ve(t)&&"object"!=typeof t[0]?3===t.length?new T(t[0],t[1],t[2]):2===t.length?new T(t[0],t[1]):null:t===undefined||null===t?t:"object"==typeof t&&"lat"in t?new T(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===undefined?null:new T(t,e,n)}function k(t,e,n,i){if(ve(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function P(t,e,n,i){return new k(t,e,n,i)}function D(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t,e){var n,i,o,r,s,a,u="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)u+=(i?"L":"M")+(a=s[i]).x+" "+a.y;u+=e?gn?"z":"x":""}return u||"M0 0"}function I(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function R(t,e,n,i){return"touchstart"===e?M(t,n,i):"touchmove"===e?z(t,n,i):"touchend"===e&&W(t,n,i),this}function N(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(_n,i,!1):"touchmove"===e?t.removeEventListener(bn,i,!1):"touchend"===e&&(t.removeEventListener(wn,i,!1),t.removeEventListener(xn,i,!1)),this}function M(t,e,i){var o=n(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(An.indexOf(t.target.tagName)<0))return;X(t)}H(t,e)});t["_leaflet_touchstart"+i]=o,t.addEventListener(_n,o,!1),Cn||(document.documentElement.addEventListener(_n,B,!0),document.documentElement.addEventListener(bn,j,!0),document.documentElement.addEventListener(wn,F,!0),document.documentElement.addEventListener(xn,F,!0),Cn=!0)}function B(t){En[t.pointerId]=t,Tn++}function j(t){En[t.pointerId]&&(En[t.pointerId]=t)}function F(t){delete En[t.pointerId],Tn--}function H(t,e){for(var n in t.touches=[],En)t.touches.push(En[n]);t.changedTouches=[t],e(t)}function z(t,e,n){var i=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&H(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(bn,i,!1)}function W(t,e,n){var i=function(t){H(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(wn,i,!1),t.addEventListener(xn,i,!1)}function q(t,e,n){function i(t){var e;if(cn){if(!We||"mouse"===t.pointerType)return;e=Tn}else e=t.touches.length;if(!(e>1)){var n=Date.now(),i=n-(r||n);s=t.touches?t.touches[0]:t,a=i>0&&i<=u,r=n}}function o(t){if(a&&!s.cancelBubble){if(cn){if(!We||"mouse"===t.pointerType)return;var n,i,o={};for(i in s)n=s[i],o[i]=n&&n.bind?n.bind(s):n;s=o}s.type="dblclick",e(s),r=null}}var r,s,a=!1,u=250;return t[kn+Sn+n]=i,t[kn+Ln+n]=o,t[kn+"dblclick"+n]=e,t.addEventListener(Sn,i,!1),t.addEventListener(Ln,o,!1),t.addEventListener("dblclick",e,!1),this}function V(t,e){var n=t[kn+Sn+e],i=t[kn+Ln+e],o=t[kn+"dblclick"+e];return t.removeEventListener(Sn,n,!1),t.removeEventListener(Ln,i,!1),We||t.removeEventListener("dblclick",o,!1),this}function U(t,e,n,i){if("object"==typeof e)for(var o in e)G(t,o,e[o],n);else for(var r=0,s=(e=l(e)).length;r<s;r++)G(t,e[r],n,i);return this}function Z(t,e,n,i){if("object"==typeof e)for(var o in e)K(t,o,e[o],n);else if(e)for(var r=0,s=(e=l(e)).length;r<s;r++)K(t,e[r],n,i);else{for(var a in t[Pn])K(t,a,t[Pn][a]);delete t[Pn]}return this}function G(t,e,n,o){var r=e+i(n)+(o?"_"+i(o):"");if(t[Pn]&&t[Pn][r])return this;var s=function(e){return n.call(o||t,e||window.event)},a=s;cn&&0===e.indexOf("touch")?R(t,e,s,r):!hn||"dblclick"!==e||!q||cn&&Je?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",s,!1):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,ot(t,e)&&a(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1)):("click"===e&&Ve&&(s=function(t){rt(t,a)}),t.addEventListener(e,s,!1)):"attachEvent"in t&&t.attachEvent("on"+e,s):q(t,s,r),t[Pn]=t[Pn]||{},t[Pn][r]=s}function K(t,e,n,o){var r=e+i(n)+(o?"_"+i(o):""),s=t[Pn]&&t[Pn][r];if(!s)return this;cn&&0===e.indexOf("touch")?N(t,e,r):!hn||"dblclick"!==e||!V||cn&&Je?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",s,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s):V(t,r),t[Pn][r]=null}function J(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,it(t),this}function Y(t){return G(t,"mousewheel",J),this}function $(t){return U(t,"mousedown touchstart dblclick",J),G(t,"click",nt),this}function X(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Q(t){return X(t),J(t),this}function tt(t,e){if(!e)return new b(t.clientX,t.clientY);var n=e.getBoundingClientRect(),i=n.width/e.offsetWidth||1,o=n.height/e.offsetHeight||1;return new b(t.clientX/i-n.left-e.clientLeft,t.clientY/o-n.top-e.clientTop)}function et(t){return We?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Dn:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function nt(t){On[t.type]=!0}function it(t){var e=On[t.type];return On[t.type]=!1,e}function ot(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(i){return!1}return n!==t}function rt(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,i=De&&n-De;i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?Q(t):(De=n,e(t))}function st(t){return"string"==typeof t?document.getElementById(t):t}function at(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ut(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function lt(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ht(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function dt(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function pt(t,e){if(t.classList!==undefined)return t.classList.contains(e);var n=vt(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ft(t,e){if(t.classList!==undefined)for(var n=l(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!pt(t,e)){var r=vt(t);gt(t,(r?r+" ":"")+e)}}function mt(t,e){t.classList!==undefined?t.classList.remove(e):gt(t,u((" "+vt(t)+" ").replace(" "+e+" "," ")))}function gt(t,e){t.className.baseVal===undefined?t.className=e:t.className.baseVal=e}function vt(t){return t.className.baseVal===undefined?t.className:t.className.baseVal}function yt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&_t(t,e)}function _t(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(o){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function bt(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function wt(t,e,n){var i=e||new b(0,0);t.style[Rn]=(en?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function xt(t,e){t._leaflet_pos=e,rn?wt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function At(t){return t._leaflet_pos||new b(0,0)}function Et(){U(window,"dragstart",X)}function Ct(){Z(window,"dragstart",X)}function Tt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(St(),Ne=t,Me=t.style.outline,t.style.outline="none",U(window,"keydown",St))}function St(){Ne&&(Ne.style.outline=Me,Ne=undefined,Me=undefined,Z(window,"keydown",St))}function Lt(t,e){return new Hn(t,e)}function kt(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Ot(t=Rt(t,n),n)}function Pt(t,e,n){return Math.sqrt(Ft(t,e,n,!0))}function Dt(t,e,n){return Ft(t,e,n)}function Ot(t,e){var n=t.length,i=new(typeof Uint8Array!=undefined+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,It(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function It(t,e,n,i,o){var r,s,a,u=0;for(s=i+1;s<=o-1;s++)(a=Ft(t[s],t[i],t[o],!0))>u&&(r=s,u=a);u>n&&(e[r]=1,It(t,e,n,i,r),It(t,e,n,r,o))}function Rt(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)jt(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Nt(t,e,n,i,o){var r,s,a,u=i?Xn:Bt(t,n),l=Bt(e,n);for(Xn=l;;){if(!(u|l))return[t,e];if(u&l)return!1;a=Bt(s=Mt(t,e,r=u||l,n,o),n),r===u?(t=s,u=a):(e=s,l=a)}}function Mt(t,e,n,i,o){var r,s,a=e.x-t.x,u=e.y-t.y,l=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/u,s=c.y):4&n?(r=t.x+a*(l.y-t.y)/u,s=l.y):2&n?(r=c.x,s=t.y+u*(c.x-t.x)/a):1&n&&(r=l.x,s=t.y+u*(l.x-t.x)/a),new b(r,s,o)}function Bt(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function jt(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Ft(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,u=n.y-s,l=a*a+u*u;return l>0&&((o=((t.x-r)*a+(t.y-s)*u)/l)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=u*o)),a=t.x-r,u=t.y-s,i?a*a+u*u:new b(r,s)}function Ht(t){return!ve(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]}function zt(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ht(t)}function Wt(t,e,n){var i,o,r,s,a,u,l,c,h,d=[1,4,2,8];for(o=0,l=t.length;o<l;o++)t[o]._code=Bt(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(l=t.length)-1;o<l;r=o++)a=t[o],u=t[r],a._code&c?u._code&c||((h=Mt(u,a,c,e,n))._code=Bt(h,e),i.push(h)):(u._code&c&&((h=Mt(u,a,c,e,n))._code=Bt(h,e),i.push(h)),i.push(a));t=i}return t}function qt(t){return new yi(t)}function Vt(t,e){return new wi(t,e)}function Ut(t,e){return new Ai(t,e)}function Zt(t,e,n){return new Ei(t,e,n)}function Gt(t,e){return new Ci(t,e)}function Kt(t,e){return new Ti(t,e)}function Jt(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,u=[],l=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Yt;if(!a&&!s)return null;switch(s.type){case"Point":return n=c(a),l?l(t,n):new wi(n);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),u.push(l?l(t,n):new wi(n));return new gi(u);case"LineString":case"MultiLineString":return i=$t(a,"LineString"===s.type?0:1,c),new Ci(i,e);case"Polygon":case"MultiPolygon":return i=$t(a,"Polygon"===s.type?1:2,c),new Ti(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=Jt({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&u.push(h)}return new gi(u);default:throw new Error("Invalid GeoJSON object.")}}function Yt(t){return new T(t[1],t[0],t[2])}function $t(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?$t(t[r],e-1,n):(n||Yt)(t[r]),o.push(i);return o}function Xt(t,e){return e="number"==typeof e?e:6,t.alt!==undefined?[a(t.lng,e),a(t.lat,e),a(t.alt,e)]:[a(t.lng,e),a(t.lat,e)]}function Qt(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?Qt(t[r],e-1,n,i):Xt(t[r],i));return!e&&n&&o.push(o[0]),o}function te(t,n){return t.feature?e({},t.feature,{geometry:n}):ee(n)}function ee(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function ne(t,e){return new Si(t,e)}function ie(t,e,n){return new Oi(t,e,n)}function oe(t){return new ji(t)}function re(t){return new Fi(t)}function se(t,e){return new Hi(t,e)}function ae(t,e){return new zi(t,e)}function ue(t){return mn?new qi(t):null}function le(t){return gn||vn?new Gi(t):null}function ce(t,e){return new Ki(t,e)}function he(){return window.L=no,this}var de="1.3.1+HEAD.ba6f97f",pe=Object.freeze;Object.freeze=function(t){return t};var fe=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),me=0,ge=/\{ *([\w_-]+) *\}/g,ve=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ye="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",_e=0,be=window.requestAnimationFrame||f("RequestAnimationFrame")||m,we=window.cancelAnimationFrame||f("CancelAnimationFrame")||f("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},xe=(Object.freeze||Object)({freeze:pe,extend:e,create:fe,bind:n,lastId:me,stamp:i,throttle:o,wrapNum:r,falseFn:s,formatNum:a,trim:u,splitWords:l,setOptions:c,getParamString:h,template:d,isArray:ve,indexOf:p,emptyImageUrl:ye,requestFn:be,cancelFn:we,requestAnimFrame:g,cancelAnimFrame:v});y.extend=function(t){var n=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=n.__super__=this.prototype,o=fe(i);for(var r in o.constructor=n,n.prototype=o,this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&(e(n,t.statics),delete t.statics),t.includes&&(_(t.includes),e.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=e(fe(o.options),t.options)),e(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},n},y.include=function(t){return e(this.prototype,t),this},y.mergeOptions=function(t){return e(this.prototype.options,t),this},y.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var Ae={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=l(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=l(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=undefined);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=undefined),i)for(o=0,r=i.length;o<r;o++){var a=i[o];if(a.ctx===n&&a.fn===e)return a.fn=s,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=s;delete this._events[t]}},fire:function(t,n,i){if(!this.listens(t,i))return this;var o=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var u=r[s];u.fn.call(u.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var o in t)this.once(o,t[o],e);return this}var r=n(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[i(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[i(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};Ae.addEventListener=Ae.on,Ae.removeEventListener=Ae.clearAllEventListeners=Ae.off,Ae.addOneTimeEventListener=Ae.once,Ae.fireEvent=Ae.fire,Ae.hasEventListeners=Ae.listens;var Ee=y.extend(Ae),Ce=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};b.prototype={clone:function(){return new b(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new b(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new b(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ce(this.x),this.y=Ce(this.y),this},distanceTo:function(t){var e=(t=w(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=w(t)).x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},x.prototype={extend:function(t){return t=w(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new b(this.min.x,this.max.y)},getTopRight:function(){return new b(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof b?w(t):A(t))instanceof x?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=A(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=A(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},E.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof T)e=t,n=t;else{if(!(t instanceof E))return t?this.extend(S(t)||C(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new T(e.lat,e.lng),this._northEast=new T(n.lat,n.lng)),this},pad:function(t){
var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new E(new T(e.lat-i,e.lng-o),new T(n.lat+i,n.lng+o))},getCenter:function(){return new T((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new T(this.getNorth(),this.getWest())},getSouthEast:function(){return new T(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof T||"lat"in t?S(t):C(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof E?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=C(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=C(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},T.prototype={equals:function(t,e){return!!t&&(t=S(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(e===undefined?1e-9:e))},toString:function(t){return"LatLng("+a(this.lat,t)+", "+a(this.lng,t)+")"},distanceTo:function(t){return Le.distance(this,S(t))},wrap:function(){return Le.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return C([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new T(this.lat,this.lng,this.alt)}};var Te,Se={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new x(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new T(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new E(new T(r.lat-i,r.lng-o),new T(s.lat-i,s.lng-o))}},Le=e({},Se,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,u=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*u}}),ke={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new b(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new T((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(Te=6378137*Math.PI,new x([-Te,-Te],[Te,Te]))};k.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new b((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Pe,De,Oe,Ie,Re,Ne,Me,Be=e({},Le,{code:"EPSG:3857",projection:ke,transformation:(Pe=.5/(Math.PI*ke.R),P(Pe,.5,-Pe,.5))}),je=e({},Be,{code:"EPSG:900913"}),Fe=document.documentElement.style,He="ActiveXObject"in window,ze=He&&!document.addEventListener,We="msLaunchUri"in navigator&&!("documentMode"in document),qe=I("webkit"),Ve=I("android"),Ue=I("android 2")||I("android 3"),Ze=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ge=Ve&&I("Google")&&Ze<537&&!("AudioNode"in window),Ke=!!window.opera,Je=I("chrome"),Ye=I("gecko")&&!qe&&!Ke&&!He,$e=!Je&&I("safari"),Xe=I("phantom"),Qe="OTransition"in Fe,tn=0===navigator.platform.indexOf("Win"),en=He&&"transition"in Fe,nn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ue,on="MozPerspective"in Fe,rn=!window.L_DISABLE_3D&&(en||nn||on)&&!Qe&&!Xe,sn="undefined"!=typeof orientation||I("mobile"),an=sn&&qe,un=sn&&nn,ln=!window.PointerEvent&&window.MSPointerEvent,cn=!(!window.PointerEvent&&!ln),hn=!window.L_NO_TOUCH&&(cn||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),dn=sn&&Ke,pn=sn&&Ye,fn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,mn=!!document.createElement("canvas").getContext,gn=!(!document.createElementNS||!D("svg").createSVGRect),vn=!gn&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(n){return!1}}(),yn=(Object.freeze||Object)({ie:He,ielt9:ze,edge:We,webkit:qe,android:Ve,android23:Ue,androidStock:Ge,opera:Ke,chrome:Je,gecko:Ye,safari:$e,phantom:Xe,opera12:Qe,win:tn,ie3d:en,webkit3d:nn,gecko3d:on,any3d:rn,mobile:sn,mobileWebkit:an,mobileWebkit3d:un,msPointer:ln,pointer:cn,touch:hn,mobileOpera:dn,mobileGecko:pn,retina:fn,canvas:mn,svg:gn,vml:vn}),_n=ln?"MSPointerDown":"pointerdown",bn=ln?"MSPointerMove":"pointermove",wn=ln?"MSPointerUp":"pointerup",xn=ln?"MSPointerCancel":"pointercancel",An=["INPUT","SELECT","OPTION"],En={},Cn=!1,Tn=0,Sn=ln?"MSPointerDown":cn?"pointerdown":"touchstart",Ln=ln?"MSPointerUp":cn?"pointerup":"touchend",kn="_leaflet_",Pn="_leaflet_events",Dn=tn&&Je?2*window.devicePixelRatio:Ye?window.devicePixelRatio:1,On={},In=(Object.freeze||Object)({on:U,off:Z,stopPropagation:J,disableScrollPropagation:Y,disableClickPropagation:$,preventDefault:X,stop:Q,getMousePosition:tt,getWheelDelta:et,fakeStop:nt,skipped:it,isExternalTarget:ot,addListener:U,removeListener:Z}),Rn=bt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),Nn=bt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Mn="webkitTransition"===Nn||"OTransition"===Nn?Nn+"End":"transitionend";if("onselectstart"in document)Oe=function(){U(window,"selectstart",X)},Ie=function(){Z(window,"selectstart",X)};else{var Bn=bt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Oe=function(){if(Bn){var t=document.documentElement.style;Re=t[Bn],t[Bn]="none"}},Ie=function(){Bn&&(document.documentElement.style[Bn]=Re,Re=undefined)}}var jn=(Object.freeze||Object)({TRANSFORM:Rn,TRANSITION:Nn,TRANSITION_END:Mn,get:st,getStyle:at,create:ut,remove:lt,empty:ct,toFront:ht,toBack:dt,hasClass:pt,addClass:ft,removeClass:mt,setClass:gt,getClass:vt,setOpacity:yt,testProp:bt,setTransform:wt,setPosition:xt,getPosition:At,disableTextSelection:Oe,enableTextSelection:Ie,disableImageDrag:Et,enableImageDrag:Ct,preventOutline:Tt,restoreOutline:St}),Fn=Ee.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=At(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=g(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),xt(this._el,n),this.fire("step")},_complete:function(){v(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Hn=Ee.extend({options:{crs:Be,center:undefined,zoom:undefined,minZoom:undefined,maxZoom:undefined,layers:[],maxBounds:undefined,renderer:undefined,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=c(this,e),this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==undefined&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==undefined&&this.setView(S(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=Nn&&rn&&!dn&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),U(this._proxy,Mn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,i){if((n=n===undefined?this._zoom:this._limitZoom(n),t=this._limitCenter(S(t),n,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i)&&(i.animate!==undefined&&(i.zoom=e({animate:i.animate},i.zoom),i.pan=e({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,i.zoom):this._tryAnimatedPan(t,i.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,n),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(rn?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(rn?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof b?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():C(t);var n=w(e.paddingTopLeft||e.padding||[0,0]),i=w(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===Infinity)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=C(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=w(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Fn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ft(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){function i(t){var e=(v*v-m*m+(t?-1:1)*b*b*y*y)/(2*(t?v:m)*b*y),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function r(t){return(Math.exp(t)+Math.exp(-t))/2}function s(t){return o(t)/r(t)}function a(t){return m*(r(w)/r(w+_*t))}function u(t){return m*(r(w)*s(w+_*t)-o(w))/b}function l(t){return 1-Math.pow(1-t,1.5)}function c(){var n=(Date.now()-x)/E,i=l(n)*A;n<=1?(this._flyToFrame=g(c,this),this._move(this.unproject(h.add(d.subtract(h).multiplyBy(u(i)/y)),f),this.getScaleZoom(m/a(i),f),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(!1===(n=n||{}).animate||!rn)return this.setView(t,e,n);this._stop();var h=this.project(this.getCenter()),d=this.project(t),p=this.getSize(),f=this._zoom;t=S(t),e=e===undefined?f:e;var m=Math.max(p.x,p.y),v=m*this.getZoomScale(f,e),y=d.distanceTo(h)||1,_=1.42,b=_*_,w=i(0),x=Date.now(),A=(i(1)-w)/_,E=n.duration?1e3*n.duration:1e3*A*.8;return this._moveStart(!0,n.noMoveStart),c.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=C(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,C(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=i.divideBy(2).round(),s=o.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,o,t):navigator.geolocation.getCurrentPosition(i,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new T(t.coords.latitude,t.coords.longitude),n=e.toBounds(t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=undefined,this._containerId=undefined}var t;for(t in this._locationWatchId!==undefined&&this.stopLocate(),this._stop(),lt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)lt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ut("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new E(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===undefined?this._layersMaxZoom===undefined?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=C(t),n=w(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),u=this.getSize().subtract(n),l=A(this.project(a,i),this.project(s,i)).getSize(),c=rn?this.options.zoomSnap:1,h=u.x/l.x,d=u.y/l.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new x(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===undefined?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=e===undefined?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=e===undefined?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?Infinity:i},project:function(t,e){return e=e===undefined?this._zoom:e,this.options.crs.latLngToPoint(S(t),e)},unproject:function(t,e){return e=e===undefined?this._zoom:e,this.options.crs.pointToLatLng(w(t),e)},layerPointToLatLng:function(t){var e=w(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(S(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(S(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(C(t))},distance:function(t,e){return this.options.crs.distance(S(t),S(e))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(S(t)))},mouseEventToContainerPoint:function(t){return tt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=st(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");U(e,"scroll",this._onScroll,this),this._containerId=i(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&rn,ft(t,"leaflet-container"+(hn?" leaflet-touch":"")+(fn?" leaflet-retina":"")+(ze?" leaflet-oldie":"")+($e?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=at(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),xt(this._mapPane,new b(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ft(t.markerPane,"leaflet-zoom-hide"),ft(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){xt(this._mapPane,new b(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){e===undefined&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return v(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){xt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[i(this._container)]=this;var e=t?Z:U;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),rn&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){v(this._resizeRequest),this._resizeRequest=g(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,o=[],r="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[i(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(r&&!ot(s,t))break;if(o.push(n),r)break}if(s===this._container)break;s=s.parentNode}return o.length||a||r||!ot(s,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!it(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||Tt(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){if("click"===t.type){var o=e({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,n))).length){var r=i[0];"contextmenu"===n&&r.listens(n,!0)&&X(t);var s={originalEvent:t};if("keypress"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var u=0;u<i.length;u++)if(i[u].fire(n,s,!0),s.originalEvent._stopped||!1===i[u].options.bubblingMouseEvents&&-1!==p(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return At(this._mapPane)||new b(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&e!==undefined?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return A([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new x(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new x(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=A(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new b(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=rn?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=ut("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Rn,n=this._proxy.style[e];wt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();wt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){lt(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o))&&(g(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,o){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ft(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),g(function(){this._moveEnd(!0)},this))}}),zn=y.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return ft(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this},remove:function(){return this._map?(lt(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Wn=function(t){return new zn(t)};Hn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,o){var r=n+t+" "+n+o;e[t+o]=ut("div",r,i)}var e=this._controlCorners={},n="leaflet-",i=this._controlContainer=ut("div",n+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)lt(this._controlCorners[t]);lt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var qn=zn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in c(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return zn.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(i(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ft(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(ft(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):mt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return mt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ut("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),$(e),Y(e);var i=this._form=ut("form",t+"-list");n&&(this._map.on("click",this.collapse,this),Ve||U(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ut("a",t+"-toggle",e);o.href="#",o.title="Layers",hn?(U(o,"click",Q),U(o,"click",this.expand,this)):U(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ut("div",t+"-base",i),this._separator=ut("div",t+"-separator",i),this._overlaysList=ut("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&i(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(n(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ct(this._baseLayersList),ct(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update()
;var e=this._getLayer(i(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=o):e=this._createRadioElement("leaflet-base-layers",o),this._layerControlInputs.push(e),e.layerId=i(t.layer),U(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var s=document.createElement("div");return n.appendChild(s),s.appendChild(e),s.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=e.options.minZoom!==undefined&&i<e.options.minZoom||e.options.maxZoom!==undefined&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Vn=function(t,e,n){return new qn(t,e,n)},Un=zn.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ut("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=ut("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),$(r),U(r,"click",Q),U(r,"click",o,this),U(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";mt(this._zoomInButton,e),mt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ft(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ft(this._zoomInButton,e)}});Hn.mergeOptions({zoomControl:!0}),Hn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Un,this.addControl(this.zoomControl))});var Zn=function(t){return new Un(t)},Gn=zn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ut("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ut("div",e,n)),t.imperial&&(this._iScale=ut("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Kn=function(t){return new Gn(t)},Jn=zn.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ut("div","leaflet-control-attribution"),$(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Hn.mergeOptions({attributionControl:!0}),Hn.addInitHook(function(){this.options.attributionControl&&(new Jn).addTo(this)});var Yn=function(t){return new Jn(t)};zn.Layers=qn,zn.Zoom=Un,zn.Scale=Gn,zn.Attribution=Jn,Wn.layers=Vn,Wn.zoom=Zn,Wn.scale=Kn,Wn.attribution=Yn;var $n=y.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});$n.addTo=function(t,e){return t.addHandler(e,this),this};var Xn,Qn,ti={Events:Ae},ei=hn?"touchstart mousedown":"mousedown",ni={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ii={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},oi=Ee.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){c(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(U(this._dragStartTarget,ei,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(oi._dragging===this&&this.finishDrag(),Z(this._dragStartTarget,ei,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!pt(this._element,"leaflet-zoom-anim")&&!(oi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(oi._dragging=this,this._preventOutline&&Tt(this._element),Et(),Oe(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new b(e.clientX,e.clientY),U(document,ii[t.type],this._onMove,this),U(document,ni[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new b(e.clientX,e.clientY).subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(X(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=At(this._element).subtract(n),ft(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ft(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,v(this._animRequest),this._lastEvent=t,this._animRequest=g(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),xt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in mt(document.body,"leaflet-dragging"),this._lastTarget&&(mt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ii)Z(document,ii[t],this._onMove,this),Z(document,ni[t],this._onUp,this);Ct(),Ie(),this._moved&&this._moving&&(v(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,oi._dragging=!1}}),ri=(Object.freeze||Object)({simplify:kt,pointToSegmentDistance:Pt,closestPointOnSegment:Dt,clipSegment:Nt,_getEdgeIntersection:Mt,_getBitCode:Bt,_sqClosestPointOnSegment:Ft,isFlat:Ht,_flat:zt}),si=(Object.freeze||Object)({clipPolygon:Wt}),ai={project:function(t){return new b(t.lng,t.lat)},unproject:function(t){return new T(t.y,t.x)},bounds:new x([-180,-90],[180,90])},ui={R:6378137,R_MINOR:6356752.314245179,bounds:new x([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new b(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),u=0,l=.1;u<15&&Math.abs(l)>1e-7;u++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=l=Math.PI/2-2*Math.atan(s*e)-a;return new T(a*n,t.x*n/i)}},li=(Object.freeze||Object)({LonLat:ai,Mercator:ui,SphericalMercator:ke}),ci=e({},Le,{code:"EPSG:3395",projection:ui,transformation:(Qn=.5/(Math.PI*ui.R),P(Qn,.5,-Qn,.5))}),hi=e({},Le,{code:"EPSG:4326",projection:ai,transformation:P(1/180,1,-1/180,.5)}),di=e({},Se,{projection:ai,transformation:P(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Se.Earth=Le,Se.EPSG3395=ci,Se.EPSG3857=Be,Se.EPSG900913=je,Se.EPSG4326=hi,Se.Simple=di;var pi=Ee.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[i(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[i(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Hn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=i(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=i(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&i(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?ve(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[i(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=i(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=Infinity,e=-Infinity,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=o.minZoom===undefined?t:Math.min(t,o.minZoom),e=o.maxZoom===undefined?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-Infinity?undefined:e,this._layersMinZoom=t===Infinity?undefined:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===undefined&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===undefined&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var fi=pi.extend({initialize:function(t,e){var n,i;if(c(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return i(t)}}),mi=function(t,e){return new fi(t,e)},gi=fi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),fi.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),fi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new E;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),vi=function(t){return new gi(t)},yi=y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=w(i),r=w("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return fn&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),_i=yi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return _i.imagePath||(_i.imagePath=this._detectIconPath()),(this.options.imagePath||_i.imagePath)+yi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ut("div","leaflet-default-icon-path",document.body),e=at(t,"background-image")||at(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),bi=$n.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new oi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ft(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&mt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=L.DomUtil.getPosition(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),u=A(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!u.contains(r)){var l=w((Math.max(u.max.x,r.x)-u.max.x)/(s.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(s.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(s.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(s.min.y-u.min.y)).multiplyBy(i);n.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),L.DomUtil.setPosition(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=g(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(v(this._panRequest),this._panRequest=g(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=At(e._icon),o=e._map.layerPointToLatLng(i);n&&xt(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){v(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),wi=pi.extend({options:{icon:new _i,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,e){c(this,e),this._latlng=S(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=S(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ft(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ft(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),lt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&lt(this._shadow),this._shadow=null},_setPos:function(t){xt(this._icon,t),this._shadow&&xt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ft(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),bi)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new bi(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;yt(this._icon,t),this._shadow&&yt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),xi=pi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Ai=xi.extend({options:{fill:!0,radius:10},initialize:function(t,e){c(this,e),this._latlng=S(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=S(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return xi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new x(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ei=Ai.extend({initialize:function(t,n,i){if("number"==typeof n&&(n=e({},i,{radius:n})),c(this,n),this._latlng=S(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new E(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:xi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===Le.distance){var o=Math.PI/180,r=this._mRadius/Le.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),u=s.add(a).divideBy(2),l=n.unproject(u).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(l*o))/(Math.cos(e*o)*Math.cos(l*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:u.x-n.project([l,t-c]).x,this._radiusY=u.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}}),Ci=xi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){c(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=Infinity,o=null,r=Ft,s=0,a=this._parts.length;s<a;s++)for(var u=this._parts[s],l=1,c=u.length;l<c;l++){var h=r(t,e=u[l-1],n=u[l],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],u=a.length;if(!u)return null;for(t=0,e=0;t<u-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<u-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=S(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new E,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ht(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Ht(t),i=0,o=t.length;i<o;i++)n?(e[i]=S(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new x;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),n=new b(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(n),t.max._add(n),this._pxBounds=t)},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof T,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,u=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=Nt(a[n],a[n+1],t,n,!0))&&(u[i]=u[i]||[],u[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(u[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=kt(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&Pt(t,a[o],a[i])<=u)return!0;return!1}});Ci._flat=zt;var Ti=Ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a,u,l=this._rings[0],c=l.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=l[t],i=l[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return u=0===r?l[0]:[s/r,a/r],this._map.layerPointToLatLng(u)},_convertLatLngs:function(t){var e=Ci.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof T&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Ci.prototype._setLatLngs.call(this,t),Ht(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ht(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new b(e,e);if(t=new x(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=Wt(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,u,l=!1;if(!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(u=(e=this._parts[o]).length)-1;r<u;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(l=!l);return l||Ci.prototype._containsPoint.call(this,t,!0)}}),Si=gi.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=ve(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=Jt(t,r);return s?(s.feature=ee(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),Li={toGeoJSON:function(t){return te(this,{type:"Point",coordinates:Xt(this.getLatLng(),t)})}};wi.include(Li),Ei.include(Li),Ai.include(Li),Ci.include({toGeoJSON:function(t){var e=!Ht(this._latlngs);return te(this,{type:(e?"Multi":"")+"LineString",coordinates:Qt(this._latlngs,e?1:0,!1,t)})}}),Ti.include({toGeoJSON:function(t){var e=!Ht(this._latlngs),n=e&&!Ht(this._latlngs[0]),i=Qt(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),te(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),fi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),te(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=ee(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}}),n?te(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var ki=ne,Pi=pi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=C(e),c(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ft(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){lt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ht(this._image),this},bringToBack:function(){return this._map&&dt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=C(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){
var t="IMG"===this._url.tagName,e=this._image=t?this._url:ut("img");ft(e,"leaflet-image-layer"),this._zoomAnimated&&ft(e,"leaflet-zoom-animated"),this.options.className&&ft(e,this.options.className),e.onselectstart=s,e.onmousemove=s,e.onload=n(this.fire,this,"load"),e.onerror=n(this._overlayOnError,this,"error"),this.options.crossOrigin&&(e.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;wt(this._image,n,e)},_reset:function(){var t=this._image,e=new x(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();xt(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){yt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==undefined&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Di=function(t,e,n){return new Pi(t,e,n)},Oi=Pi.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ut("video");if(ft(e,"leaflet-image-layer"),this._zoomAnimated&&ft(e,"leaflet-zoom-animated"),e.onselectstart=s,e.onmousemove=s,e.onloadeddata=n(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),o=[],r=0;r<i.length;r++)o.push(i[r].src);this._url=i.length>0?o:[e.src]}else{ve(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var u=ut("source");u.src=this._url[a],e.appendChild(u)}}}}),Ii=pi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){c(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&yt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&yt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(yt(this._container,0),this._removeTimeout=setTimeout(n(lt,undefined,this._container),200)):lt(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=S(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ht(this._container),this},bringToBack:function(){return this._map&&dt(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=w(this.options.offset),n=this._getAnchor();this._zoomAnimated?xt(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ri=Ii.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ii.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof xi||this._source.on("preclick",J))},onRemove:function(t){Ii.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof xi||this._source.off("preclick",J))},getEvents:function(){var t=Ii.prototype.getEvents.call(this);return(this.options.closeOnClick!==undefined?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ut("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ut("div",t+"-content-wrapper",e);if(this._contentNode=ut("div",t+"-content",n),$(n),Y(this._contentNode),U(n,"contextmenu",J),this._tipContainer=ut("div",t+"-tip-container",e),this._tip=ut("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ut("a",t+"-close-button",e);i.href="#close",i.innerHTML="&#215;",U(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",ft(t,r)):mt(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();xt(this._container,e.add(n))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(at(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new b(this._containerLeft,-n-this._containerBottom);o._add(At(this._container));var r=t.layerPointToContainerPoint(o),s=w(this.options.autoPanPadding),a=w(this.options.autoPanPaddingTopLeft||s),u=w(this.options.autoPanPaddingBottomRight||s),l=t.getSize(),c=0,h=0;r.x+i+u.x>l.x&&(c=r.x+i-l.x+u.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+u.y>l.y&&(h=r.y+n-l.y+u.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),Q(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ni=function(t,e){return new Ri(t,e)};Hn.mergeOptions({closePopupOnClick:!0}),Hn.include({openPopup:function(t,e,n){return t instanceof Ri||(t=new Ri(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),pi.include({bindPopup:function(t,e){return t instanceof Ri?(c(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Ri(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof pi||(e=t,t=this),t instanceof gi)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Q(t),e instanceof xi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Mi=Ii.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ii.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ii.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ii.prototype.getEvents.call(this);return hn&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip"+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ut("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,i=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,s=n.offsetWidth,a=n.offsetHeight,u=w(this.options.offset),l=this._getAnchor();"top"===r?t=t.add(w(-s/2+u.x,-a+u.y+l.y,!0)):"bottom"===r?t=t.subtract(w(s/2-u.x,-u.y,!0)):"center"===r?t=t.subtract(w(s/2+u.x,a/2-l.y+u.y,!0)):"right"===r||"auto"===r&&o.x<i.x?(r="right",t=t.add(w(u.x+l.x,l.y-a/2+u.y,!0))):(r="left",t=t.subtract(w(s+l.x-u.x,a/2-l.y-u.y,!0))),mt(n,"leaflet-tooltip-right"),mt(n,"leaflet-tooltip-left"),mt(n,"leaflet-tooltip-top"),mt(n,"leaflet-tooltip-bottom"),ft(n,"leaflet-tooltip-"+r),xt(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&yt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return w(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Bi=function(t,e){return new Mi(t,e)};Hn.include({openTooltip:function(t,e,n){return t instanceof Mi||(t=new Mi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),pi.include({bindTooltip:function(t,e){return t instanceof Mi?(c(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Mi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),hn&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof pi||(e=t,t=this),t instanceof gi)for(var n in this._layers){t=this._layers[n];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ft(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(mt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:undefined)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var ji=yi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=w(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});yi.Default=_i;var Fi=pi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:sn,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:undefined,maxNativeZoom:undefined,minNativeZoom:undefined,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),lt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=undefined},bringToFront:function(){return this._map&&(ht(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(dt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof b?t:new b(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==undefined&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-Infinity,Infinity),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ze){yt(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);yt(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(v(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this))}},_onOpaqueTile:s,_initContainer:function(){this._container||(this._container=ut("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t===undefined)return undefined;for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(lt(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ut("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),s(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i},_onUpdateLevel:s,_onRemoveLevel:s,_onCreateLevel:s,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)lt(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=undefined},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new b(+o,+r);a.z=+s;var u=this._tileCoordsToKey(a),l=this._tiles[u];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new b(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),u=this._tiles[a];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return undefined!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:undefined!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=this._clampZoom(Math.round(e));(this.options.maxZoom!==undefined&&o>this.options.maxZoom||this.options.minZoom!==undefined&&o<this.options.minZoom)&&(o=undefined);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),o!==undefined&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();rn?wt(t.el,o,i):xt(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new x(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(t===undefined&&(t=e.getCenter()),this._tileZoom!==undefined){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,u=new x(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var c=this._tiles[l].coords;c.z===this._tileZoom&&u.contains(new b(c.x,c.y))||(this._tiles[l].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new b(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return C(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new E(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new b(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(Ge||e.el.setAttribute("src",ye),lt(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ft(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=s,t.onmousemove=s,ze&&this.options.opacity<1&&yt(t,this.options.opacity),Ve&&!Ue&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),o=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&g(n(this._tileReady,this,t,null,r)),xt(r,i),this._tiles[o]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){if(this._map){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var o=this._tileCoordsToKey(t);(i=this._tiles[o])&&(i.loaded=+new Date,this._map._fadeAnimated?(yt(i.el,0),v(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ft(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze||!this._map._fadeAnimated?g(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new b(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new x(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Hi=Fi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&fn&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),Ve||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return U(i,"load",n(this._tileOnLoad,this,e,i)),U(i,"error",n(this._tileOnError,this,e,i)),this.options.crossOrigin&&(i.crossOrigin=""),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var n={r:fn?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=i),n["-y"]=i}return d(this._url,e(n,this.options))},_tileOnLoad:function(t,e){ze?setTimeout(n(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=s,e.onerror=s,e.complete||(e.src=ye,lt(e),delete this._tiles[t]))}}),zi=Hi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var i=e({},this.defaultWmsParams);for(var o in n)o in this.options||(i[o]=n[o]);var r=(n=c(this,n)).detectRetina&&fn?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Hi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=A(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===hi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=L.TileLayer.prototype.getTileUrl.call(this,t);return a+h(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});Hi.WMS=zi,se.wms=ae;var Wi=pi.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),i(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ft(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=At(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);rn?wt(this._container,a,n):xt(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new x(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qi=Wi.extend({getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");U(t,"mousemove",o(this._onMouseMove,32,this),this),U(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),U(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,lt(this._container),Z(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},Wi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=fn?2:1;xt(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",fn&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Wi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[i(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,n=t.options.dashArray.split(","),i=[];for(e=0;e<n.length;e++)i.push(Number(n[e]));t.options._dashArray=i}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||g(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new x,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,u=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,u.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],u[i?"lineTo":"moveTo"](r.x,r.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;this._drawnLayers[t._leaflet_id]=t,1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(n=e);n&&(nt(t),this._fireEvent([n],t))},_onMouseMove:function(t){
if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(mt(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ft(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order,n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}),Vi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Ui={_initContainer:function(){this._container=ut("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");ft(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[i(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;lt(e),t.removeInteractiveTarget(e),delete this._layers[i(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Vi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=ve(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Vi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ht(t._container)},_bringToBack:function(t){dt(t._container)}},Zi=vn?Vi:D,Gi=Wi.extend({getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Zi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){lt(this._container),Z(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),xt(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Zi("path");t.options.className&&ft(e,t.options.className),t.options.interactive&&ft(e,"leaflet-interactive"),this._updateStyle(t),this._layers[i(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){lt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[i(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,O(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ht(t._path)},_bringToBack:function(t){dt(t._path)}});vn&&Gi.include(Ui),Hn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&ue()||le()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||t===undefined)return!1;var e=this._paneRenderers[t];return e===undefined&&(e=Gi&&le({pane:t})||qi&&ue({pane:t}),this._paneRenderers[t]=e),e}});var Ki=Ti.extend({initialize:function(t,e){Ti.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=C(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=Zi,Gi.pointsToPath=O,Si.geometryToLayer=Jt,Si.coordsToLatLng=Yt,Si.coordsToLatLngs=$t,Si.latLngToCoords=Xt,Si.latLngsToCoords=Qt,Si.getFeature=te,Si.asFeature=ee,Hn.mergeOptions({boxZoom:!0});var Ji=$n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){U(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Z(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){lt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Oe(),Et(),this._startPoint=this._map.mouseEventToContainerPoint(t),U(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ut("div","leaflet-zoom-box",this._container),ft(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new x(this._point,this._startPoint),n=e.getSize();xt(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(lt(this._box),mt(this._container,"leaflet-crosshair")),Ie(),Ct(),Z(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var e=new E(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Hn.addInitHook("addHandler","boxZoom",Ji),Hn.mergeOptions({doubleClickZoom:!0});var Yi=$n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Hn.addInitHook("addHandler","doubleClickZoom",Yi),Hn.mergeOptions({dragging:!0,inertia:!Ue,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $i=$n.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new oi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ft(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=C(this._map.options.maxBounds);this._offsetLimit=A(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),u=a.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,u),c=a.multiplyBy(l/u),h=l/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),g(function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Hn.addInitHook("addHandler","dragging",$i),Hn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Xi=$n.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),U(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Z(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){U(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Z(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;e=this._panKeys[n],t.shiftKey&&(e=w(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Q(t)}}});Hn.addInitHook("addHandler","keyboard",Xi),Hn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Qi=$n.extend({addHooks:function(){U(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Z(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=et(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),o),Q(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});Hn.addInitHook("addHandler","scrollWheelZoom",Qi),Hn.mergeOptions({tap:!0,tapTolerance:15});var to=$n.extend({addHooks:function(){U(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Z(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(X(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new b(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ft(i,"leaflet-active"),this._holdTimeout=setTimeout(n(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),U(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Z(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&mt(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new b(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});hn&&!cn&&Hn.addInitHook("addHandler","tap",to),Hn.mergeOptions({touchZoom:hn&&!Ue,bounceAtZoomLimits:!0});var eo=$n.extend({addHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),U(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),Z(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),U(document,"touchmove",this._onTouchMove,this),U(document,"touchend",this._onTouchEnd,this),X(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=i._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),v(this._animRequest);var a=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=g(a,this,!0),X(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,v(this._animRequest),Z(document,"touchmove",this._onTouchMove),Z(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Hn.addInitHook("addHandler","touchZoom",eo),Hn.BoxZoom=Ji,Hn.DoubleClickZoom=Yi,Hn.Drag=$i,Hn.Keyboard=Xi,Hn.ScrollWheelZoom=Qi,Hn.Tap=to,Hn.TouchZoom=eo;var no=window.L;window.L=t,Object.freeze=pe,t.version=de,t.noConflict=he,t.Control=zn,t.control=Wn,t.Browser=yn,t.Evented=Ee,t.Mixin=ti,t.Util=xe,t.Class=y,t.Handler=$n,t.extend=e,t.bind=n,t.stamp=i,t.setOptions=c,t.DomEvent=In,t.DomUtil=jn,t.PosAnimation=Fn,t.Draggable=oi,t.LineUtil=ri,t.PolyUtil=si,t.Point=b,t.point=w,t.Bounds=x,t.bounds=A,t.Transformation=k,t.transformation=P,t.Projection=li,t.LatLng=T,t.latLng=S,t.LatLngBounds=E,t.latLngBounds=C,t.CRS=Se,t.GeoJSON=Si,t.geoJSON=ne,t.geoJson=ki,t.Layer=pi,t.LayerGroup=fi,t.layerGroup=mi,t.FeatureGroup=gi,t.featureGroup=vi,t.ImageOverlay=Pi,t.imageOverlay=Di,t.VideoOverlay=Oi,t.videoOverlay=ie,t.DivOverlay=Ii,t.Popup=Ri,t.popup=Ni,t.Tooltip=Mi,t.tooltip=Bi,t.Icon=yi,t.icon=qt,t.DivIcon=ji,t.divIcon=oe,t.Marker=wi,t.marker=Vt,t.TileLayer=Hi,t.tileLayer=se,t.GridLayer=Fi,t.gridLayer=re,t.SVG=Gi,t.svg=le,t.Renderer=Wi,t.Canvas=qi,t.canvas=ue,t.Path=xi,t.CircleMarker=Ai,t.circleMarker=Ut,t.Circle=Ei,t.circle=Zt,t.Polyline=Ci,t.polyline=Gt,t.Polygon=Ti,t.polygon=Kt,t.Rectangle=Ki,t.rectangle=ce,t.Map=Hn,t.map=Lt}),L.Icon.Default=L.Icon.Default.extend({_getIconUrl:function(t){return{"icon-2x.png":"/assets/marker-icon-2x-00179c4c1ee830d3a108412ae0d294f55776cfeb085c60129a39aa6fc4ae2528.png","shadow.png":"/assets/marker-shadow-264f5c640339f042dd729062cfc04c17f8ea0f29882b538e3848ed8f10edb4da.png","icon.png":"/assets/marker-icon-574c3a5cca85f4114085b6841596d62f00d7c892c7b03f28cbfa301deb1dc437.png"}[t+".png"]},_detectIconPath:function(){return""}}),L.Marker=L.Marker.extend({options:{icon:new L.Icon.Default}}),L.marker=function(t,e){return new L.Marker(t,e)},function(){}.call(this),function(){null==window.Set&&(window.Set=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.values=[]},t.prototype.has=function(t){return-1!==this.values.indexOf(t)},t.prototype.add=function(t){return this.has(t)||this.values.push(t),this},t.prototype["delete"]=function(t){var e;return-1!==(e=this.values.indexOf(t))&&(this.values.splice(e,1),!0)},t.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},t}())}.call(this),function(t){function e(){}function n(t,e){return function(){t.apply(e,arguments)}}function i(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function o(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void h(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var i;try{i=n(t._value)}catch(o){return void s(e.promise,o)}r(e.promise,i)}else(1===t._state?r:s)(e.promise,t._value)}))}function r(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var o=e.then;if(e instanceof i)return t._state=3,t._value=e,void a(t);if("function"==typeof o)return void l(n(o,e),t)}t._state=1,t._value=e,a(t)}catch(r){s(t,r)}}function s(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&setTimeout(function(){t._handled||d(t._value)},1);for(var e=0,n=t._deferreds.length;n>e;e++)o(t,t._deferreds[e]);t._deferreds=null}function u(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,r(e,t))},function(t){n||(n=!0,s(e,t))})}catch(i){if(n)return;n=!0,s(e,i)}}var c=setTimeout,h="function"==typeof setImmediate&&setImmediate||function(t){c(t,1)},d=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,n){var r=new i(e);return o(this,new u(t,n,r)),r},i.all=function(t){var e=Array.prototype.slice.call(t);return new i(function(t,n){function i(r,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(t){i(r,t)},n)}e[r]=s,0==--o&&t(e)}catch(u){n(u)}}if(0===e.length)return t([]);for(var o=e.length,r=0;r<e.length;r++)i(r,e[r])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(t){return new i(function(e,n){for(var i=0,o=t.length;o>i;i++)t[i].then(e,n)})},i._setImmediateFn=function(t){h=t},i._setUnhandledRejectionFn=function(t){d=t},"undefined"!=typeof module&&module.exports?module.exports=i:t.Promise||(t.Promise=i)}(this),"undefined"==typeof WeakMap&&function(){var t=Object.defineProperty,e=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+e+++"__"};n.prototype={set:function(e,n){var i=e[this.name];return i&&i[0]===e?i[1]=n:t(e,this.name,{value:[e,n],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},"delete":function(t){var e=t[this.name];return!(!e||e[0]!==t)&&(e[0]=e[1]=void 0,!0)},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=n}(),function(t){function e(t){x.push(t),w||(w=!0,m(i))}function n(t){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(t)||t}function i(){w=!1;var t=x;x=[],t.sort(function(t,e){return t.uid_-e.uid_});var e=!1;t.forEach(function(t){var n=t.takeRecords();o(t),n.length&&(t.callback_(n,t),e=!0)}),e&&i()}function o(t){t.nodes_.forEach(function(e){var n=g.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})})}function r(t,e){for(var n=t;n;n=n.parentNode){var i=g.get(n);if(i)for(var o=0;o<i.length;o++){var r=i[o],s=r.options;if(n===t||s.subtree){var a=e(s);a&&r.enqueue(a)}}}}function s(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++A}function a(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function u(t){var e=new a(t.type,t.target);return e.addedNodes=t.addedNodes.slice(),e.removedNodes=t.removedNodes.slice(),e.previousSibling=t.previousSibling,e.nextSibling=t.nextSibling,e.attributeName=t.attributeName,e.attributeNamespace=t.attributeNamespace,e.oldValue=t.oldValue,e}function l(t,e){return _=new a(t,e)}function c(t){return b||((b=u(_)).oldValue=t,b)}function h(){_=b=void 0}function d(t){return t===b||t===_}function p(t,e){return t===e?t:b&&d(t)?b:null}function f(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}if(!t.JsMutationObserver){var m,g=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],y=String(Math.random());window.addEventListener("message",function(t){if(t.data===y){var e=v;v=[],e.forEach(function(t){t()})}}),m=function(t){v.push(t),window.postMessage(y,"*")}}var _,b,w=!1,x=[],A=0;s.prototype={observe:function(t,e){if(t=n(t),!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var i=g.get(t);i||g.set(t,i=[]);for(var o,r=0;r<i.length;r++)if(i[r].observer===this){(o=i[r]).removeListeners(),o.options=e;break}o||(o=new f(this,t,e),i.push(o),this.nodes_.push(t)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(t){for(var e=g.get(t),n=0;n<e.length;n++){var i=e[n];if(i.observer===this){i.removeListeners(),e.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},f.prototype={enqueue:function(t){var n=this.observer.records_,i=n.length;if(n.length>0){var o=p(n[i-1],t);if(o)return void(n[i-1]=o)}else e(this.observer);n[i]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=g.get(t);e||g.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=g.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,i=t.target;(s=new l("attributes",i)).attributeName=e,s.attributeNamespace=n;var o=t.attrChange===MutationEvent.ADDITION?null:t.prevValue;r(i,function(t){return!t.attributes||t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(e)&&-1===t.attributeFilter.indexOf(n)?void 0:t.attributeOldValue?c(o):s});break;case"DOMCharacterDataModified":var s=l("characterData",i=t.target);o=t.prevValue;r(i,function(t){return t.characterData?t.characterDataOldValue?c(o):s:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var a,u,d=t.target;"DOMNodeInserted"===t.type?(a=[d],u=[]):(a=[],u=[d]);var p=d.previousSibling,f=d.nextSibling;(s=l("childList",t.target.parentNode)).addedNodes=a,s.removedNodes=u,s.previousSibling=p,s.nextSibling=f,r(t.relatedNode,function(t){return t.childList?s:void 0})}h()}},t.JsMutationObserver=s,t.MutationObserver||(t.MutationObserver=s,s._isPolyfilled=!0)}}(self),function(){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}var e,n;if(window.requestAnimationFrame||(window.requestAnimationFrame=(e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)?function(t){return e(function(){t(performance.now())})}:function(t){return window.setTimeout(t,1e3/60)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}),!((n=document.createEvent("Event")).initEvent("foo",!0,!0),n.preventDefault(),n.defaultPrevented)){var i=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(i.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,Boolean(e.bubbles),Boolean(e.cancelable),e.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var r=window.Event;window.Event=function(t,e){e=e||{};var n=document.createEvent("Event");return n.initEvent(t,Boolean(e.bubbles),Boolean(e.cancelable)),n},window.Event.prototype=r.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,n=[],i=function(t){n.push(t)},o=function(){n.forEach(function(e){e(t)})};t.addModule=i,t.initializeModules=o,t.hasNative=Boolean(document.registerElement),t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(t){function e(t,e){n(t,function(t){return!!e(t)||void i(t,e)}),i(t,e)}function n(t,e,i){var o=t.firstElementChild;if(!o)for(o=t.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)!0!==e(o,i)&&n(o,e,i),o=o.nextElementSibling;return null}function i(t,n){for(var i=t.shadowRoot;i;)e(i,n),i=i.olderShadowRoot}function o(t,e){r(t,e,[])}function r(t,e,n){if(t=window.wrap(t),!(n.indexOf(t)>=0)){n.push(t);for(var i,o=t.querySelectorAll("link[rel="+s+"]"),a=0,u=o.length;u>a&&(i=o[a]);a++)i["import"]&&r(i["import"],e,n);e(t)}}var s=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=o,t.forSubtree=e}),window.CustomElements.addModule(function(t){function e(t,e){return n(t,e)||i(t,e)}function n(e,n){return!!t.upgrade(e,n)||void(n&&s(e))}function i(t,e){_(t,function(t){return!!n(t,e)||void 0})}function o(t){A.push(t),x||(x=!0,setTimeout(r))}function r(){x=!1;for(var t,e=A,n=0,i=e.length;i>n&&(t=e[n]);n++)t();A=[]}function s(t){w?o(function(){a(t)}):a(t)}function a(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function u(t){l(t),_(t,function(t){l(t)})}function l(t){w?o(function(){c(t)}):c(t)}function c(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function h(t){for(var e=t,n=window.wrap(document);e;){if(e==n)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}function d(t){if(t.shadowRoot&&!t.shadowRoot.__watched){
y.dom&&console.log("watching shadow-root for: ",t.localName);for(var e=t.shadowRoot;e;)m(e),e=e.olderShadowRoot}}function p(t,n){if(y.dom){var i=n[0];if(i&&"childList"===i.type&&i.addedNodes&&i.addedNodes){for(var o=i.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var r=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,r||"")}var s=h(t);n.forEach(function(t){"childList"===t.type&&(E(t.addedNodes,function(t){t.localName&&e(t,s)}),E(t.removedNodes,function(t){t.localName&&u(t)}))}),y.dom&&console.groupEnd()}function f(t){for((t=window.wrap(t))||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(p(t,e.takeRecords()),r())}function m(t){if(!t.__observer){var e=new MutationObserver(p.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function g(t){t=window.wrap(t),y.dom&&console.group("upgradeDocument: ",t.baseURI.split("/").pop()),e(t,t===window.wrap(document)),m(t),y.dom&&console.groupEnd()}function v(t){b(t,g)}var y=t.flags,_=t.forSubtree,b=t.forDocumentTree,w=window.MutationObserver._isPolyfilled&&y["throttle-attached"];t.hasPolyfillMutations=w,t.hasThrottledAttached=w;var x=!1,A=[],E=Array.prototype.forEach.call.bind(Array.prototype.forEach),C=Element.prototype.createShadowRoot;C&&(Element.prototype.createShadowRoot=function(){var t=C.call(this);return window.CustomElements.watchShadow(this),t}),t.watchShadow=d,t.upgradeDocumentTree=v,t.upgradeDocument=g,t.upgradeSubtree=i,t.upgradeAll=e,t.attached=s,t.takeRecords=f}),window.CustomElements.addModule(function(t){function e(e,i){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var o=e.getAttribute("is"),r=t.getRegisteredDefinition(e.localName)||t.getRegisteredDefinition(o);if(r&&(o&&r.tag==e.localName||!o&&!r["extends"]))return n(e,r,i)}}function n(e,n,o){return s.upgrade&&console.group("upgrade:",e.localName),n.is&&e.setAttribute("is",n.is),i(e,n),e.__upgraded__=!0,r(e),o&&t.attached(e),t.upgradeSubtree(e,o),s.upgrade&&console.groupEnd(),e}function i(t,e){Object.__proto__?t.__proto__=e.prototype:(o(t,e.prototype,e["native"]),t.__proto__=e.prototype)}function o(t,e,n){for(var i={},o=e;o!==n&&o!==HTMLElement.prototype;){for(var r,s=Object.getOwnPropertyNames(o),a=0;r=s[a];a++)i[r]||(Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r)),i[r]=1);o=Object.getPrototypeOf(o)}}function r(t){t.createdCallback&&t.createdCallback()}var s=t.flags;t.upgrade=e,t.upgradeWithDefinition=n,t.implementPrototype=i}),window.CustomElements.addModule(function(t){function e(e,i){var u=i||{};if(!e)throw new Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(e)+"'.");if(o(e))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(e)+"'. The type name is invalid.");if(l(e))throw new Error("DuplicateDefinitionError: a type with name '"+String(e)+"' is already registered");return u.prototype||(u.prototype=Object.create(HTMLElement.prototype)),u.__name=e.toLowerCase(),u["extends"]&&(u["extends"]=u["extends"].toLowerCase()),u.lifecycle=u.lifecycle||{},u.ancestry=r(u["extends"]),s(u),a(u),n(u.prototype),c(u.__name,u),u.ctor=h(u),u.ctor.prototype=u.prototype,u.prototype.constructor=u.ctor,t.ready&&g(document),u.ctor}function n(t){if(!t.setAttribute._polyfilled){var e=t.setAttribute;t.setAttribute=function(t,n){i.call(this,t,n,e)};var n=t.removeAttribute;t.removeAttribute=function(t){i.call(this,t,null,n)},t.setAttribute._polyfilled=!0}}function i(t,e,n){t=t.toLowerCase();var i=this.getAttribute(t);n.apply(this,arguments);var o=this.getAttribute(t);this.attributeChangedCallback&&o!==i&&this.attributeChangedCallback(t,i,o)}function o(t){for(var e=0;e<w.length;e++)if(t===w[e])return!0}function r(t){var e=l(t);return e?r(e["extends"]).concat([e]):[]}function s(t){for(var e,n=t["extends"],i=0;e=t.ancestry[i];i++)n=e.is&&e.tag;t.tag=n||t.__name,n&&(t.is=t.__name)}function a(t){if(!Object.__proto__){var e=HTMLElement.prototype;if(t.is){var n=document.createElement(t.tag);e=Object.getPrototypeOf(n)}for(var i,o=t.prototype,r=!1;o;)o==e&&(r=!0),(i=Object.getPrototypeOf(o))&&(o.__proto__=i),o=i;r||console.warn(t.tag+" prototype not found in prototype chain for "+t.is),t["native"]=e}}function u(t){return y(E(t.tag),t)}function l(t){return t?x[t.toLowerCase()]:void 0}function c(t,e){x[t]=e}function h(t){return function(){return u(t)}}function d(t,e,n){return t===A?p(e,n):C(t,e)}function p(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var n,i=l(e||t);if(i){if(t==i.tag&&e==i.is)return new i.ctor;if(!e&&!i.is)return new i.ctor}return e?((n=p(t)).setAttribute("is",e),n):(n=E(t),t.indexOf("-")>=0&&_(n,HTMLElement),n)}function f(t,e){var n=t[e];t[e]=function(){var t=n.apply(this,arguments);return v(t),t}}var m,g=(t.isIE,t.upgradeDocumentTree),v=t.upgradeAll,y=t.upgradeWithDefinition,_=t.implementPrototype,b=t.useNative,w=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],x={},A="http://www.w3.org/1999/xhtml",E=document.createElement.bind(document),C=document.createElementNS.bind(document);m=Object.__proto__||b?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var n=t;n;){if(n===e.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),document.registerElement=e,document.createElement=p,document.createElementNS=d,t.registry=x,t["instanceof"]=m,t.reservedTagList=w,t.getRegisteredDefinition=l,document.register=document.registerElement}),function(t){function e(){r(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(t){setTimeout(t,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=t.useNative,i=t.initializeModules;if(t.isIE,n){var o=function(){};t.watchShadow=o,t.upgrade=o,t.upgradeAll=o,t.upgradeDocumentTree=o,t.upgradeSubtree=o,t.takeRecords=o,t["instanceof"]=function(t,e){return t instanceof e}}else i();var r=t.upgradeDocumentTree,s=t.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(t){return t}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(t){t["import"]&&s(wrap(t["import"]))}),"complete"===document.readyState||t.flags.eager)e();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var a=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(a,e)}else e()}(window.CustomElements),function(){}.call(this),function(){var t=this;(function(){(function(){this.Trix={VERSION:"0.11.1",ZERO_WIDTH_SPACE:"\ufeff",NON_BREAKING_SPACE:"\xa0",OBJECT_REPLACEMENT_CHARACTER:"\ufffc",config:{}}}).call(this)}).call(t);var e=t.Trix;(function(){(function(){e.BasicObject=function(){function t(){}var e,n,i;return t.proxyMethod=function(t){var i,o,r,s,a;return r=n(t),i=r.name,s=r.toMethod,a=r.toProperty,o=r.optional,this.prototype[i]=function(){var t,n;return t=null!=s?o?"function"==typeof this[s]?this[s]():void 0:this[s]():null!=a?this[a]:void 0,o?null!=(n=null!=t?t[i]:void 0)?e.call(n,t,arguments):void 0:(n=t[i],e.call(n,t,arguments))}},n=function(t){var e,n;if(!(n=t.match(i)))throw new Error("can't parse @proxyMethod expression: "+t);return e={name:n[4]},null!=n[2]?e.toMethod=n[1]:e.toProperty=n[1],null!=n[3]&&(e.optional=!0),e},e=Function.prototype.apply,i=/^(.+?)(\(\))?(\?)?\.(.+?)$/,t}()}).call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Object=function(n){function i(){this.id=++o}var o;return t(i,n),o=0,i.fromJSONString=function(t){return this.fromJSON(JSON.parse(t))},i.prototype.hasSameConstructorAs=function(t){return this.constructor===(null!=t?t.constructor:void 0)},i.prototype.isEqualTo=function(t){return this===t},i.prototype.inspect=function(){var t,e,n;return t=function(){var t,i,o;for(e in o=[],i=null!=(t=this.contentsForInspection())?t:{})n=i[e],o.push(e+"="+n);return o}.call(this),"#<"+this.constructor.name+":"+this.id+(t.length?" "+t.join(", "):"")+">"},i.prototype.contentsForInspection=function(){},i.prototype.toJSONString=function(){return JSON.stringify(this)},i.prototype.toUTF16String=function(){return e.UTF16String.box(this)},i.prototype.getCacheKey=function(){return this.id.toString()},i}(e.BasicObject)}.call(this),function(){e.extend=function(t){var e,n;for(e in t)n=t[e],this[e]=n;return this}}.call(this),function(){e.extend({defer:function(t){return setTimeout(t,1)}})}.call(this),function(){var t,n;e.extend({normalizeSpaces:function(t){return t.replace(RegExp(""+e.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+e.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(t){return t.replace(/\r\n/g,"\n")},breakableWhitespacePattern:RegExp("[^\\S"+e.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(t){return t.replace(RegExp(""+e.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},summarizeStringChange:function(t,i){var o,r,s,a;return t=e.UTF16String.box(t),(i=e.UTF16String.box(i)).length<t.length?(a=(r=n(t,i))[0],o=r[1]):(o=(s=n(i,t))[0],a=s[1]),{added:o,removed:a}}}),n=function(n,i){var o,r,s,a,u;return n.isEqualTo(i)?["",""]:(s=(a=(r=t(n,i)).utf16String.length)?(u=r.offset,o=n.codepoints.slice(0,u).concat(n.codepoints.slice(u+a)),t(i,e.UTF16String.fromCodepoints(o))):t(i,n),[r.utf16String.toString(),s.utf16String.toString()])},t=function(t,e){var n,i,o;for(n=0,i=t.length,o=e.length;i>n&&t.charAt(n).isEqualTo(e.charAt(n));)n++;for(;i>n+1&&t.charAt(i-1).isEqualTo(e.charAt(o-1));)i--,o--;return{utf16String:t.slice(n,i),offset:n}}}.call(this),function(){e.extend({copyObject:function(t){var e,n,i;for(e in null==t&&(t={}),n={},t)i=t[e],n[e]=i;return n},objectsAreEqual:function(t,e){var n;if(null==t&&(t={}),null==e&&(e={}),Object.keys(t).length!==Object.keys(e).length)return!1;for(n in t)if(t[n]!==e[n])return!1;return!0}})}.call(this),function(){var t=[].slice;e.extend({arraysAreEqual:function(t,e){var n,i,o;if(null==t&&(t=[]),null==e&&(e=[]),t.length!==e.length)return!1;for(i=n=0,o=t.length;o>n;i=++n)if(t[i]!==e[i])return!1;return!0},arrayStartsWith:function(t,n){return null==t&&(t=[]),null==n&&(n=[]),e.arraysAreEqual(t.slice(0,n.length),n)},spliceArray:function(){var e,n,i;return n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],(i=n.slice(0)).splice.apply(i,e),i},summarizeArrayChange:function(t,e){var n,i,o,r,s,a,u,l,c,h,d;for(null==t&&(t=[]),null==e&&(e=[]),n=[],h=[],o=new Set,r=0,u=t.length;u>r;r++)d=t[r],o.add(d);for(i=new Set,s=0,l=e.length;l>s;s++)d=e[s],i.add(d),o.has(d)||n.push(d);for(a=0,c=t.length;c>a;a++)d=t[a],i.has(d)||h.push(d);return{added:n,removed:h}}})}.call(this),function(){var t,n,i,o;t=null,n=null,o=null,i=null,e.extend({getAllAttributeNames:function(){return null!=t?t:t=e.getTextAttributeNames().concat(e.getBlockAttributeNames())},getBlockConfig:function(t){return e.config.blockAttributes[t]},getBlockAttributeNames:function(){return null!=n?n:n=Object.keys(e.config.blockAttributes)},getTextConfig:function(t){return e.config.textAttributes[t]},getTextAttributeNames:function(){return null!=o?o:o=Object.keys(e.config.textAttributes)},getListAttributeNames:function(){var t,n;return null!=i?i:i=function(){var i,o;for(t in o=[],i=e.config.blockAttributes)null!=(n=i[t].listAttribute)&&o.push(n);return o}()}})}.call(this),function(){var t,n,i,o,r,s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=document.documentElement,n=null!=(i=null!=(o=null!=(r=t.matchesSelector)?r:t.webkitMatchesSelector)?o:t.msMatchesSelector)?i:t.mozMatchesSelector,e.extend({handleEvent:function(n,i){var o,r,s,a,u,l,c,h,d,p,f;return u=(c=null!=i?i:{}).onElement,a=c.matchingSelector,f=c.withCallback,s=c.inPhase,l=c.preventDefault,d=c.times,o=null!=u?u:t,h=a,f,p="capturing"===s,(r=function(t){var n;return null!=d&&0==--d&&r.destroy(),null!=(n=e.findClosestElementFromNode(t.target,{matchingSelector:h}))&&(null!=f&&f.call(n,t,n),l)?t.preventDefault():void 0}).destroy=function(){return o.removeEventListener(n,r,p)},o.addEventListener(n,r,p),r},handleEventOnce:function(t,n){return null==n&&(n={}),n.times=1,e.handleEvent(t,n)},triggerEvent:function(n,i){var o,r,s,a,u,l,c;return l=(c=null!=i?i:{}).onElement,r=c.bubbles,s=c.cancelable,o=c.attributes,a=null!=l?l:t,r=!1!==r,s=!1!==s,(u=document.createEvent("Events")).initEvent(n,r,s),null!=o&&e.extend.call(u,o),a.dispatchEvent(u)},elementMatchesSelector:function(t,e){return 1===(null!=t?t.nodeType:void 0)?n.call(t,e):void 0},findClosestElementFromNode:function(t,n){var i,o,r;for(i=(o=null!=n?n:{}).matchingSelector,r=o.untilNode;null!=t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;if(null!=t){if(null==i)return t;if(t.closest&&null==r)return t.closest(i);for(;t&&t!==r;){if(e.elementMatchesSelector(t,i))return t;t=t.parentNode}}},findInnerElement:function(t){for(;null!=t?t.firstElementChild:void 0;)t=t.firstElementChild;return t},innerElementIsActive:function(t){return document.activeElement!==t&&e.elementContainsNode(t,document.activeElement)},elementContainsNode:function(t,e){if(t&&e)for(;e;){if(e===t)return!0;e=e.parentNode}},findNodeFromContainerAndOffset:function(t,e){var n;if(t)return t.nodeType===Node.TEXT_NODE?t:0===e?null!=(n=t.firstChild)?n:t:t.childNodes.item(e-1)},findElementFromContainerAndOffset:function(t,n){var i;return i=e.findNodeFromContainerAndOffset(t,n),e.findClosestElementFromNode(i)},findChildIndexOfNode:function(t){var e;if(null!=t?t.parentNode:void 0){for(e=0;t=t.previousSibling;)e++;return e}},walkTree:function(t,e){var n,i,o,r,s;return i=(o=null!=e?e:{}).onlyNodesOfType,r=o.usingFilter,n=o.expandEntityReferences,s=function(){switch(i){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(t,s,null!=r?r:null,!0===n)},tagName:function(t){var e;return null!=t&&null!=(e=t.tagName)?e.toLowerCase():void 0},makeElement:function(t,e){var n,i,o,r,s,a,u,l,c,h;if(null==e&&(e={}),"object"==typeof t?t=(e=t).tagName:e={attributes:e},i=document.createElement(t),null!=e.editable&&(null==e.attributes&&(e.attributes={}),e.attributes.contenteditable=e.editable),e.attributes)for(r in a=e.attributes)h=a[r],i.setAttribute(r,h);if(e.style)for(r in u=e.style)h=u[r],i.style[r]=h;if(e.data)for(r in l=e.data)h=l[r],i.dataset[r]=h;if(e.className)for(o=0,s=(c=e.className.split(" ")).length;s>o;o++)n=c[o],i.classList.add(n);return e.textContent&&(i.textContent=e.textContent),i},getBlockTagNames:function(){var t,n;return null!=e.blockTagNames?e.blockTagNames:e.blockTagNames=function(){var i,o;for(t in o=[],i=e.config.blockAttributes)n=i[t],o.push(n.tagName);return o}()},nodeIsBlockContainer:function(t){return e.nodeIsBlockStartComment(null!=t?t.firstChild:void 0)},nodeProbablyIsBlockContainer:function(t){var n,i;return n=e.tagName(t),s.call(e.getBlockTagNames(),n)>=0&&(i=e.tagName(t.firstChild),s.call(e.getBlockTagNames(),i)<0)},nodeIsBlockStart:function(t,n){return(null!=n?n:{strict:!0}).strict?e.nodeIsBlockStartComment(t):e.nodeIsBlockStartComment(t)||!e.nodeIsBlockStartComment(t.firstChild)&&e.nodeProbablyIsBlockContainer(t)},nodeIsBlockStartComment:function(t){return e.nodeIsCommentNode(t)&&"block"===(null!=t?t.data:void 0)},nodeIsCommentNode:function(t){return(null!=t?t.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(t){return t?e.nodeIsTextNode(t)?t.data===e.ZERO_WIDTH_SPACE:e.nodeIsCursorTarget(t.firstChild):void 0},nodeIsAttachmentElement:function(t){return e.elementMatchesSelector(t,e.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(t){return e.nodeIsTextNode(t)&&""===(null!=t?t.data:void 0)},nodeIsTextNode:function(t){return(null!=t?t.nodeType:void 0)===Node.TEXT_NODE}})}.call(this),function(){var t,n,i,o,r;t=e.copyObject,o=e.objectsAreEqual,e.extend({normalizeRange:i=function(t){var e;if(null!=t)return Array.isArray(t)||(t=[t,t]),[n(t[0]),n(null!=(e=t[1])?e:t[0])]},rangeIsCollapsed:function(t){var e,n,o;if(null!=t)return o=(n=i(t))[0],e=n[1],r(o,e)},rangesAreEqual:function(t,e){var n,o,s,a,u,l;if(null!=t&&null!=e)return o=(s=i(t))[0],n=s[1],l=(a=i(e))[0],u=a[1],r(o,l)&&r(n,u)}}),n=function(e){return"number"==typeof e?e:t(e)},r=function(t,e){return"number"==typeof t?t===e:o(t,e)}}.call(this),function(){var t,n,i,o;t={extendsTagName:"div",css:"%t { display: block; }"},e.registerElement=function(e,n){var r,s,a,u,l,c,h;return null==n&&(n={}),e=e.toLowerCase(),u=null!=(h=(l=o(n)).extendsTagName)?h:t.extendsTagName,delete l.extendsTagName,s=l.defaultCSS,delete l.defaultCSS,null!=s&&u===t.extendsTagName?s+="\n"+t.css:s=t.css,i(s,e),(a=Object.getPrototypeOf(document.createElement(u))).__super__=a,c=Object.create(a,l),r=document.registerElement(e,{prototype:c}),Object.defineProperty(c,"constructor",{value:r}),r},i=function(t,e){return n(e).textContent=t.replace(/%t/g,e)},n=function(t){var e;return(e=document.createElement("style")).setAttribute("type","text/css"),e.setAttribute("data-tag-name",t.toLowerCase()),document.head.insertBefore(e,document.head.firstChild),e},o=function(t){var e,n,i;for(e in n={},t)i=t[e],n[e]="function"==typeof i?{value:i}:i;return n}}.call(this),function(){var t,n;e.extend({getDOMSelection:function(){var t;return(t=window.getSelection()).rangeCount>0?t:void 0},getDOMRange:function(){var n,i;return(n=null!=(i=e.getDOMSelection())?i.getRangeAt(0):void 0)&&!t(n)?n:void 0},setDOMRange:function(t){var n;return(n=window.getSelection()).removeAllRanges(),n.addRange(t),e.selectionChangeObserver.update()}}),t=function(t){return n(t.startContainer)||n(t.endContainer)},n=function(t){return!Object.getPrototypeOf(t)}}.call(this),function(){}.call(this),function(){var t,n=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=e.arraysAreEqual,e.Hash=function(i){function o(t){null==t&&(t={}),this.values=s(t),o.__super__.constructor.apply(this,arguments)}var r,s,a,u,l;return n(o,i),o.fromCommonAttributesOfObjects=function(t){var e,n,i,o,s,a;if(null==t&&(t=[]),!t.length)return new this;for(i=(e=r(t[0])).getKeys(),n=0,o=(a=t.slice(1)).length;o>n;n++)s=a[n],i=e.getKeysCommonToHash(r(s)),e=e.slice(i);return e},o.box=function(t){return r(t)},o.prototype.add=function(t,e){return this.merge(u(t,e))},o.prototype.remove=function(t){return new e.Hash(s(this.values,t))},o.prototype.get=function(t){return this.values[t]},o.prototype.has=function(t){return t in this.values},o.prototype.merge=function(t){return new e.Hash(a(this.values,l(t)))},o.prototype.slice=function(t){var n,i,o,r;for(r={},n=0,o=t.length;o>n;n++)i=t[n],this.has(i)&&(r[i]=this.values[i]);return new e.Hash(r)},o.prototype.getKeys=function(){return Object.keys(this.values)},o.prototype.getKeysCommonToHash=function(t){var e,n,i,o,s;for(t=r(t),s=[],e=0,i=(o=this.getKeys()).length;i>e;e++)n=o[e],this.values[n]===t.values[n]&&s.push(n);return s},o.prototype.isEqualTo=function(e){return t(this.toArray(),r(e).toArray())},o.prototype.isEmpty=function(){return 0===this.getKeys().length},o.prototype.toArray=function(){var t,e,n;return(null!=this.array?this.array:this.array=function(){var i;for(t in e=[],i=this.values)n=i[t],e.push(t,n);return e}.call(this)).slice(0)},o.prototype.toObject=function(){return s(this.values)},o.prototype.toJSON=function(){return this.toObject()},o.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},u=function(t,e){var n;return(n={})[t]=e,n},a=function(t,e){var n,i,o;for(n in i=s(t),e)o=e[n],i[n]=o;return i},s=function(t,e){var n,i,o,r,s;for(r={},n=0,o=(s=Object.keys(t).sort()).length;o>n;n++)(i=s[n])!==e&&(r[i]=t[i]);return r},r=function(t){return t instanceof e.Hash?t:new e.Hash(t)},l=function(t){return t instanceof e.Hash?t.values:t},o}(e.Object)}.call(this),function(){e.ObjectGroup=function(){function t(t,e){var n,i;this.objects=null!=t?t:[],i=e.depth,(n=e.asTree)&&(this.depth=i,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}return t.groupObjects=function(t,e){var n,i,o,r,s,a,u,l,c;for(null==t&&(t=[]),o=(c=null!=e?e:{}).depth,(n=c.asTree)&&null==o&&(o=0),l=[],s=0,a=t.length;a>s;s++){if(u=t[s],r){if(("function"==typeof u.canBeGrouped?u.canBeGrouped(o):void 0)&&("function"==typeof(i=r[r.length-1]).canBeGroupedWith?i.canBeGroupedWith(u,o):void 0)){r.push(u);continue}l.push(new this(r,{depth:o,asTree:n})),r=null}("function"==typeof u.canBeGrouped?u.canBeGrouped(o):void 0)?r=[u]:l.push(u)}return r&&l.push(new this(r,{depth:o,asTree:n})),l},t.prototype.getObjects=function(){return this.objects},t.prototype.getDepth=function(){return this.depth},t.prototype.getCacheKey=function(){var t,e,n,i,o;for(e=["objectGroup"],t=0,n=(o=this.getObjects()).length;n>t;t++)i=o[t],e.push(i.getCacheKey());return e.join("/")},t}()}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.ObjectMap=function(e){function n(t){var e,n,i,o,r;for(null==t&&(t=[]),this.objects={},i=0,o=t.length;o>i;i++)r=t[i],n=JSON.stringify(r),null==(e=this.objects)[n]&&(e[n]=r)}return t(n,e),n.prototype.find=function(t){var e;return e=JSON.stringify(t),this.objects[e]},n}(e.BasicObject)}.call(this),function(){e.ElementStore=function(){function t(t){this.reset(t)}var e;return t.prototype.add=function(t){var n;return n=e(t),this.elements[n]=t},t.prototype.remove=function(t){var n,i;return n=e(t),(i=this.elements[n])?(delete this.elements[n],i):void 0},t.prototype.reset=function(t){var e,n,i;for(null==t&&(t=[]),this.elements={},n=0,i=t.length;i>n;n++)e=t[n],this.add(e);return t},e=function(t){return t.dataset.trixStoreKey},t}()}.call(this),function(){}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Operation=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.isPerforming=function(){return!0===this.performing},n.prototype.hasPerformed=function(){return!0===this.performed},n.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},n.prototype.hasFailed=function(){return this.performed&&!this.succeeded},n.prototype.getPromise=function(){return null!=this.promise?this.promise:this.promise=new Promise((t=this,function(e,n){return t.performing=!0,t.perform(function(i,o){return t.succeeded=i,t.performing=!1,t.performed=!0,t.succeeded?e(o):n(o)})}));var t},n.prototype.perform=function(t){return t(!1)},n.prototype.release=function(){var t;return null!=(t=this.promise)&&"function"==typeof t.cancel&&t.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},n.proxyMethod("getPromise().then"),n.proxyMethod("getPromise().catch"),n}(e.BasicObject)}.call(this),function(){var t,n,i,o,r,s=function(t,e){function n(){this.constructor=t}for(var i in e)a.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;e.UTF16String=function(t){function e(t,e){this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return s(e,t),e.box=function(t){return null==t&&(t=""),t instanceof this?t:this.fromUCS2String(null!=t?t.toString():void 0)},e.fromUCS2String=function(t){return new this(t,o(t))},e.fromCodepoints=function(t){return new this(r(t),t)},e.prototype.offsetToUCS2Offset=function(t){return r(this.codepoints.slice(0,Math.max(0,t))).length},e.prototype.offsetFromUCS2Offset=function(t){return o(this.ucs2String.slice(0,Math.max(0,t))).length},e.prototype.slice=function(){var t;return this.constructor.fromCodepoints((t=this.codepoints).slice.apply(t,arguments))},e.prototype.charAt=function(t){return this.slice(t,t+1)},e.prototype.isEqualTo=function(t){return this.constructor.box(t).ucs2String===this.ucs2String},e.prototype.toJSON=function(){return this.ucs2String},e.prototype.getCacheKey=function(){return this.ucs2String},e.prototype.toString=function(){return this.ucs2String},e}(e.BasicObject),t=1===("function"==typeof Array.from?Array.from("\ud83d\udc7c").length:void 0),n=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),i=" \ud83d\udc7c"===("function"==typeof String.fromCodePoint?String.fromCodePoint(32,128124):void 0),o=t&&n?function(t){return Array.from(t).map(function(t){return t.codePointAt(0)})}:function(t){var e,n,i,o,r;for(o=[],e=0,i=t.length;i>e;)(r=t.charCodeAt(e++))>=55296&&56319>=r&&i>e&&(56320==(64512&(n=t.charCodeAt(e++)))?r=((1023&r)<<10)+(1023&n)+65536:e--),o.push(r);return o},r=i?function(t){return String.fromCodePoint.apply(String,t)}:function(t){var e,n;return function(){var i,o,r;for(r=[],i=0,o=t.length;o>i;i++)n=t[i],e="",n>65535&&(n-=65536,e+=String.fromCharCode(n>>>10&1023|55296),n=56320|1023&n),r.push(e+String.fromCharCode(n));return r}().join("")}}.call(this),function(){}.call(this),function(){}.call(this),function(){e.config.lang={bold:"Bold",bullets:"Bullets","byte":"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}.call(this),function(){e.config.css={attachment:"attachment",attachmentProgress:"attachment__progress",attachmentName:"attachment__name",attachmentSize:"attachment__size",attachmentRemove:"attachment__remove",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor"}}.call(this),function(){var t;e.config.blockAttributes=t={"default":{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(n){return e.tagName(n.parentNode)===t[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(n){return e.tagName(n.parentNode)===t[this.listAttribute].tagName}}}}.call(this),function(){var t,n;t=e.config.lang,n=[t.bytes,t.KB,t.MB,t.GB,t.TB,t.PB],e.config.fileSize={prefix:"IEC",precision:2,formatter:function(e){var i,o;switch(e){case 0:return"0 "+t.bytes;case 1:return"1 "+t["byte"];default:return i=function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}.call(this),o=Math.floor(Math.log(e)/Math.log(i)),(e/Math.pow(i,o)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"")+" "+n[o]}}}}.call(this),function(){e.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(t){var e;return"bold"===(e=window.getComputedStyle(t)).fontWeight||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:function(t){return"italic"===window.getComputedStyle(t).fontStyle}},href:{groupTagName:"a",parser:function(t){var n,i;return i="a:not("+e.AttachmentView.attachmentSelector+")",(n=e.findClosestElementFromNode(t,{matchingSelector:i}))?n.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}.call(this),function(){var t,n,i,o,r;r="[data-trix-serialize=false]",o=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],i="["+(n="data-trix-serialized-attributes")+"]",t=new RegExp("<!--block-->","g"),e.extend({serializers:{"application/json":function(t){var n;if(t instanceof e.Document)n=t;else{if(!(t instanceof HTMLElement))throw new Error("unserializable object");n=e.Document.fromHTML(t.innerHTML)}return n.toSerializableDocument().toJSONString()},"text/html":function(s){var a,u,l,c,h,d,p,f,m,g,v,y,_,b,w,x,A;if(s instanceof e.Document)c=e.DocumentView.render(s);else{if(!(s instanceof HTMLElement))throw new Error("unserializable object");c=s.cloneNode(!0)}for(h=0,m=(b=c.querySelectorAll(r)).length;m>h;h++)(l=b[h]).parentNode.removeChild(l);for(d=0,g=o.length;g>d;d++)for(a=o[d],p=0,v=(w=c.querySelectorAll("["+a+"]")).length;v>p;p++)(l=w[p]).removeAttribute(a);for(f=0,y=(x=c.querySelectorAll(i)).length;y>f;f++){l=x[f];try{for(_ in u=JSON.parse(l.getAttribute(n)),l.removeAttribute(n),u)A=u[_],l.setAttribute(_,A)}catch(E){}}return c.innerHTML.replace(t,"")}},deserializers:{"application/json":function(t){return e.Document.fromJSONString(t)},"text/html":function(t){return e.Document.fromHTML(t)}},serializeToContentType:function(t,n){var i;if(i=e.serializers[n])return i(t);throw new Error("unknown content type: "+n)},deserializeFromContentType:function(t,n){var i;if(i=e.deserializers[n])return i(t);throw new Error("unknown content type: "+n)}})}.call(this),function(){var t;t=e.config.lang,e.config.toolbar={getDefaultHTML:function(){
return'<div class="trix-button-row">\n  <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="'+t.bold+'" tabindex="-1">'+t.bold+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="'+t.italic+'" tabindex="-1">'+t.italic+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="'+t.strike+'" tabindex="-1">'+t.strike+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="'+t.link+'" tabindex="-1">'+t.link+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-heading-1" data-trix-attribute="heading1" title="'+t.heading1+'" tabindex="-1">'+t.heading1+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-quote" data-trix-attribute="quote" title="'+t.quote+'" tabindex="-1">'+t.quote+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-code" data-trix-attribute="code" title="'+t.code+'" tabindex="-1">'+t.code+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="'+t.bullets+'" tabindex="-1">'+t.bullets+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="'+t.numbers+'" tabindex="-1">'+t.numbers+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-decrease-nesting-level" data-trix-action="decreaseNestingLevel" title="'+t.outdent+'" tabindex="-1">'+t.outdent+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-increase-nesting-level" data-trix-action="increaseNestingLevel" title="'+t.indent+'" tabindex="-1">'+t.indent+'</button>\n  </span>\n\n  <span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools">\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="'+t.undo+'" tabindex="-1">'+t.undo+'</button>\n    <button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="'+t.redo+'" tabindex="-1">'+t.redo+'</button>\n  </span>\n</div>\n\n<div class="trix-dialogs" data-trix-dialogs>\n  <div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href">\n    <div class="trix-dialog__link-fields">\n      <input type="url" name="href" class="trix-input trix-input--dialog" placeholder="'+t.urlPlaceholder+'" required data-trix-input>\n      <div class="trix-button-group">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.link+'" data-trix-method="setAttribute">\n        <input type="button" class="trix-button trix-button--dialog" value="'+t.unlink+'" data-trix-method="removeAttribute">\n      </div>\n    </div>\n  </div>\n</div>'}}}.call(this),function(){e.config.undoInterval=5e3}.call(this),function(){e.config.attachments={preview:{caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}.call(this),function(){}.call(this),function(){e.registerElement("trix-toolbar",{defaultCSS:"%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}",createdCallback:function(){return""===this.innerHTML?this.innerHTML=e.config.toolbar.getDefaultHTML():void 0}})}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e.ObjectView=function(n){function o(t,e){this.object=t,this.options=null!=e?e:{},this.childViews=[],this.rootView=this}return t(o,n),o.prototype.getNodes=function(){var t,e,n,i,o;for(null==this.nodes&&(this.nodes=this.createNodes()),o=[],t=0,e=(i=this.nodes).length;e>t;t++)n=i[t],o.push(n.cloneNode(!0));return o},o.prototype.invalidate=function(){var t;return this.nodes=null,null!=(t=this.parentView)?t.invalidate():void 0},o.prototype.invalidateViewForObject=function(t){var e;return null!=(e=this.findViewForObject(t))?e.invalidate():void 0},o.prototype.findOrCreateCachedChildView=function(t,e){var n;return(n=this.getCachedViewForObject(e))?this.recordChildView(n):(n=this.createChildView.apply(this,arguments),this.cacheViewForObject(n,e)),n},o.prototype.createChildView=function(t,n,i){var o;return null==i&&(i={}),n instanceof e.ObjectGroup&&(i.viewClass=t,t=e.ObjectGroupView),o=new t(n,i),this.recordChildView(o)},o.prototype.recordChildView=function(t){return t.parentView=this,t.rootView=this.rootView,i.call(this.childViews,t)<0&&this.childViews.push(t),t},o.prototype.getAllChildViews=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.childViews).length;n>e;e++)t=i[e],o.push(t),o=o.concat(t.getAllChildViews());return o},o.prototype.findElement=function(){return this.findElementForObject(this.object)},o.prototype.findElementForObject=function(t){var e;return(e=null!=t?t.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+e+"']"):void 0},o.prototype.findViewForObject=function(t){var e,n,i,o;for(e=0,n=(i=this.getAllChildViews()).length;n>e;e++)if((o=i[e]).object===t)return o},o.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?null!=this.viewCache?this.viewCache:this.viewCache={}:void 0},o.prototype.isViewCachingEnabled=function(){return!1!==this.shouldCacheViews},o.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},o.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},o.prototype.getCachedViewForObject=function(t){var e;return null!=(e=this.getViewCache())?e[t.getCacheKey()]:void 0},o.prototype.cacheViewForObject=function(t,e){var n;return null!=(n=this.getViewCache())?n[e.getCacheKey()]=t:void 0},o.prototype.garbageCollectCachedViews=function(){var t,e,n,o,r,s;if(t=this.getViewCache()){for(e in s=this.getAllChildViews().concat(this),n=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)r=s[t],n.push(r.object.getCacheKey());return n}(),o=[],t)i.call(n,e)<0&&o.push(delete t[e]);return o}},o}(e.BasicObject)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.ObjectGroupView=function(e){function n(){n.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return t(n,e),n.prototype.getChildViews=function(){var t,e,n,i;if(!this.childViews.length)for(t=0,e=(i=this.objectGroup.getObjects()).length;e>t;t++)n=i[t],this.findOrCreateCachedChildView(this.viewClass,n,this.options);return this.childViews},n.prototype.createNodes=function(){var t,e,n,i,o,r,s,a;for(t=this.createContainerElement(),e=0,i=(s=this.getChildViews()).length;i>e;e++)for(n=0,o=(a=s[e].getNodes()).length;o>n;n++)r=a[n],t.appendChild(r);return[t]},n.prototype.createContainerElement=function(t){return null==t&&(t=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(t)},n}(e.ObjectView)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Controller=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(e.BasicObject)}.call(this),function(){var t,n,i,o,r,s,a=function(t,e){return function(){return t.apply(e,arguments)}},u=function(t,e){function n(){this.constructor=t}for(var i in e)l.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty,c=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=e.findClosestElementFromNode,i=e.nodeIsEmptyTextNode,n=e.nodeIsBlockStartComment,o=e.normalizeSpaces,r=e.summarizeStringChange,s=e.tagName,e.MutationObserver=function(e){function l(t){this.element=t,this.didMutate=a(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var h,d,p,f;return u(l,e),p="["+(d="data-trix-mutable")+"]",f={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},l.prototype.start=function(){return this.reset(),this.observer.observe(this.element,f)},l.prototype.stop=function(){return this.observer.disconnect()},l.prototype.didMutate=function(t){var e,n;return(e=this.mutations).push.apply(e,this.findSignificantMutations(t)),this.mutations.length?(null!=(n=this.delegate)&&"function"==typeof n.elementDidMutate&&n.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},l.prototype.reset=function(){return this.mutations=[]},l.prototype.findSignificantMutations=function(t){var e,n,i,o;for(o=[],e=0,n=t.length;n>e;e++)i=t[e],this.mutationIsSignificant(i)&&o.push(i);return o},l.prototype.mutationIsSignificant=function(t){var e,n,i,o;for(e=0,n=(o=this.nodesModifiedByMutation(t)).length;n>e;e++)if(i=o[e],this.nodeIsSignificant(i))return!0;return!1},l.prototype.nodeIsSignificant=function(t){return t!==this.element&&!this.nodeIsMutable(t)&&!i(t)},l.prototype.nodeIsMutable=function(e){return t(e,{matchingSelector:p})},l.prototype.nodesModifiedByMutation=function(t){var e;switch(e=[],t.type){case"attributes":t.attributeName!==d&&e.push(t.target);break;case"characterData":e.push(t.target.parentNode),e.push(t.target);break;case"childList":e.push.apply(e,t.addedNodes),e.push.apply(e,t.removedNodes)}return e},l.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},l.prototype.getTextMutationSummary=function(){var t,e,n,i,o,r,s,a,u,l,h;for(n=(a=this.getTextChangesFromCharacterData()).additions,o=a.deletions,r=0,s=(u=(h=this.getTextChangesFromChildList()).additions).length;s>r;r++)e=u[r],c.call(n,e)<0&&n.push(e);return o.push.apply(o,h.deletions),l={},(t=n.join(""))&&(l.textAdded=t),(i=o.join(""))&&(l.textDeleted=i),l},l.prototype.getMutationsByType=function(t){var e,n,i,o,r;for(r=[],e=0,n=(o=this.mutations).length;n>e;e++)(i=o[e]).type===t&&r.push(i);return r},l.prototype.getTextChangesFromChildList=function(){var t,e,i,r,s,a,u,l,c,d;for(t=[],u=[],e=0,r=(a=this.getMutationsByType("childList")).length;r>e;e++)s=a[e],t.push.apply(t,s.addedNodes),u.push.apply(u,s.removedNodes);return 0===t.length&&1===u.length&&n(u[0])?(c=[],d=["\n"]):(c=h(t),d=h(u)),{additions:function(){var t,e,n;for(n=[],i=t=0,e=c.length;e>t;i=++t)(l=c[i])!==d[i]&&n.push(o(l));return n}(),deletions:function(){var t,e,n;for(n=[],i=t=0,e=d.length;e>t;i=++t)(l=d[i])!==c[i]&&n.push(o(l));return n}()}},l.prototype.getTextChangesFromCharacterData=function(){var t,e,n,i,s,a,u,l;return(e=this.getMutationsByType("characterData")).length&&(l=e[0],n=e[e.length-1],s=o(l.oldValue),i=o(n.target.data),t=(a=r(s,i)).added,u=a.removed),{additions:t?[t]:[],deletions:u?[u]:[]}},h=function(t){var e,n,i,o;for(null==t&&(t=[]),o=[],e=0,n=t.length;n>e;e++)switch(i=t[e],i.nodeType){case Node.TEXT_NODE:o.push(i.data);break;case Node.ELEMENT_NODE:"br"===s(i)?o.push("\n"):o.push.apply(o,h(i.childNodes))}return o},l}(e.BasicObject)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.FileVerificationOperation=function(e){function n(t){this.file=t}return t(n,e),n.prototype.perform=function(t){var e,n;return(e=new FileReader).onerror=function(){return t(!1)},e.onload=(n=this,function(){e.onerror=null;try{e.abort()}catch(i){}return t(!0,n.file)}),e.readAsArrayBuffer(this.file)},n}(e.Operation)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.CompositionInput=function(e){function n(t){var e;this.inputController=t,e=this.inputController,this.responder=e.responder,this.delegate=e.delegate,this.inputSummary=e.inputSummary,this.data={}}return t(n,e),n.prototype.start=function(t){var e,n;return this.data.start=t,"keypress"===this.inputSummary.eventName&&this.inputSummary.textAdded&&null!=(e=this.responder)&&e.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=null!=(n=this.responder)?n.getSelectedRange():void 0},n.prototype.update=function(t){var e;return this.data.update=t,(e=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=e):void 0},n.prototype.end=function(t){var e,n,i,o;return this.data.end=t,this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0}),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.setSelectedRange(this.range),null!=(i=this.responder)&&i.insertString(this.data.end),null!=(o=this.responder)?o.setSelectedRange(this.range[0]+this.data.end.length):void 0):null!=this.data.start||null!=this.data.update?(this.requestReparse(),this.inputController.reset()):void 0},n.prototype.getEndData=function(){return this.data.end},n.prototype.isEnded=function(){return null!=this.getEndData()},n.prototype.canApplyToDocument=function(){var t,e;return 0===(null!=(t=this.data.start)?t.length:void 0)&&(null!=(e=this.data.end)?e.length:void 0)>0&&null!=this.range},n.proxyMethod("inputController.setInputSummary"),n.proxyMethod("inputController.requestRender"),n.proxyMethod("inputController.requestReparse"),n.proxyMethod("responder?.selectionIsExpanded"),n.proxyMethod("responder?.insertPlaceholder"),n.proxyMethod("responder?.selectPlaceholder"),n.proxyMethod("responder?.forgetPlaceholder"),n}(e.BasicObject)}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h,d,p,f,m=function(t,e){function n(){this.constructor=t}for(var i in e)g.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};o=e.handleEvent,c=e.makeElement,s=e.innerElementIsActive,h=e.objectsAreEqual,e.tagName,e.InputController=function(r){function f(t){var n;for(n in this.element=t,this.resetInputSummary(),this.mutationObserver=new e.MutationObserver(this.element),this.mutationObserver.delegate=this,this.events)o(n,{onElement:this.element,withCallback:this.handlerFor(n),inPhase:"capturing"})}var g;return m(f,r),g=0,f.keyNames={8:"backspace",9:"tab",13:"return",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},f.prototype.handlerFor=function(t){return e=this,function(n){return e.handleInput(function(){return s(this.element)?void 0:(this.eventName=t,this.events[t].call(this,n))})};var e},f.prototype.setInputSummary=function(t){var e,n;for(e in null==t&&(t={}),this.inputSummary.eventName=this.eventName,t)n=t[e],this.inputSummary[e]=n;return this.inputSummary},f.prototype.resetInputSummary=function(){return this.inputSummary={}},f.prototype.reset=function(){return this.resetInputSummary(),e.selectionChangeObserver.reset()},f.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},f.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},f.prototype.requestRender=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestRender?t.inputControllerDidRequestRender():void 0},f.prototype.requestReparse=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidRequestReparse&&t.inputControllerDidRequestReparse(),this.requestRender()},f.prototype.elementDidMutate=function(t){var e;return this.isComposing()?null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidAllowUnhandledInput?e.inputControllerDidAllowUnhandledInput():void 0:this.handleInput(function(){return this.mutationIsSignificant(t)&&(this.mutationIsExpected(t)?this.requestRender():this.requestReparse()),this.reset()})},f.prototype.mutationIsExpected=function(t){var e,n,i,o,r,s,a,u,l;return s=t.textAdded,a=t.textDeleted,!!this.inputSummary.preferDocument||(e=null!=s?s===this.inputSummary.textAdded:!this.inputSummary.textAdded,n=null!=a?this.inputSummary.didDelete:!this.inputSummary.didDelete,l="\n"===a&&!n,!!(((u=("\n"===s||" \n"===s)&&!e)&&!l||l&&!u)&&(o=this.getSelectedRange())&&(i=u?s.replace(/\n$/,"").length||-1:(null!=s?s.length:void 0)||1,null!=(r=this.responder)?r.positionIsBlockBreak(o[1]+i):void 0))||e&&n)},f.prototype.mutationIsSignificant=function(t){var e,n,i;return i=Object.keys(t).length>0,e=""===(null!=(n=this.compositionInput)?n.getEndData():void 0),i||!e},f.prototype.attachFiles=function(t){var n,i,o;return i=function(){var i,o,r;for(r=[],i=0,o=t.length;o>i;i++)n=t[i],r.push(new e.FileVerificationOperation(n));return r}(),Promise.all(i).then((o=this,function(t){return o.handleInput(function(){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillAttachFiles(),null!=(n=this.responder)&&n.insertFiles(t),this.requestRender()})}))},f.prototype.events={keydown:function(t){var n,i,o,r,s,u,l,c,h;if(this.isComposing()||this.resetInputSummary(),r=this.constructor.keyNames[t.keyCode]){for(i=this.keys,o=0,u=(c=["ctrl","alt","shift","meta"]).length;u>o;o++)l=c[o],t[l+"Key"]&&("ctrl"===l&&(l="control"),i=null!=i?i[l]:void 0);null!=(null!=i?i[r]:void 0)&&(this.setInputSummary({keyName:r}),e.selectionChangeObserver.reset(),i[r].call(this,t))}return a(t)&&(n=String.fromCharCode(t.keyCode).toLowerCase())&&((s=function(){var e,n,i,o;for(o=[],e=0,n=(i=["alt","shift"]).length;n>e;e++)l=i[e],t[l+"Key"]&&o.push(l);return o}()).push(n),null!=(h=this.delegate)?h.inputControllerDidReceiveKeyboardCommand(s):void 0)?t.preventDefault():void 0},keypress:function(t){var e,n,i;if(null==this.inputSummary.eventName&&(!t.metaKey&&!t.ctrlKey||t.altKey)&&!l(t)&&!u(t))return(i=p(t))?(null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString(i),this.setInputSummary({textAdded:i,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(t){var e,n,i,o;return e=t.data,(o=this.inputSummary.textAdded)&&o!==e&&o.toUpperCase()===e?(n=this.getSelectedRange(),this.setSelectedRange([n[0],n[1]+o.length]),null!=(i=this.responder)&&i.insertString(e),this.setInputSummary({textAdded:e}),this.setSelectedRange(n)):void 0},dragenter:function(t){return t.preventDefault()},dragstart:function(t){var e;return t.target,this.serializeSelectionToDataTransfer(t.dataTransfer),this.draggedRange=this.getSelectedRange(),null!=(e=this.delegate)&&"function"==typeof e.inputControllerDidStartDrag?e.inputControllerDidStartDrag():void 0},dragover:function(t){var e,n;return!this.draggedRange&&!this.canAcceptDataTransfer(t.dataTransfer)||(t.preventDefault(),e={x:t.clientX,y:t.clientY},h(e,this.draggingPoint))?void 0:(this.draggingPoint=e,null!=(n=this.delegate)&&"function"==typeof n.inputControllerDidReceiveDragOverPoint?n.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.inputControllerDidCancelDrag&&t.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(t){var n,i,o,r,s,a,u,l,c;return t.preventDefault(),o=null!=(s=t.dataTransfer)?s.files:void 0,r={x:t.clientX,y:t.clientY},null!=(a=this.responder)&&a.setLocationRangeFromPointRange(r),(null!=o?o.length:void 0)?this.attachFiles(o):this.draggedRange?(null!=(u=this.delegate)&&u.inputControllerWillMoveText(),null!=(l=this.responder)&&l.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(i=t.dataTransfer.getData("application/x-trix-document"))&&(n=e.Document.fromJSONString(i),null!=(c=this.responder)&&c.insertDocument(n),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(t){var e,n;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&(this.serializeSelectionToDataTransfer(t.clipboardData)&&t.preventDefault(),null!=(n=this.delegate)&&n.inputControllerWillCutText(),this.deleteInDirection("backward"),t.defaultPrevented)?this.requestRender():void 0},copy:function(t){var e;return(null!=(e=this.responder)?e.selectionIsExpanded():void 0)&&this.serializeSelectionToDataTransfer(t.clipboardData)?t.preventDefault():void 0},paste:function(n){var o,r,s,a,u,l,c,h,p,f,m,y,_,b,w,x,A,E,C,T,S,L,k;return o=null!=(h=n.clipboardData)?h:n.testClipboardData,c={clipboard:o},null==o||d(n)?void this.getPastedHTMLUsingHiddenElement((k=this,function(t){var e,n,i;return c.type="text/html",c.html=t,null!=(e=k.delegate)&&e.inputControllerWillPaste(c),null!=(n=k.responder)&&n.insertHTML(c.html),k.requestRender(),null!=(i=k.delegate)?i.inputControllerDidPaste(c):void 0})):((a=o.getData("URL"))?(c.type="URL",c.href=a,c.string=(l=o.getData("public.url-name"))?e.squishBreakableWhitespace(l).trim():a,null!=(p=this.delegate)&&p.inputControllerWillPaste(c),this.setInputSummary({textAdded:c.string,didDelete:this.selectionIsExpanded()}),null!=(w=this.responder)&&w.insertText(e.Text.textForStringWithAttributes(c.string,{href:c.href})),this.requestRender(),null!=(x=this.delegate)&&x.inputControllerDidPaste(c)):t(o)?(c.type="text/plain",c.string=o.getData("text/plain"),null!=(A=this.delegate)&&A.inputControllerWillPaste(c),this.setInputSummary({textAdded:c.string,didDelete:this.selectionIsExpanded()}),null!=(E=this.responder)&&E.insertString(c.string),this.requestRender(),null!=(C=this.delegate)&&C.inputControllerDidPaste(c)):(u=o.getData("text/html"))?(c.type="text/html",c.html=u,null!=(T=this.delegate)&&T.inputControllerWillPaste(c),null!=(S=this.responder)&&S.insertHTML(c.html),this.requestRender(),null!=(L=this.delegate)&&L.inputControllerDidPaste(c)):v.call(o.types,"Files")>=0&&(s=null!=(f=o.items)&&null!=(m=f[0])&&"function"==typeof m.getAsFile?m.getAsFile():void 0)&&(!s.name&&(r=i(s))&&(s.name="pasted-file-"+ ++g+"."+r),c.type="File",c.file=s,null!=(y=this.delegate)&&y.inputControllerWillAttachFiles(),null!=(_=this.responder)&&_.insertFile(c.file),this.requestRender(),null!=(b=this.delegate)&&b.inputControllerDidPaste(c)),n.preventDefault())},compositionstart:function(t){return this.getCompositionInput().start(t.data)},compositionupdate:function(t){return this.getCompositionInput().update(t.data)},compositionend:function(t){return this.getCompositionInput().end(t.data)},input:function(t){return t.stopPropagation()}},f.prototype.keys={backspace:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},"delete":function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},"return":function(){var t,e;return this.setInputSummary({preferDocument:!0}),null!=(t=this.delegate)&&t.inputControllerWillPerformTyping(),null!=(e=this.responder)?e.insertLineBreak():void 0},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canIncreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.increaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("backward"):void 0):void 0},right:function(t){var e;return this.selectionIsInCursorTarget()?(t.preventDefault(),null!=(e=this.responder)?e.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("forward",t)},h:function(t){var e;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),this.deleteInDirection("backward",t)},o:function(t){var e,n;return t.preventDefault(),null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n",{updatePosition:!1}),this.requestRender()}},shift:{"return":function(t){var e,n;return null!=(e=this.delegate)&&e.inputControllerWillPerformTyping(),null!=(n=this.responder)&&n.insertString("\n"),this.requestRender(),t.preventDefault()},tab:function(t){var e,n;return(null!=(e=this.responder)?e.canDecreaseNestingLevel():void 0)?(null!=(n=this.responder)&&n.decreaseNestingLevel(),this.requestRender(),t.preventDefault()):void 0},left:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(t){return this.selectionIsInCursorTarget()?(t.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var t;return this.setInputSummary({preferDocument:!1}),null!=(t=this.delegate)?t.inputControllerWillPerformTyping():void 0}}},f.prototype.handleInput=function(t){var e,n;try{return null!=(e=this.delegate)&&e.inputControllerWillHandleInput(),t.call(this)}finally{null!=(n=this.delegate)&&n.inputControllerDidHandleInput()}},f.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new e.CompositionInput(this)},f.prototype.isComposing=function(){return null!=this.compositionInput&&!this.compositionInput.isEnded()},f.prototype.deleteInDirection=function(t,e){var n;return!1!==(null!=(n=this.responder)?n.deleteInDirection(t):void 0)?this.setInputSummary({didDelete:!0}):e?(e.preventDefault(),this.requestRender()):void 0},f.prototype.serializeSelectionToDataTransfer=function(t){var i,o;if(n(t))return i=null!=(o=this.responder)?o.getSelectedDocument().toSerializableDocument():void 0,t.setData("application/x-trix-document",JSON.stringify(i)),t.setData("text/html",e.DocumentView.render(i).innerHTML),t.setData("text/plain",i.toString().replace(/\n$/,"")),!0},f.prototype.canAcceptDataTransfer=function(t){var e,n,i,o,r;for(r={},e=0,n=(o=null!=(i=null!=t?t.types:void 0)?i:[]).length;n>e;e++)r[o[e]]=!0;return r.Files||r["application/x-trix-document"]||r["text/html"]||r["text/plain"]},f.prototype.getPastedHTMLUsingHiddenElement=function(t){var e,n,i,o;return n=this.getSelectedRange(),i={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},e=c({style:i,tagName:"div",editable:!0}),document.body.appendChild(e),e.focus(),requestAnimationFrame((o=this,function(){var i;return i=e.innerHTML,document.body.removeChild(e),o.setSelectedRange(n),t(i)}))},f.proxyMethod("responder?.getSelectedRange"),f.proxyMethod("responder?.setSelectedRange"),f.proxyMethod("responder?.expandSelectionInDirection"),f.proxyMethod("responder?.selectionIsInCursorTarget"),f.proxyMethod("responder?.selectionIsExpanded"),f}(e.BasicObject),i=function(t){var e,n;return null!=(e=t.type)&&null!=(n=e.match(/\/(\w+)$/))?n[1]:void 0},r=null!=("function"==typeof" ".codePointAt?" ".codePointAt(0):void 0),p=function(t){var n;return t.key&&r&&t.key.codePointAt(0)===t.keyCode?t.key:(null===t.which?n=t.keyCode:0!==t.which&&0!==t.charCode&&(n=t.charCode),null!=n?e.UTF16String.fromCodepoints([n]).toString():void 0)},l=function(t){return t.metaKey&&t.altKey&&!t.shiftKey&&94===t.keyCode},u=function(t){return t.metaKey&&t.altKey&&t.shiftKey&&9674===t.keyCode},a=function(t){return/Mac|^iP/.test(navigator.platform)?t.metaKey:t.ctrlKey},d=function(t){var e,n,i,o,r,s,a,u,l;if(a=t.clipboardData){if(v.call(a.types,"text/html")>=0){for(i=0,s=(u=a.types).length;s>i;i++)if(l=u[i],e=/^CorePasteboardFlavorType/.test(l),n=/^dyn\./.test(l)&&a.getData(l),e||n)return!0;return!1}return o=v.call(a.types,"com.apple.webarchive")>=0,r=v.call(a.types,"com.apple.flat-rtfd")>=0,o||r}},t=function(t){var e,n,i;return i=t.getData("text/plain"),n=t.getData("text/html"),i&&n?((e=c("div")).innerHTML=n,e.textContent===i?!e.querySelector(":not(meta)"):void 0):null!=i?i.length:void 0},f={"application/x-trix-feature-detection":"test"},n=function(t){var e,n;if(null!=(null!=t?t.setData:void 0)){for(e in f)if(n=f[e],!function(){try{return t.setData(e,n),t.getData(e)===n}catch(i){}}())return;return!0}}}.call(this),function(){var t,n,i,o,r,s,a,u=function(t,e){return function(){return t.apply(e,arguments)}},l=function(t,e){function n(){this.constructor=t}for(var i in e)c.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;n=e.handleEvent,r=e.makeElement,a=e.tagName,i=e.InputController.keyNames,s=e.config,o=s.lang,t=s.css,e.AttachmentEditorController=function(e){function s(t,e,n){this.attachmentPiece=t,this.element=e,this.container=n,this.didBlurCaption=u(this.didBlurCaption,this),this.didChangeCaption=u(this.didChangeCaption,this),this.didInputCaption=u(this.didInputCaption,this),this.didKeyDownCaption=u(this.didKeyDownCaption,this),this.didClickCaption=u(this.didClickCaption,this),this.didClickRemoveButton=u(this.didClickRemoveButton,this),this.attachment=this.attachmentPiece.attachment,"a"===a(this.element)&&(this.element=this.element.firstChild),this.install()}var c;return l(s,e),c=function(t){return function(){var e;return(e=t.apply(this,arguments))["do"](),null==this.undos&&(this.undos=[]),this.undos.push(e.undo)}},s.prototype.install=function(){return this.makeElementMutable(),this.attachment.isPreviewable()&&this.makeCaptionEditable(),this.addRemoveButton()},s.prototype.uninstall=function(){var t,e;for(this.savePendingCaption();e=this.undos.pop();)e();return null!=(t=this.delegate)?t.didUninstallAttachmentEditor(this):void 0},s.prototype.savePendingCaption=function(){var t,e,n;return null!=this.pendingCaption?(t=this.pendingCaption,this.pendingCaption=null,t?null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestUpdatingAttributesForAttachment?e.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:t},this.attachment):void 0:null!=(n=this.delegate)&&"function"==typeof n.attachmentEditorDidRequestRemovingAttributeForAttachment?n.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},s.prototype.makeElementMutable=c(function(){return{"do":(e=this,function(){return e.element.dataset.trixMutable=!0}),undo:(t=this,function(){return delete t.element.dataset.trixMutable})};var t,e}),s.prototype.makeCaptionEditable=c(function(){var t,e,i;return t=this.element.querySelector("figcaption"),e=null,{"do":(i=this,function(){return e=n("click",{onElement:t,withCallback:i.didClickCaption,inPhase:"capturing"})}),undo:function(){return e.destroy()}}}),s.prototype.addRemoveButton=c(function(){var e,i,s;return e=r({tagName:"button",textContent:o.remove,className:t.attachmentRemove+" "+t.attachmentRemove+"--icon",attributes:{type:"button",title:o.remove},data:{trixMutable:!0}}),n("click",{onElement:e,withCallback:this.didClickRemoveButton}),{"do":(s=this,function(){return s.element.appendChild(e)}),undo:(i=this,function(){return i.element.removeChild(e)})}}),s.prototype.editCaption=c(function(){var e,i,s,a,u;return(a=r({tagName:"textarea",className:t.attachmentCaptionEditor,attributes:{placeholder:o.captionPlaceholder}})).value=this.attachmentPiece.getCaption(),(u=a.cloneNode()).classList.add("trix-autoresize-clone"),e=function(){return u.value=a.value,a.style.height=u.scrollHeight+"px"},n("keydown",{onElement:a,withCallback:this.didKeyDownCaption}),n("input",{onElement:a,withCallback:this.didInputCaption}),n("change",{onElement:a,withCallback:this.didChangeCaption}),n("blur",{onElement:a,withCallback:this.didBlurCaption}),s=this.element.querySelector("figcaption"),i=s.cloneNode(),{"do":function(){return s.style.display="none",i.appendChild(a),i.appendChild(u),i.classList.add(t.attachmentCaption+"--editing"),s.parentElement.insertBefore(i,s),e(),a.focus()},undo:function(){return i.parentNode.removeChild(i),s.style.display=null}}}),s.prototype.didClickRemoveButton=function(t){var e;return t.preventDefault(),
t.stopPropagation(),null!=(e=this.delegate)?e.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0},s.prototype.didClickCaption=function(t){return t.preventDefault(),this.editCaption()},s.prototype.didKeyDownCaption=function(t){var e;return"return"===i[t.keyCode]?(t.preventDefault(),this.savePendingCaption(),null!=(e=this.delegate)&&"function"==typeof e.attachmentEditorDidRequestDeselectingAttachment?e.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},s.prototype.didInputCaption=function(t){return this.pendingCaption=t.target.value.replace(/\s/g," ").trim()},s.prototype.didChangeCaption=function(){return this.savePendingCaption()},s.prototype.didBlurCaption=function(){return this.savePendingCaption()},s}(e.BasicObject)}.call(this),function(){var t,n,i,o=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;i=e.makeElement,t=e.config.css,e.AttachmentView=function(r){function s(){s.__super__.constructor.apply(this,arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}var a;return o(s,r),s.attachmentSelector="[data-trix-attachment]",s.prototype.createContentNodes=function(){return[]},s.prototype.createNodes=function(){var e,n,o,r,s,u,l,c,h,d,p;if(r=i({tagName:"figure",className:this.getClassName()}),this.attachment.hasContent())r.innerHTML=this.attachment.getContent();else for(u=0,c=(d=this.createContentNodes()).length;c>u;u++)h=d[u],r.appendChild(h);for(l in r.appendChild(this.createCaptionElement()),n={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},(e=this.attachmentPiece.getAttributesForAttachment()).isEmpty()||(n.trixAttributes=JSON.stringify(e)),this.attachment.isPending()&&(this.progressElement=i({tagName:"progress",attributes:{"class":t.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),r.appendChild(this.progressElement),n.trixSerialize=!1),(s=this.getHref())?(o=i("a",{href:s,tabindex:-1})).appendChild(r):o=r,n)p=n[l],o.dataset[l]=p;return o.setAttribute("contenteditable",!1),[a("left"),o,a("right")]},s.prototype.createCaptionElement=function(){var e,n,o,r,s,a,u;return o=i({tagName:"figcaption",className:t.attachmentCaption}),(e=this.attachmentPiece.getCaption())?(o.classList.add(t.attachmentCaption+"--edited"),o.textContent=e):((n=this.getCaptionConfig()).name&&(r=this.attachment.getFilename()),n.size&&(a=this.attachment.getFormattedFilesize()),r&&(s=i({tagName:"span",className:t.attachmentName,textContent:r}),o.appendChild(s)),a&&(r&&o.appendChild(document.createTextNode(" ")),u=i({tagName:"span",className:t.attachmentSize,textContent:a}),o.appendChild(u))),o},s.prototype.getClassName=function(){var e,n;return n=[t.attachment,t.attachment+"--"+this.attachment.getType()],(e=this.attachment.getExtension())&&n.push(t.attachment+"--"+e),n.join(" ")},s.prototype.getHref=function(){return n(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},s.prototype.getCaptionConfig=function(){var t,n,i;return i=this.attachment.getType(),t=e.copyObject(null!=(n=e.config.attachments[i])?n.caption:void 0),"file"===i&&(t.name=!0),t},s.prototype.findProgressElement=function(){var t;return null!=(t=this.findElement())?t.querySelector("progress"):void 0},a=function(t){return i({tagName:"span",textContent:e.ZERO_WIDTH_SPACE,data:{trixCursorTarget:t,trixSerialize:!1}})},s.prototype.attachmentDidChangeUploadProgress=function(){var t,e;return e=this.attachment.getUploadProgress(),null!=(t=this.findProgressElement())?t.value=e:void 0},s}(e.ObjectView),n=function(t,e){var n;return(n=i("div")).innerHTML=null!=t?t:"",n.querySelector(e)}}.call(this),function(){var t,n=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=e.makeElement,e.PreviewableAttachmentView=function(i){function o(){o.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return n(o,i),o.prototype.createContentNodes=function(){return this.image=t({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},o.prototype.createCaptionElement=function(){var t;return(t=o.__super__.createCaptionElement.apply(this,arguments)).textContent||t.setAttribute("data-trix-placeholder",e.config.lang.captionPlaceholder),t},o.prototype.refresh=function(t){var e;return null==t&&(t=null!=(e=this.findElement())?e.querySelector("img"):void 0),t?this.updateAttributesForImage(t):void 0},o.prototype.updateAttributesForImage=function(t){var e,n,i,o,r,s;return r=this.attachment.getURL(),n=this.attachment.getPreviewURL(),t.src=n||r,n===r?t.removeAttribute("data-trix-serialized-attributes"):(i=JSON.stringify({src:r}),t.setAttribute("data-trix-serialized-attributes",i)),s=this.attachment.getWidth(),e=this.attachment.getHeight(),null!=s&&(t.width=s),null!=e&&(t.height=e),o=["imageElement",this.attachment.id,t.src,t.width,t.height].join("/"),t.dataset.trixStoreKey=o},o.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},o}(e.AttachmentView)}.call(this),function(){var t,n,i,o=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;i=e.makeElement,t=e.findInnerElement,n=e.getTextConfig,e.PieceView=function(r){function s(){var t;s.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),t=this.options,this.textConfig=t.textConfig,this.context=t.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var a;return o(s,r),s.prototype.createNodes=function(){var e,n,i,o,r,s;if(s=this.attachment?this.createAttachmentNodes():this.createStringNodes(),e=this.createElement()){for(i=t(e),n=0,o=s.length;o>n;n++)r=s[n],i.appendChild(r);s=[e]}return s},s.prototype.createAttachmentNodes=function(){var t;return t=this.attachment.isPreviewable()?e.PreviewableAttachmentView:e.AttachmentView,this.createChildView(t,this.piece.attachment,{piece:this.piece}).getNodes()},s.prototype.createStringNodes=function(){var t,e,n,o,r,s,a,u,l;if(null!=(a=this.textConfig)?a.plaintext:void 0)return[document.createTextNode(this.string)];for(s=[],n=e=0,o=(u=this.string.split("\n")).length;o>e;n=++e)l=u[n],n>0&&(t=i("br"),s.push(t)),l.length&&(r=document.createTextNode(this.preserveSpaces(l)),s.push(r));return s},s.prototype.createElement=function(){var t,e,o,r,s,a,u,l,c;for(r in l={},a=this.attributes)if(c=a[r],(t=n(r))&&(t.tagName&&(s=i(t.tagName),o?(o.appendChild(s),o=s):e=o=s),t.styleProperty&&(l[t.styleProperty]=c),t.style))for(r in u=t.style)c=u[r],l[r]=c;if(Object.keys(l).length)for(r in null==e&&(e=i("span")),l)c=l[r],e.style[r]=c;return e},s.prototype.createContainerElement=function(){var t,e,o,r,s;for(o in r=this.attributes)if(s=r[o],(e=n(o))&&e.groupTagName)return(t={})[o]=s,i(e.groupTagName,t)},a=e.NON_BREAKING_SPACE,s.prototype.preserveSpaces=function(t){return this.context.isLast&&(t=t.replace(/\ $/,a)),t=t.replace(/(\S)\ {3}(\S)/g,"$1 "+a+" $2").replace(/\ {2}/g,a+" ").replace(/\ {2}/g," "+a),(this.context.isFirst||this.context.followsWhitespace)&&(t=t.replace(/^\ /,a)),t},s}(e.ObjectView)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.TextView=function(n){function i(){i.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var o;return t(i,n),i.prototype.createNodes=function(){var t,n,i,r,s,a,u,l,c,h;for(a=[],r=(l=e.ObjectGroup.groupObjects(this.getPieces())).length-1,i=n=0,s=l.length;s>n;i=++n)u=l[i],t={},0===i&&(t.isFirst=!0),i===r&&(t.isLast=!0),o(c)&&(t.followsWhitespace=!0),h=this.findOrCreateCachedChildView(e.PieceView,u,{textConfig:this.textConfig,context:t}),a.push.apply(a,h.getNodes()),c=u;return a},i.prototype.getPieces=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.text.getPieces()).length;e>t;t++)(n=i[t]).hasAttribute("blockBreak")||o.push(n);return o},o=function(t){return/\s$/.test(null!=t?t.toString():void 0)},i}(e.ObjectView)}.call(this),function(){var t,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;n=e.makeElement,t=e.getBlockConfig,e.BlockView=function(o){function r(){r.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return i(r,o),r.prototype.createNodes=function(){var i,o,r,s,a,u,l,c;if(a=[document.createComment("block")],this.block.isEmpty()?a.push(n("br")):(l=null!=(u=t(this.block.getLastAttribute()))?u.text:void 0,c=this.findOrCreateCachedChildView(e.TextView,this.block.text,{textConfig:l}),a.push.apply(a,c.getNodes()),this.shouldAddExtraNewlineElement()&&a.push(n("br"))),this.attributes.length)return a;for(i=n(e.config.blockAttributes["default"].tagName),o=0,r=a.length;r>o;o++)s=a[o],i.appendChild(s);return[i]},r.prototype.createContainerElement=function(e){var i,o;return i=this.attributes[e],o=t(i),n(o.tagName)},r.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},r}(e.ObjectView)}.call(this),function(){var t,n,i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty;t=e.defer,n=e.makeElement,e.DocumentView=function(o){function r(){r.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new e.ElementStore,this.setDocument(this.object)}var s,a,u;return i(r,o),r.render=function(t){var e,i;return(i=new this(t,{element:e=n("div")})).render(),i.sync(),e},r.prototype.setDocument=function(t){return t.isEqualTo(this.document)?void 0:this.document=this.object=t},r.prototype.render=function(){var t,i,o,r,s,a,u;if(this.childViews=[],this.shadowElement=n("div"),!this.document.isEmpty()){for(a=[],t=0,i=(s=e.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0})).length;i>t;t++)r=s[t],u=this.findOrCreateCachedChildView(e.BlockView,r),a.push(function(){var t,e,n,i;for(i=[],t=0,e=(n=u.getNodes()).length;e>t;t++)o=n[t],i.push(this.shadowElement.appendChild(o));return i}.call(this));return a}},r.prototype.isSynced=function(){return s(this.shadowElement,this.element)},r.prototype.sync=function(){var t;for(t=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(t),this.didSync()},r.prototype.didSync=function(){return this.elementStore.reset(a(this.element)),t((e=this,function(){return e.garbageCollectCachedViews()}));var e},r.prototype.createDocumentFragmentForSync=function(){var t,e,n,i,o,r,s,u,l,c;for(e=document.createDocumentFragment(),n=0,o=(u=this.shadowElement.childNodes).length;o>n;n++)s=u[n],e.appendChild(s.cloneNode(!0));for(i=0,r=(l=a(e)).length;r>i;i++)t=l[i],(c=this.elementStore.remove(t))&&t.parentNode.replaceChild(c,t);return e},a=function(t){return t.querySelectorAll("[data-trix-store-key]")},s=function(t,e){return u(t.innerHTML)===u(e.innerHTML)},u=function(t){return t.replace(/&nbsp;/g," ")},r}(e.ObjectView)}.call(this),function(){var t,n,i,o,r=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function n(){this.constructor=t}for(var i in e)a.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=e.handleEvent,o=e.innerElementIsActive,n=e.defer,t=e.AttachmentView.attachmentSelector,e.CompositionController=function(a){function u(n,o){this.element=n,this.composition=o,this.didClickAttachment=r(this.didClickAttachment,this),this.didBlur=r(this.didBlur,this),this.didFocus=r(this.didFocus,this),this.documentView=new e.DocumentView(this.composition.document,{element:this.element}),i("focus",{onElement:this.element,withCallback:this.didFocus}),i("blur",{onElement:this.element,withCallback:this.didBlur}),i("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),i("mousedown",{onElement:this.element,matchingSelector:t,withCallback:this.didClickAttachment}),i("click",{onElement:this.element,matchingSelector:"a"+t,preventDefault:!0})}return s(u,a),u.prototype.didFocus=function(){var t,e,n,i;return i=this,t=function(){var t;return i.focused?void 0:(i.focused=!0,null!=(t=i.delegate)&&"function"==typeof t.compositionControllerDidFocus?t.compositionControllerDidFocus():void 0)},null!=(e=null!=(n=this.blurPromise)?n.then(t):void 0)?e:t()},u.prototype.didBlur=function(){return this.blurPromise=new Promise((t=this,function(e){return n(function(){var n;return o(t.element)||(t.focused=null,null!=(n=t.delegate)&&"function"==typeof n.compositionControllerDidBlur&&n.compositionControllerDidBlur()),t.blurPromise=null,e()})}));var t},u.prototype.didClickAttachment=function(t,e){var n,i;return n=this.findAttachmentForElement(e),null!=(i=this.delegate)&&"function"==typeof i.compositionControllerDidSelectAttachment?i.compositionControllerDidSelectAttachment(n):void 0},u.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},u.prototype.render=function(){var t,e,n;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&(null!=(t=this.delegate)&&"function"==typeof t.compositionControllerWillSyncDocumentView&&t.compositionControllerWillSyncDocumentView(),this.documentView.sync(),null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidSyncDocumentView&&e.compositionControllerDidSyncDocumentView()),null!=(n=this.delegate)&&"function"==typeof n.compositionControllerDidRender?n.compositionControllerDidRender():void 0},u.prototype.rerenderViewForObject=function(t){return this.invalidateViewForObject(t),this.render()},u.prototype.invalidateViewForObject=function(t){return this.documentView.invalidateViewForObject(t)},u.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},u.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},u.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},u.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},u.prototype.isEditingAttachment=function(){return null!=this.attachmentEditor},u.prototype.installAttachmentEditorForAttachment=function(t){var n,i,o;if((null!=(o=this.attachmentEditor)?o.attachment:void 0)!==t&&(i=this.documentView.findElementForObject(t)))return this.uninstallAttachmentEditor(),n=this.composition.document.getAttachmentPieceForAttachment(t),this.attachmentEditor=new e.AttachmentEditorController(n,i,this.element),this.attachmentEditor.delegate=this},u.prototype.uninstallAttachmentEditor=function(){var t;return null!=(t=this.attachmentEditor)?t.uninstall():void 0},u.prototype.editAttachmentCaption=function(){var t;return null!=(t=this.attachmentEditor)?t.editCaption():void 0},u.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},u.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.updateAttributesForAttachment(t,e)},u.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(t,e){var n;return null!=(n=this.delegate)&&"function"==typeof n.compositionControllerWillUpdateAttachment&&n.compositionControllerWillUpdateAttachment(e),this.composition.removeAttributeForAttachment(t,e)},u.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestRemovalOfAttachment?e.compositionControllerDidRequestRemovalOfAttachment(t):void 0},u.prototype.attachmentEditorDidRequestDeselectingAttachment=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionControllerDidRequestDeselectingAttachment?e.compositionControllerDidRequestDeselectingAttachment(t):void 0},u.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},u.prototype.findAttachmentForElement=function(t){return this.composition.document.getAttachmentById(parseInt(t.dataset.trixId,10))},u}(e.BasicObject)}.call(this),function(){var t,n,i,o=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;n=e.handleEvent,i=e.triggerEvent,t=e.findClosestElementFromNode,e.ToolbarController=function(e){function s(t){this.element=t,this.didKeyDownDialogInput=o(this.didKeyDownDialogInput,this),this.didClickDialogButton=o(this.didClickDialogButton,this),this.didClickAttributeButton=o(this.didClickAttributeButton,this),this.didClickActionButton=o(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),n("mousedown",{onElement:this.element,matchingSelector:a,withCallback:this.didClickActionButton}),n("mousedown",{onElement:this.element,matchingSelector:l,withCallback:this.didClickAttributeButton}),n("click",{onElement:this.element,matchingSelector:v,preventDefault:!0}),n("click",{onElement:this.element,matchingSelector:c,withCallback:this.didClickDialogButton}),n("keydown",{onElement:this.element,matchingSelector:h,withCallback:this.didKeyDownDialogInput})}var a,u,l,c,h,d,p,f,m,g,v;return r(s,e),v=(l="[data-trix-attribute]")+", "+(a="[data-trix-action]"),u=(d="[data-trix-dialog]")+"[data-trix-active]",c=d+" [data-trix-method]",h=d+" [data-trix-input]",s.prototype.didClickActionButton=function(t,e){var n,i,o;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=p(e),this.getDialog(n)?this.toggleDialog(n):null!=(o=this.delegate)?o.toolbarDidInvokeAction(n):void 0},s.prototype.didClickAttributeButton=function(t,e){var n,i,o;return null!=(i=this.delegate)&&i.toolbarDidClickButton(),t.preventDefault(),n=f(e),this.getDialog(n)?this.toggleDialog(n):null!=(o=this.delegate)&&o.toolbarDidToggleAttribute(n),this.refreshAttributeButtons()},s.prototype.didClickDialogButton=function(e,n){var i;return i=t(n,{matchingSelector:d}),this[n.getAttribute("data-trix-method")].call(this,i)},s.prototype.didKeyDownDialogInput=function(t,e){var n,i;return 13===t.keyCode&&(t.preventDefault(),n=e.getAttribute("name"),i=this.getDialog(n),this.setAttribute(i)),27===t.keyCode?(t.preventDefault(),this.hideDialog()):void 0},s.prototype.updateActions=function(t){return this.actions=t,this.refreshActionButtons()},s.prototype.refreshActionButtons=function(){return this.eachActionButton((t=this,function(e,n){return e.disabled=!1===t.actions[n]}));var t},s.prototype.eachActionButton=function(t){var e,n,i,o,r;for(r=[],n=0,i=(o=this.element.querySelectorAll(a)).length;i>n;n++)e=o[n],r.push(t(e,p(e)));return r},s.prototype.updateAttributes=function(t){return this.attributes=t,this.refreshAttributeButtons()},s.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton((t=this,function(e,n){return e.disabled=!1===t.attributes[n],t.attributes[n]||t.dialogIsVisible(n)?(e.setAttribute("data-trix-active",""),e.classList.add("trix-active")):(e.removeAttribute("data-trix-active"),e.classList.remove("trix-active"))}));var t},s.prototype.eachAttributeButton=function(t){var e,n,i,o,r;for(r=[],n=0,i=(o=this.element.querySelectorAll(l)).length;i>n;n++)e=o[n],r.push(t(e,f(e)));return r},s.prototype.applyKeyboardCommand=function(t){var e,n,o,r,s,a;for(r=JSON.stringify(t.sort()),o=0,s=(a=this.element.querySelectorAll("[data-trix-key]")).length;s>o;o++)if(n=(e=a[o]).getAttribute("data-trix-key").split("+"),JSON.stringify(n.sort())===r)return i("mousedown",{onElement:e}),!0;return!1},s.prototype.dialogIsVisible=function(t){var e;return(e=this.getDialog(t))?e.hasAttribute("data-trix-active"):void 0},s.prototype.toggleDialog=function(t){return this.dialogIsVisible(t)?this.hideDialog():this.showDialog(t)},s.prototype.showDialog=function(t){var e,n,i,o,r,s,a,u,l;for(this.hideDialog(),null!=(s=this.delegate)&&s.toolbarWillShowDialog(),(n=this.getDialog(t)).setAttribute("data-trix-active",""),n.classList.add("trix-active"),i=0,r=(a=n.querySelectorAll("input[disabled]")).length;r>i;i++)a[i].removeAttribute("disabled");return(e=f(n))&&(o=g(n,t))&&(o.value=null!=(u=this.attributes[e])?u:"",o.select()),null!=(l=this.delegate)?l.toolbarDidShowDialog(t):void 0},s.prototype.setAttribute=function(t){var e,n,i;return e=f(t),(n=g(t,e)).willValidate&&!n.checkValidity()?(n.setAttribute("data-trix-validate",""),n.classList.add("trix-validate"),n.focus()):(null!=(i=this.delegate)&&i.toolbarDidUpdateAttribute(e,n.value),this.hideDialog())},s.prototype.removeAttribute=function(t){var e,n;return e=f(t),null!=(n=this.delegate)&&n.toolbarDidRemoveAttribute(e),this.hideDialog()},s.prototype.hideDialog=function(){var t,e;return(t=this.element.querySelector(u))?(t.removeAttribute("data-trix-active"),t.classList.remove("trix-active"),this.resetDialogInputs(),null!=(e=this.delegate)?e.toolbarDidHideDialog(m(t)):void 0):void 0},s.prototype.resetDialogInputs=function(){var t,e,n,i,o;for(o=[],t=0,n=(i=this.element.querySelectorAll(h)).length;n>t;t++)(e=i[t]).setAttribute("disabled","disabled"),e.removeAttribute("data-trix-validate"),o.push(e.classList.remove("trix-validate"));return o},s.prototype.getDialog=function(t){return this.element.querySelector("[data-trix-dialog="+t+"]")},g=function(t,e){return null==e&&(e=f(t)),t.querySelector("[data-trix-input][name='"+e+"']")},p=function(t){return t.getAttribute("data-trix-action")},f=function(t){var e;return null!=(e=t.getAttribute("data-trix-attribute"))?e:t.getAttribute("data-trix-dialog-attribute")},m=function(t){return t.getAttribute("data-trix-dialog")},s}(e.BasicObject)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.ImagePreloadOperation=function(e){function n(t){this.url=t}return t(n,e),n.prototype.perform=function(t){var e,n;return(e=new Image).onload=(n=this,function(){return e.width=n.width=e.naturalWidth,e.height=n.height=e.naturalHeight,t(!0,e)}),e.onerror=function(){return t(!1)},e.src=this.url},n}(e.Operation)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},n=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;e.Attachment=function(i){function o(n){null==n&&(n={}),this.releaseFile=t(this.releaseFile,this),o.__super__.constructor.apply(this,arguments),this.attributes=e.Hash.box(n),this.didChangeAttributes()}return n(o,i),o.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,o.attachmentForFile=function(t){var e;return(e=new this(this.attributesForFile(t))).setFile(t),e},o.attributesForFile=function(t){return new e.Hash({filename:t.name,filesize:t.size,contentType:t.type})},o.fromJSON=function(t){return new this(t)},o.prototype.getAttribute=function(t){return this.attributes.get(t)},o.prototype.hasAttribute=function(t){return this.attributes.has(t)},o.prototype.getAttributes=function(){return this.attributes.toObject()},o.prototype.setAttributes=function(t){var e,n,i;return null==t&&(t={}),e=this.attributes.merge(t),this.attributes.isEqualTo(e)?void 0:(this.attributes=e,this.didChangeAttributes(),null!=(n=this.previewDelegate)&&"function"==typeof n.attachmentDidChangeAttributes&&n.attachmentDidChangeAttributes(this),null!=(i=this.delegate)&&"function"==typeof i.attachmentDidChangeAttributes?i.attachmentDidChangeAttributes(this):void 0)},o.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},o.prototype.isPending=function(){return null!=this.file&&!(this.getURL()||this.getHref())},o.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},o.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},o.prototype.getURL=function(){return this.attributes.get("url")},o.prototype.getHref=function(){return this.attributes.get("href")},o.prototype.getFilename=function(){var t;return null!=(t=this.attributes.get("filename"))?t:""},o.prototype.getFilesize=function(){return this.attributes.get("filesize")},o.prototype.getFormattedFilesize=function(){var t;return"number"==typeof(t=this.attributes.get("filesize"))?e.config.fileSize.formatter(t):""},o.prototype.getExtension=function(){var t;return null!=(t=this.getFilename().match(/\.(\w+)$/))?t[1].toLowerCase():void 0},o.prototype.getContentType=function(){return this.attributes.get("contentType")},o.prototype.hasContent=function(){return this.attributes.has("content")},o.prototype.getContent=function(){return this.attributes.get("content")},o.prototype.getWidth=function(){return this.attributes.get("width")},o.prototype.getHeight=function(){return this.attributes.get("height")},o.prototype.getFile=function(){return this.file},o.prototype.setFile=function(t){return this.file=t,this.isPreviewable()?this.preloadFile():void 0},o.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},o.prototype.getUploadProgress=function(){var t;return null!=(t=this.uploadProgress)?t:0},o.prototype.setUploadProgress=function(t){var e;return this.uploadProgress!==t?(this.uploadProgress=t,null!=(e=this.uploadProgressDelegate)&&"function"==typeof e.attachmentDidChangeUploadProgress?e.attachmentDidChangeUploadProgress(this):void 0):void 0},o.prototype.toJSON=function(){return this.getAttributes()},o.prototype.getCacheKey=function(){return[o.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},o.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},o.prototype.setPreviewURL=function(t){var e,n;return t!==this.getPreviewURL()?(this.previewURL=t,null!=(e=this.previewDelegate)&&"function"==typeof e.attachmentDidChangeAttributes&&e.attachmentDidChangeAttributes(this),null!=(n=this.delegate)&&"function"==typeof n.attachmentDidChangePreviewURL?n.attachmentDidChangePreviewURL(this):void 0):void 0},o.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},o.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},o.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},o.prototype.preload=function(t,n){var i;return t&&t!==this.getPreviewURL()?(this.preloadingURL=t,new e.ImagePreloadOperation(t).then((i=this,function(e){var o,r;return r=e.width,o=e.height,i.setAttributes({width:r,height:o}),i.preloadingURL=null,i.setPreviewURL(t),"function"==typeof n?n():void 0}))):void 0},o}(e.Object)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Piece=function(n){function i(t,n){null==n&&(n={}),i.__super__.constructor.apply(this,arguments),this.attributes=e.Hash.box(n)}return t(i,n),i.types={},i.registerType=function(t,e){return e.type=t,this.types[t]=e},i.fromJSON=function(t){var e;return(e=this.types[t.type])?e.fromJSON(t):void 0},i.prototype.copyWithAttributes=function(t){return new this.constructor(this.getValue(),t)},i.prototype.copyWithAdditionalAttributes=function(t){return this.copyWithAttributes(this.attributes.merge(t))},i.prototype.copyWithoutAttribute=function(t){return this.copyWithAttributes(this.attributes.remove(t))},i.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},i.prototype.getAttribute=function(t){return this.attributes.get(t)},i.prototype.getAttributesHash=function(){return this.attributes},i.prototype.getAttributes=function(){return this.attributes.toObject()},i.prototype.getCommonAttributes=function(){var t,e,n;return(n=pieceList.getPieceAtIndex(0))?(t=n.attributes,e=t.getKeys(),pieceList.eachPiece(function(n){return e=t.getKeysCommonToHash(n.attributes),t=t.slice(e)}),t.toObject()):{}},i.prototype.hasAttribute=function(t){return this.attributes.has(t)},i.prototype.hasSameStringValueAsPiece=function(t){return null!=t&&this.toString()===t.toString()},i.prototype.hasSameAttributesAsPiece=function(t){return null!=t&&(this.attributes===t.attributes||this.attributes.isEqualTo(t.attributes))},i.prototype.isBlockBreak=function(){return!1},i.prototype.isEqualTo=function(t){return i.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(t)&&this.hasSameStringValueAsPiece(t)&&this.hasSameAttributesAsPiece(t)},i.prototype.isEmpty=function(){return 0===this.length},i.prototype.isSerializable=function(){return!0},i.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},i.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},i.prototype.canBeGrouped=function(){return this.hasAttribute("href")},i.prototype.canBeGroupedWith=function(t){return this.getAttribute("href")===t.getAttribute("href")},i.prototype.getLength=function(){return this.length},i.prototype.canBeConsolidatedWith=function(){return!1},i}(e.Object)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Piece.registerType("attachment",e.AttachmentPiece=function(n){function i(t){this.attachment=t,i.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href")}return t(i,n),i.fromJSON=function(t){return new this(e.Attachment.fromJSON(t.attachment),t.attributes)},i.prototype.ensureAttachmentExclusivelyHasAttribute=function(t){return this.hasAttribute(t)&&this.attachment.hasAttribute(t)?this.attributes=this.attributes.remove(t):void 0},i.prototype.getValue=function(){return this.attachment},i.prototype.isSerializable=function(){return!this.attachment.isPending()},i.prototype.getCaption=function(){var t;return null!=(t=this.attributes.get("caption"))?t:""},i.prototype.getAttributesForAttachment=function(){return this.attributes.slice(["caption"])},i.prototype.canBeGrouped=function(){return i.__super__.canBeGrouped.apply(this,arguments)&&!this.attachment.hasAttribute("href")},i.prototype.isEqualTo=function(t){var e;return i.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(null!=t&&null!=(e=t.attachment)?e.id:void 0)},i.prototype.toString=function(){return e.OBJECT_REPLACEMENT_CHARACTER},i.prototype.toJSON=function(){var t;return(t=i.__super__.toJSON.apply(this,arguments)).attachment=this.attachment,t},i.prototype.getCacheKey=function(){return[i.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},i.prototype.toConsole=function(){return JSON.stringify(this.toString())},i}(e.Piece))}.call(this),function(){var t,n=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t=e.normalizeNewlines,e.Piece.registerType("string",e.StringPiece=function(e){function i(e){i.__super__.constructor.apply(this,arguments),this.string=t(e),this.length=this.string.length}return n(i,e),i.fromJSON=function(t){return new this(t.string,t.attributes)},i.prototype.getValue=function(){return this.string},i.prototype.toString=function(){return this.string.toString()},
i.prototype.isBlockBreak=function(){return"\n"===this.toString()&&!0===this.getAttribute("blockBreak")},i.prototype.toJSON=function(){var t;return(t=i.__super__.toJSON.apply(this,arguments)).string=this.string,t},i.prototype.canBeConsolidatedWith=function(t){return null!=t&&this.hasSameConstructorAs(t)&&this.hasSameAttributesAsPiece(t)},i.prototype.consolidateWith=function(t){return new this.constructor(this.toString()+t.toString(),this.attributes)},i.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.length?(e=this,n=null):(e=new this.constructor(this.string.slice(0,t),this.attributes),n=new this.constructor(this.string.slice(t),this.attributes)),[e,n]},i.prototype.toConsole=function(){var t;return(t=this.string).length>15&&(t=t.slice(0,14)+"\u2026"),JSON.stringify(t.toString())},i}(e.Piece))}.call(this),function(){var t,n=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice;t=e.spliceArray,e.SplittableList=function(e){function i(t){null==t&&(t=[]),i.__super__.constructor.apply(this,arguments),this.objects=t.slice(0),this.length=this.objects.length}var r,s,a;return n(i,e),i.box=function(t){return t instanceof this?t:new this(t)},i.prototype.indexOf=function(t){return this.objects.indexOf(t)},i.prototype.splice=function(){var e;return e=1<=arguments.length?o.call(arguments,0):[],new this.constructor(t.apply(null,[this.objects].concat(o.call(e))))},i.prototype.eachObject=function(t){var e,n,i,o,r,s;for(s=[],n=e=0,i=(r=this.objects).length;i>e;n=++e)o=r[n],s.push(t(o,n));return s},i.prototype.insertObjectAtIndex=function(t,e){return this.splice(e,0,t)},i.prototype.insertSplittableListAtIndex=function(t,e){return this.splice.apply(this,[e,0].concat(o.call(t.objects)))},i.prototype.insertSplittableListAtPosition=function(t,e){var n,i,o;return i=(o=this.splitObjectAtPosition(e))[0],n=o[1],new this.constructor(i).insertSplittableListAtIndex(t,n)},i.prototype.editObjectAtIndex=function(t,e){return this.replaceObjectAtIndex(e(this.objects[t]),t)},i.prototype.replaceObjectAtIndex=function(t,e){return this.splice(e,1,t)},i.prototype.removeObjectAtIndex=function(t){return this.splice(t,1)},i.prototype.getObjectAtIndex=function(t){return this.objects[t]},i.prototype.getSplittableListInRange=function(t){var e,n,i,o;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],o=i[2],new this.constructor(n.slice(e,o+1))},i.prototype.selectSplittableList=function(t){var e,n;return n=function(){var n,i,o,r;for(r=[],n=0,i=(o=this.objects).length;i>n;n++)e=o[n],t(e)&&r.push(e);return r}.call(this),new this.constructor(n)},i.prototype.removeObjectsInRange=function(t){var e,n,i,o;return n=(i=this.splitObjectsAtRange(t))[0],e=i[1],o=i[2],new this.constructor(n).splice(e,o-e+1)},i.prototype.transformObjectsInRange=function(t,e){var n,i,o,r,s,a,u;return s=this.splitObjectsAtRange(t),r=s[0],i=s[1],a=s[2],u=function(){var t,s,u;for(u=[],n=t=0,s=r.length;s>t;n=++t)o=r[n],u.push(n>=i&&a>=n?e(o):o);return u}(),new this.constructor(u)},i.prototype.splitObjectsAtRange=function(t){var e,n,i,o,s;return n=(o=this.splitObjectAtPosition(a(t)))[0],e=o[1],i=o[2],[n=(s=new this.constructor(n).splitObjectAtPosition(r(t)+i))[0],e,s[1]-1]},i.prototype.getObjectAtPosition=function(t){var e,n;return e=(n=this.findIndexAndOffsetAtPosition(t)).index,n.offset,this.objects[e]},i.prototype.splitObjectAtPosition=function(t){var e,n,i,o,r,s,a,u,l;return e=(r=this.findIndexAndOffsetAtPosition(t)).index,o=r.offset,i=this.objects.slice(0),null!=e?0===o?(u=e,l=0):(n=(s=this.getObjectAtIndex(e).splitAtOffset(o))[0],a=s[1],i.splice(e,1,n,a),u=e+1,l=n.getLength()-o):(u=i.length,l=0),[i,u,l]},i.prototype.consolidate=function(){var t,e,n,i,o,r;for(i=[],o=this.objects[0],t=0,e=(r=this.objects.slice(1)).length;e>t;t++)n=r[t],("function"==typeof o.canBeConsolidatedWith?o.canBeConsolidatedWith(n):void 0)?o=o.consolidateWith(n):(i.push(o),o=n);return null!=o&&i.push(o),new this.constructor(i)},i.prototype.consolidateFromIndexToIndex=function(t,e){var n,i;return i=this.objects.slice(0).slice(t,e+1),n=new this.constructor(i).consolidate().toArray(),this.splice.apply(this,[t,i.length].concat(o.call(n)))},i.prototype.findIndexAndOffsetAtPosition=function(t){var e,n,i,o,r,s;for(e=0,i=n=0,o=(s=this.objects).length;o>n;i=++n){if(r=e+s[i].getLength(),t>=e&&r>t)return{index:i,offset:t-e};e=r}return{index:null,offset:null}},i.prototype.findPositionAtIndexAndOffset=function(t,e){var n,i,o,r,s,a;for(s=0,n=i=0,o=(a=this.objects).length;o>i;n=++i)if(r=a[n],t>n)s+=r.getLength();else if(n===t){s+=e;break}return s},i.prototype.getEndPosition=function(){var t,e;return null!=this.endPosition?this.endPosition:this.endPosition=function(){var n,i,o;for(e=0,n=0,i=(o=this.objects).length;i>n;n++)t=o[n],e+=t.getLength();return e}.call(this)},i.prototype.toString=function(){return this.objects.join("")},i.prototype.toArray=function(){return this.objects.slice(0)},i.prototype.toJSON=function(){return this.toArray()},i.prototype.isEqualTo=function(t){return i.__super__.isEqualTo.apply(this,arguments)||s(this.objects,null!=t?t.objects:void 0)},s=function(t,e){var n,i,o,r,s;if(null==e&&(e=[]),t.length!==e.length)return!1;for(s=!0,i=n=0,o=t.length;o>n;i=++n)r=t[i],s&&!r.isEqualTo(e[i])&&(s=!1);return s},i.prototype.contentsForInspection=function(){var t;return{objects:"["+function(){var e,n,i,o;for(o=[],e=0,n=(i=this.objects).length;n>e;e++)t=i[e],o.push(t.inspect());return o}.call(this).join(", ")+"]"}},a=function(t){return t[0]},r=function(t){return t[1]},i}(e.Object)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.Text=function(n){function i(t){var n;null==t&&(t=[]),i.__super__.constructor.apply(this,arguments),this.pieceList=new e.SplittableList(function(){var e,i,o;for(o=[],e=0,i=t.length;i>e;e++)(n=t[e]).isEmpty()||o.push(n);return o}())}return t(i,n),i.textForAttachmentWithAttributes=function(t,n){return new this([new e.AttachmentPiece(t,n)])},i.textForStringWithAttributes=function(t,n){return new this([new e.StringPiece(t,n)])},i.fromJSON=function(t){var n;return new this(function(){var i,o,r;for(r=[],i=0,o=t.length;o>i;i++)n=t[i],r.push(e.Piece.fromJSON(n));return r}())},i.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},i.prototype.copyWithPieceList=function(t){return new this.constructor(t.consolidate().toArray())},i.prototype.copyUsingObjectMap=function(t){var e,n;return n=function(){var n,i,o,r,s;for(s=[],n=0,i=(o=this.getPieces()).length;i>n;n++)e=o[n],s.push(null!=(r=t.find(e))?r:e);return s}.call(this),new this.constructor(n)},i.prototype.appendText=function(t){return this.insertTextAtPosition(t,this.getLength())},i.prototype.insertTextAtPosition=function(t,e){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t.pieceList,e))},i.prototype.removeTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t))},i.prototype.replaceTextAtRange=function(t,e){return this.removeTextAtRange(e).insertTextAtPosition(t,e[0])},i.prototype.moveTextFromRangeToPosition=function(t,e){var n,i;if(!(t[0]<=e&&e<=t[1]))return n=(i=this.getTextAtRange(t)).getLength(),t[0]<e&&(e-=n),this.removeTextAtRange(t).insertTextAtPosition(i,e)},i.prototype.addAttributeAtRange=function(t,e,n){var i;return(i={})[t]=e,this.addAttributesAtRange(i,n)},i.prototype.addAttributesAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,function(e){return e.copyWithAdditionalAttributes(t)}))},i.prototype.removeAttributeAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,function(e){return e.copyWithoutAttribute(t)}))},i.prototype.setAttributesAtRange=function(t,e){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e,function(e){return e.copyWithAttributes(t)}))},i.prototype.getAttributesAtPosition=function(t){var e,n;return null!=(e=null!=(n=this.pieceList.getObjectAtPosition(t))?n.getAttributes():void 0)?e:{}},i.prototype.getCommonAttributes=function(){var t,n;return t=function(){var t,e,i,o;for(o=[],t=0,e=(i=this.pieceList.toArray()).length;e>t;t++)n=i[t],o.push(n.getAttributes());return o}.call(this),e.Hash.fromCommonAttributesOfObjects(t).toObject()},i.prototype.getCommonAttributesAtRange=function(t){var e;return null!=(e=this.getTextAtRange(t).getCommonAttributes())?e:{}},i.prototype.getExpandedRangeForAttributeAtOffset=function(t,e){var n,i,o;for(n=o=e,i=this.getLength();n>0&&this.getCommonAttributesAtRange([n-1,o])[t];)n--;for(;i>o&&this.getCommonAttributesAtRange([e,o+1])[t];)o++;return[n,o]},i.prototype.getTextAtRange=function(t){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t))},i.prototype.getStringAtRange=function(t){return this.pieceList.getSplittableListInRange(t).toString()},i.prototype.getStringAtPosition=function(t){return this.getStringAtRange([t,t+1])},i.prototype.startsWithString=function(t){return this.getStringAtRange([0,t.length])===t},i.prototype.endsWithString=function(t){var e;return e=this.getLength(),this.getStringAtRange([e-t.length,e])===t},i.prototype.getAttachmentPieces=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.pieceList.toArray()).length;e>t;t++)null!=(n=i[t]).attachment&&o.push(n);return o},i.prototype.getAttachments=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],o.push(n.attachment);return o},i.prototype.getAttachmentAndPositionById=function(t){var e,n,i,o,r,s;for(o=0,e=0,n=(r=this.pieceList.toArray()).length;n>e;e++){if((null!=(s=(i=r[e]).attachment)?s.id:void 0)===t)return{attachment:i.attachment,position:o};o+=i.length}return{attachment:null,position:null}},i.prototype.getAttachmentById=function(t){var e,n;return e=(n=this.getAttachmentAndPositionById(t)).attachment,n.position,e},i.prototype.getRangeOfAttachment=function(t){var e,n;return t=(n=this.getAttachmentAndPositionById(t.id)).attachment,e=n.position,null!=t?[e,e+1]:void 0},i.prototype.updateAttributesForAttachment=function(t,e){var n;return(n=this.getRangeOfAttachment(e))?this.addAttributesAtRange(t,n):this},i.prototype.getLength=function(){return this.pieceList.getEndPosition()},i.prototype.isEmpty=function(){return 0===this.getLength()},i.prototype.isEqualTo=function(t){var e;return i.__super__.isEqualTo.apply(this,arguments)||(null!=t&&null!=(e=t.pieceList)?e.isEqualTo(this.pieceList):void 0)},i.prototype.isBlockBreak=function(){return 1===this.getLength()&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},i.prototype.eachPiece=function(t){return this.pieceList.eachObject(t)},i.prototype.getPieces=function(){return this.pieceList.toArray()},i.prototype.getPieceAtPosition=function(t){return this.pieceList.getObjectAtPosition(t)},i.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},i.prototype.toSerializableText=function(){var t;return t=this.pieceList.selectSplittableList(function(t){return t.isSerializable()}),this.copyWithPieceList(t)},i.prototype.toString=function(){return this.pieceList.toString()},i.prototype.toJSON=function(){return this.pieceList.toJSON()},i.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,o;for(o=[],e=0,n=(i=this.pieceList.toArray()).length;n>e;e++)t=i[e],o.push(JSON.parse(t.toConsole()));return o}.call(this))},i}(e.Object)}.call(this),function(){var t,n,i,o,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=e.arraysAreEqual,o=e.spliceArray,n=e.getBlockConfig,e.getBlockAttributeNames,i=e.getListAttributeNames,e.Block=function(s){function l(t,n){null==t&&(t=new e.Text),null==n&&(n=[]),l.__super__.constructor.apply(this,arguments),this.text=h(t),this.attributes=n}var c,h,d,p,f,m,g,v,y;return r(l,s),l.fromJSON=function(t){return new this(e.Text.fromJSON(t.text),t.attributes)},l.prototype.isEmpty=function(){return this.text.isBlockBreak()},l.prototype.isEqualTo=function(e){return l.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(null!=e?e.text:void 0)&&t(this.attributes,null!=e?e.attributes:void 0)},l.prototype.copyWithText=function(t){return new this.constructor(t,this.attributes)},l.prototype.copyWithoutText=function(){return this.copyWithText(null)},l.prototype.copyWithAttributes=function(t){return new this.constructor(this.text,t)},l.prototype.copyUsingObjectMap=function(t){var e;return this.copyWithText((e=t.find(this.text))?e:this.text.copyUsingObjectMap(t))},l.prototype.addAttribute=function(t){var e;return e=this.attributes.concat(p(t)),this.copyWithAttributes(e)},l.prototype.removeAttribute=function(t){var e,i;return i=n(t).listAttribute,e=m(m(this.attributes,t),i),this.copyWithAttributes(e)},l.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},l.prototype.getLastAttribute=function(){return f(this.attributes)},l.prototype.getAttributes=function(){return this.attributes.slice(0)},l.prototype.getAttributeLevel=function(){return this.attributes.length},l.prototype.getAttributeAtLevel=function(t){return this.attributes[t-1]},l.prototype.hasAttributes=function(){return this.getAttributeLevel()>0},l.prototype.getLastNestableAttribute=function(){return f(this.getNestableAttributes())},l.prototype.getNestableAttributes=function(){var t,e,i,o,r;for(r=[],e=0,i=(o=this.attributes).length;i>e;e++)t=o[e],n(t).nestable&&r.push(t);return r},l.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},l.prototype.decreaseNestingLevel=function(){var t;return(t=this.getLastNestableAttribute())?this.removeAttribute(t):this},l.prototype.increaseNestingLevel=function(){var t,e,n;return(t=this.getLastNestableAttribute())?(n=this.attributes.lastIndexOf(t),e=o.apply(null,[this.attributes,n+1,0].concat(a.call(p(t)))),this.copyWithAttributes(e)):this},l.prototype.getListItemAttributes=function(){var t,e,i,o,r;for(r=[],e=0,i=(o=this.attributes).length;i>e;e++)t=o[e],n(t).listAttribute&&r.push(t);return r},l.prototype.isListItem=function(){var t;return null!=(t=n(this.getLastAttribute()))?t.listAttribute:void 0},l.prototype.isTerminalBlock=function(){var t;return null!=(t=n(this.getLastAttribute()))?t.terminal:void 0},l.prototype.breaksOnReturn=function(){var t;return null!=(t=n(this.getLastAttribute()))?t.breakOnReturn:void 0},l.prototype.findLineBreakInDirectionFromPosition=function(t,e){var n,i;return i=this.toString(),-1!==(n=function(){switch(t){case"forward":return i.indexOf("\n",e);case"backward":return i.slice(0,e).lastIndexOf("\n")}}())?n:void 0},l.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},l.prototype.toString=function(){return this.text.toString()},l.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},l.prototype.getLength=function(){return this.text.getLength()},l.prototype.canBeConsolidatedWith=function(t){return!this.hasAttributes()&&!t.hasAttributes()},l.prototype.consolidateWith=function(t){var n,i;return n=e.Text.textForStringWithAttributes("\n"),i=this.getTextWithoutBlockBreak().appendText(n),this.copyWithText(i.appendText(t.text))},l.prototype.splitAtOffset=function(t){var e,n;return 0===t?(e=null,n=this):t===this.getLength()?(e=this,n=null):(e=this.copyWithText(this.text.getTextAtRange([0,t])),n=this.copyWithText(this.text.getTextAtRange([t,this.getLength()]))),[e,n]},l.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},l.prototype.getTextWithoutBlockBreak=function(){return g(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},l.prototype.canBeGrouped=function(t){return this.attributes[t]},l.prototype.canBeGroupedWith=function(t,e){var o,r,s,a;return r=(s=t.getAttributes())[e],(o=this.attributes[e])===r&&!(!1===n(o).group&&(a=s[e+1],u.call(i(),a)<0))},h=function(t){return t=y(t),c(t)},y=function(t){var n,i,o,r,s,u;return r=!1,u=t.getPieces(),i=2<=u.length?a.call(u,0,n=u.length-1):(n=0,[]),null==(o=u[n++])?t:(i=function(){var t,e,n;for(n=[],t=0,e=i.length;e>t;t++)(s=i[t]).isBlockBreak()?(r=!0,n.push(v(s))):n.push(s);return n}(),r?new e.Text(a.call(i).concat([o])):t)},d=e.Text.textForStringWithAttributes("\n",{blockBreak:!0}),c=function(t){return g(t)?t:t.appendText(d)},g=function(t){var e;return 0!==(e=t.getLength())&&t.getTextAtRange([e-1,e]).isBlockBreak()},v=function(t){return t.copyWithoutAttribute("blockBreak")},p=function(t){var e;return null!=(e=n(t).listAttribute)?[e,t]:[t]},f=function(t){return t.slice(-1)[0]},m=function(t,e){var n;return-1===(n=t.lastIndexOf(e))?t:o(t,n,1)},l}(e.Object)}.call(this),function(){var t,n,i,o=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].slice,a=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};n=e.tagName,i=e.walkTree,t=e.nodeIsAttachmentElement,e.HTMLSanitizer=function(e){function r(t,e){this.allowedAttributes=(null!=e?e:{}).allowedAttributes,null==this.allowedAttributes&&(this.allowedAttributes=u),this.body=l(t)}var u,l,c;return o(r,e),u="style href src width height class".split(" "),r.sanitize=function(t,e){var n;return(n=new this(t,e)).sanitize(),n},r.prototype.sanitize=function(){return this.sanitizeElements()},r.prototype.getHTML=function(){return this.body.innerHTML},r.prototype.getBody=function(){return this.body},r.prototype.sanitizeElements=function(){var t,e,n,o,r;for(r=i(this.body),o=[];r.nextNode();)switch(n=r.currentNode,n.nodeType){case Node.ELEMENT_NODE:c(n)?o.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:o.push(n)}for(t=0,e=o.length;e>t;t++)(n=o[t]).parentNode.removeChild(n);return this.body},r.prototype.sanitizeElement=function(t){var e,n,i,o;for(e=0,n=(o=s.call(t.attributes)).length;n>e;e++)i=o[e].name,a.call(this.allowedAttributes,i)>=0||0===i.indexOf("data-trix")||t.removeAttribute(i);return t},c=function(e){return(null!=e?e.nodeType:void 0)!==Node.ELEMENT_NODE||t(e)?void 0:"script"===n(e)||"false"===e.getAttribute("data-trix-serialize")},l=function(t){var e,n,i,o,r;for(null==t&&(t=""),t=t.replace(/<\/html[^>]*>[^]*$/i,"</html>"),(e=document.implementation.createHTMLDocument("")).documentElement.innerHTML=t,i=0,o=(r=e.head.querySelectorAll("style")).length;o>i;i++)n=r[i],e.body.appendChild(n);return e.body},r}(e.BasicObject)}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h,d=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty,f=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=e.arraysAreEqual,s=e.makeElement,c=e.tagName,r=e.getBlockTagNames,h=e.walkTree,o=e.findClosestElementFromNode,i=e.elementContainsNode,a=e.nodeIsAttachmentElement,u=e.normalizeSpaces,n=e.breakableWhitespacePattern,l=e.squishBreakableWhitespace,e.HTMLParser=function(p){function m(t,e){this.html=t,this.referenceElement=(null!=e?e:{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var g,v,y,_,b,w,x,A,E,C,T,S;return d(m,p),m.parse=function(t,e){var n;return(n=new this(t,e)).parse(),n},m.prototype.getDocument=function(){return e.Document.fromJSON(this.blocks)},m.prototype.parse=function(){var t,n;try{for(this.createHiddenContainer(),t=e.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=t,n=h(this.containerElement,{usingFilter:A});n.nextNode();)this.processNode(n.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},m.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=s({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},m.prototype.removeHiddenContainer=function(){return this.containerElement.parentNode.removeChild(this.containerElement)},A=function(t){return"style"===c(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},m.prototype.processNode=function(t){switch(t.nodeType){case Node.TEXT_NODE:return this.processTextNode(t);case Node.ELEMENT_NODE:return this.appendBlockForElement(t),this.processElement(t)}},m.prototype.appendBlockForElement=function(e){var n,o,r,s;if(r=this.isBlockElement(e),o=i(this.currentBlockElement,e),r&&!this.isBlockElement(e.firstChild)){if(!(this.isInsignificantTextNode(e.firstChild)&&this.isBlockElement(e.firstElementChild)||(n=this.getBlockAttributes(e),o&&t(n,this.currentBlock.attributes))))return this.currentBlock=this.appendBlockForAttributesWithElement(n,e),this.currentBlockElement=e}else if(this.currentBlockElement&&!o&&!r)return(s=this.findParentBlockElement(e))?this.appendBlockForElement(s):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},m.prototype.findParentBlockElement=function(t){var e;for(e=t.parentElement;e&&e!==this.containerElement;){if(this.isBlockElement(e)&&f.call(this.blockElements,e)>=0)return e;e=e.parentElement}return null},m.prototype.processTextNode=function(t){var e,n;return this.isInsignificantTextNode(t)?void 0:(n=t.data,v(t.parentNode)||(n=l(n),T(null!=(e=t.previousSibling)?e.textContent:void 0)&&(n=w(n))),this.appendStringWithAttributes(n,this.getTextAttributes(t.parentNode)))},m.prototype.processElement=function(t){var e,n,i,o,r;if(a(t))return e=y(t),Object.keys(e).length&&(o=this.getTextAttributes(t),this.appendAttachmentWithAttributes(e,o),t.innerHTML=""),this.processedElements.push(t);switch(c(t)){case"br":return this.isExtraBR(t)||this.isBlockElement(t.nextSibling)||this.appendStringWithAttributes("\n",this.getTextAttributes(t)),this.processedElements.push(t);case"img":for(n in e={url:t.getAttribute("src"),contentType:"image"},i=b(t))r=i[n],e[n]=r;return this.appendAttachmentWithAttributes(e,this.getTextAttributes(t)),this.processedElements.push(t);case"tr":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes("\n");break;case"td":if(t.parentNode.firstChild!==t)return this.appendStringWithAttributes(" | ")}},m.prototype.appendBlockForAttributesWithElement=function(t,e){var n;return this.blockElements.push(e),n=g(t),this.blocks.push(n),n},m.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},m.prototype.appendStringWithAttributes=function(t,e){return this.appendPiece(C(t,e))},m.prototype.appendAttachmentWithAttributes=function(t,e){return this.appendPiece(E(t,e))},m.prototype.appendPiece=function(t){return 0===this.blocks.length&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(t)},m.prototype.appendStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[i.length-1])?n.type:void 0)?n.string+=t:i.push(C(t))},m.prototype.prependStringToTextAtIndex=function(t,e){var n,i;return"string"===(null!=(n=(i=this.blocks[e].text)[0])?n.type:void 0)?n.string=t+n.string:i.unshift(C(t))},C=function(t,e){var n;return null==e&&(e={}),n="string",{string:t=u(t),attributes:e,type:n}},E=function(t,e){return null==e&&(e={}),{attachment:t,attributes:e,type:"attachment"}},g=function(t){return null==t&&(t={}),{text:[],attributes:t}},m.prototype.getTextAttributes=function(t){var n,i,r,s,u,l,c,h,d,p,f,m,g;for(n in r={},p=e.config.textAttributes)if((u=p[n]).tagName&&o(t,{matchingSelector:u.tagName,untilNode:this.containerElement}))r[n]=!0;else if(u.parser){if(g=u.parser(t)){for(i=!1,l=0,d=(f=this.findBlockElementAncestors(t)).length;d>l;l++)if(s=f[l],u.parser(s)===g){i=!0;break}i||(r[n]=g)}}else u.styleProperty&&(g=t.style[u.styleProperty])&&(r[n]=g);if(a(t)&&(c=t.getAttribute("data-trix-attributes")))for(h in m=JSON.parse(c))g=m[h],r[h]=g;return r},m.prototype.getBlockAttributes=function(t){var n,i,o,r;for(i=[];t&&t!==this.containerElement;){for(n in r=e.config.blockAttributes)!1!==(o=r[n]).parse&&c(t)===o.tagName&&(("function"==typeof o.test?o.test(t):void 0)||!o.test)&&(i.push(n),o.listAttribute&&i.push(o.listAttribute));t=t.parentNode}return i.reverse()},m.prototype.findBlockElementAncestors=function(t){var e,n;for(e=[];t&&t!==this.containerElement;)n=c(t),f.call(r(),n)>=0&&e.push(t),t=t.parentNode;return e},y=function(t){return JSON.parse(t.getAttribute("data-trix-attachment"))},b=function(t){var e,n,i;return i=t.getAttribute("width"),n=t.getAttribute("height"),e={},i&&(e.width=parseInt(i,10)),n&&(e.height=parseInt(n,10)),e},m.prototype.isBlockElement=function(t){var e;if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&!o(t,{matchingSelector:"td",untilNode:this.containerElement}))return e=c(t),f.call(r(),e)>=0||"block"===window.getComputedStyle(t).display},m.prototype.isInsignificantTextNode=function(t){var e,n,i;if((null!=t?t.nodeType:void 0)===Node.TEXT_NODE&&S(t.data)&&(n=t.parentNode,i=t.previousSibling,e=t.nextSibling,(!x(n.previousSibling)||this.isBlockElement(n.previousSibling))&&!v(n)))return!i||this.isBlockElement(i)||!e||this.isBlockElement(e)},m.prototype.isExtraBR=function(t){return"br"===c(t)&&this.isBlockElement(t.parentNode)&&t.parentNode.lastChild===t},v=function(t){var e;return"pre"===(e=window.getComputedStyle(t).whiteSpace)||"pre-wrap"===e||"pre-line"===e},x=function(t){return t&&!T(t.textContent)},m.prototype.translateBlockElementMarginsToNewlines=function(){var t,e,n,i,o,r,s;for(t=this.getMarginOfDefaultBlockElement(),s=[],n=e=0,i=(r=this.blocks).length;i>e;n=++e)r[n],(o=this.getMarginOfBlockElementAtIndex(n))&&(o.top>2*t.top&&this.prependStringToTextAtIndex("\n",n),s.push(o.bottom>2*t.bottom?this.appendStringToTextAtIndex("\n",n):void 0));return s},m.prototype.getMarginOfBlockElementAtIndex=function(t){var e,n;return!(e=this.blockElements[t])||!e.textContent||(n=c(e),f.call(r(),n)>=0||f.call(this.processedElements,e)>=0)?void 0:_(e)},m.prototype.getMarginOfDefaultBlockElement=function(){var t;return t=s(e.config.blockAttributes["default"].tagName),this.containerElement.appendChild(t),_(t)},_=function(t){var e;return"block"===(e=window.getComputedStyle(t)).display?{top:parseInt(e.marginTop),bottom:parseInt(e.marginBottom)}:void 0},w=function(t){return t.replace(RegExp("^"+n.source+"+"),"")},S=function(t){return RegExp("^"+n.source+"*$").test(t)},T=function(t){return/\s$/.test(t)},m}(e.BasicObject)}.call(this),function(){var t,n,i,o,r=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=e.arraysAreEqual,i=e.normalizeRange,o=e.rangeIsCollapsed,n=e.getBlockConfig,e.Document=function(s){function l(t){null==t&&(t=[]),l.__super__.constructor.apply(this,arguments),0===t.length&&(t=[new e.Block]),this.blockList=e.SplittableList.box(t)}var c;return r(l,s),l.fromJSON=function(t){var n;return new this(function(){var i,o,r;for(r=[],i=0,o=t.length;o>i;i++)n=t[i],r.push(e.Block.fromJSON(n));return r}())},l.fromHTML=function(t,n){return e.HTMLParser.parse(t,n).getDocument()},l.fromString=function(t,n){var i;return i=e.Text.textForStringWithAttributes(t,n),new this([new e.Block(i)])},l.prototype.isEmpty=function(){var t;return 1===this.blockList.length&&((t=this.getBlockAtIndex(0)).isEmpty()&&!t.hasAttributes())},l.prototype.copy=function(t){var e;return null==t&&(t={}),e=t.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(e)},l.prototype.copyUsingObjectsFromDocument=function(t){var n;return n=new e.ObjectMap(t.getObjects()),this.copyUsingObjectMap(n)},l.prototype.copyUsingObjectMap=function(t){var e,n,i;return n=function(){var n,o,r,s;for(s=[],n=0,o=(r=this.getBlocks()).length;o>n;n++)e=r[n],s.push((i=t.find(e))?i:e.copyUsingObjectMap(t));return s}.call(this),new this.constructor(n)},l.prototype.copyWithBaseBlockAttributes=function(t){var e,n,i;return null==t&&(t=[]),i=function(){var i,o,r,s;for(s=[],i=0,o=(r=this.getBlocks()).length;o>i;i++)n=r[i],e=t.concat(n.getAttributes()),s.push(n.copyWithAttributes(e));return s}.call(this),new this.constructor(i)},l.prototype.replaceBlock=function(t,e){var n;return-1===(n=this.blockList.indexOf(t))?this:new this.constructor(this.blockList.replaceObjectAtIndex(e,n))},l.prototype.insertDocumentAtRange=function(t,e){var n,r,s,a,u,l,c;return r=t.blockList,u=(e=i(e))[0],s=(l=this.locationFromPosition(u)).index,a=l.offset,c=this,n=this.getBlockAtPosition(u),o(e)&&n.isEmpty()&&!n.hasAttributes()?c=new this.constructor(c.blockList.removeObjectAtIndex(s)):n.getBlockBreakPosition()===a&&u++,c=c.removeTextAtRange(e),new this.constructor(c.blockList.insertSplittableListAtPosition(r,u))},l.prototype.mergeDocumentAtRange=function(e,n){var o,r,s,a,u,l,c,h,d,p,f,m;return f=(n=i(n))[0],p=this.locationFromPosition(f),r=this.getBlockAtIndex(p.index).getAttributes(),o=e.getBaseBlockAttributes(),m=r.slice(-o.length),t(o,m)?(c=r.slice(0,-o.length),l=e.copyWithBaseBlockAttributes(c)):l=e.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(r),s=l.getBlockCount(),a=l.getBlockAtIndex(0),t(r,a.getAttributes())?(u=a.getTextWithoutBlockBreak(),d=this.insertTextAtRange(u,n),s>1&&(l=new this.constructor(l.getBlocks().slice(1)),h=f+u.getLength(),d=d.insertDocumentAtRange(l,h))):d=this.insertDocumentAtRange(l,n),d},l.prototype.insertTextAtRange=function(t,e){var n,o,r,s,a;return a=(e=i(e))[0],o=(s=this.locationFromPosition(a)).index,r=s.offset,n=this.removeTextAtRange(e),new this.constructor(n.blockList.editObjectAtIndex(o,function(e){return e.copyWithText(e.text.insertTextAtPosition(t,r))}))},l.prototype.removeTextAtRange=function(t){var e,n,r,s,a,u,l,c,h,d,p,f,m,g,v,y,_,b;return c=(d=t=i(t))[0],y=d[1],o(t)?this:(u=(p=this.locationRangeFromRange(t))[0],g=p[1],a=u.index,l=u.offset,s=this.getBlockAtIndex(a),m=g.index,v=g.offset,f=this.getBlockAtIndex(m),y-c==1&&s.getBlockBreakPosition()===l&&f.getBlockBreakPosition()!==v&&"\n"===f.text.getStringAtPosition(v)?r=this.blockList.editObjectAtIndex(m,function(t){return t.copyWithText(t.text.removeTextAtRange([v,v+1]))}):(h=s.text.getTextAtRange([0,l]),_=f.text.getTextAtRange([v,f.getLength()]),b=h.appendText(_),n=a!==m&&0===l&&s.getAttributeLevel()>=f.getAttributeLevel()?f.copyWithText(b):s.copyWithText(b),e=m+1-a,r=this.blockList.splice(a,e,n)),new this.constructor(r))},l.prototype.moveTextFromRangeToPosition=function(t,e){var n,o,r,s,u,l,c,h,d,p;if(d=(l=t=i(t))[0],r=l[1],e>=d&&r>=e)return this;if(o=this.getDocumentAtRange(t),h=this.removeTextAtRange(t),(u=e>d)&&(e-=o.getLength()),!h.firstBlockInRangeIsEntirelySelected(t)){if(s=(c=o.getBlocks())[0],0===(n=2<=c.length?a.call(c,1):[]).length?(p=s.getTextWithoutBlockBreak(),u&&(e+=1)):p=s.text,h=h.insertTextAtRange(p,e),0===n.length)return h;o=new this.constructor(n),e+=p.getLength()}return h.insertDocumentAtRange(o,e)},l.prototype.addAttributeAtRange=function(t,e,i){var o;return o=this.blockList,this.eachBlockAtRange(i,function(i,r,s){return o=o.editObjectAtIndex(s,function(){return n(t)?i.addAttribute(t,e):r[0]===r[1]?i:i.copyWithText(i.text.addAttributeAtRange(t,e,r))})}),new this.constructor(o)},l.prototype.addAttribute=function(t,e){var n;return n=this.blockList,this.eachBlock(function(i,o){return n=n.editObjectAtIndex(o,function(){return i.addAttribute(t,e)})}),new this.constructor(n)},l.prototype.removeAttributeAtRange=function(t,e){var i;return i=this.blockList,this.eachBlockAtRange(e,function(e,o,r){return n(t)?i=i.editObjectAtIndex(r,function(){return e.removeAttribute(t)}):o[0]!==o[1]?i=i.editObjectAtIndex(r,function(){return e.copyWithText(e.text.removeAttributeAtRange(t,o))}):void 0}),new this.constructor(i)},l.prototype.updateAttributesForAttachment=function(t,e){var n,i,o;return i=this.getRangeOfAttachment(e)[0],n=this.locationFromPosition(i).index,o=this.getTextAtIndex(n),new this.constructor(this.blockList.editObjectAtIndex(n,function(n){return n.copyWithText(o.updateAttributesForAttachment(t,e))}))},
l.prototype.removeAttributeForAttachment=function(t,e){var n;return n=this.getRangeOfAttachment(e),this.removeAttributeAtRange(t,n)},l.prototype.insertBlockBreakAtRange=function(t){var n,o,r,s;return s=(t=i(t))[0],r=this.locationFromPosition(s).offset,o=this.removeTextAtRange(t),0===r&&(n=[new e.Block]),new this.constructor(o.blockList.insertSplittableListAtPosition(new e.SplittableList(n),s))},l.prototype.applyBlockAttributeAtRange=function(t,e,i){var o,r,s,a;return r=(s=this.expandRangeToLineBreaksAndSplitBlocks(i)).document,i=s.range,(o=n(t)).listAttribute?(r=(a=(r=r.removeLastListAttributeAtRange(i,{exceptAttributeName:t})).convertLineBreaksToBlockBreaksInRange(i)).document,i=a.range):r=o.terminal?r.removeLastTerminalAttributeAtRange(i):r.consolidateBlocksAtRange(i),r.addAttributeAtRange(t,e,i)},l.prototype.removeLastListAttributeAtRange=function(t,e){var i;return null==e&&(e={}),i=this.blockList,this.eachBlockAtRange(t,function(t,o,r){var s;if((s=t.getLastAttribute())&&n(s).listAttribute&&s!==e.exceptAttributeName)return i=i.editObjectAtIndex(r,function(){return t.removeAttribute(s)})}),new this.constructor(i)},l.prototype.removeLastTerminalAttributeAtRange=function(t){var e;return e=this.blockList,this.eachBlockAtRange(t,function(t,i,o){var r;if((r=t.getLastAttribute())&&n(r).terminal)return e=e.editObjectAtIndex(o,function(){return t.removeAttribute(r)})}),new this.constructor(e)},l.prototype.firstBlockInRangeIsEntirelySelected=function(t){var e,n,o,r,s,a;return a=(r=t=i(t))[0],e=r[1],n=this.locationFromPosition(a),s=this.locationFromPosition(e),0===n.offset&&n.index<s.index||n.index===s.index&&(o=this.getBlockAtIndex(n.index).getLength(),0===n.offset&&s.offset===o)},l.prototype.expandRangeToLineBreaksAndSplitBlocks=function(t){var e,n,o,r,s,a,u,l,c;return c=(a=t=i(t))[0],r=a[1],l=this.locationFromPosition(c),o=this.locationFromPosition(r),u=(e=this).getBlockAtIndex(l.index),null!=(l.offset=u.findLineBreakInDirectionFromPosition("backward",l.offset))&&(s=e.positionFromLocation(l),e=e.insertBlockBreakAtRange([s,s+1]),o.index+=1,o.offset-=e.getBlockAtIndex(l.index).getLength(),l.index+=1),l.offset=0,0===o.offset&&o.index>l.index?(o.index-=1,o.offset=e.getBlockAtIndex(o.index).getBlockBreakPosition()):("\n"===(n=e.getBlockAtIndex(o.index)).text.getStringAtRange([o.offset-1,o.offset])?o.offset-=1:o.offset=n.findLineBreakInDirectionFromPosition("forward",o.offset),o.offset!==n.getBlockBreakPosition()&&(s=e.positionFromLocation(o),e=e.insertBlockBreakAtRange([s,s+1]))),c=e.positionFromLocation(l),r=e.positionFromLocation(o),{document:e,range:t=i([c,r])}},l.prototype.convertLineBreaksToBlockBreaksInRange=function(t){var e,n,o;return n=(t=i(t))[0],o=this.getStringAtRange(t).slice(0,-1),e=this,o.replace(/.*?\n/g,function(t){return n+=t.length,e=e.insertBlockBreakAtRange([n-1,n])}),{document:e,range:t}},l.prototype.consolidateBlocksAtRange=function(t){var e,n,o,r,s;return s=(o=t=i(t))[0],n=o[1],r=this.locationFromPosition(s).index,e=this.locationFromPosition(n).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(r,e))},l.prototype.getDocumentAtRange=function(t){var e;return t=i(t),e=this.blockList.getSplittableListInRange(t).toArray(),new this.constructor(e)},l.prototype.getStringAtRange=function(t){var e,n;return(n=t=i(t))[n.length-1]!==this.getLength()&&(e=-1),this.getDocumentAtRange(t).toString().slice(0,e)},l.prototype.getBlockAtIndex=function(t){return this.blockList.getObjectAtIndex(t)},l.prototype.getBlockAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getBlockAtIndex(e)},l.prototype.getTextAtIndex=function(t){var e;return null!=(e=this.getBlockAtIndex(t))?e.text:void 0},l.prototype.getTextAtPosition=function(t){var e;return e=this.locationFromPosition(t).index,this.getTextAtIndex(e)},l.prototype.getPieceAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getPieceAtPosition(n)},l.prototype.getCharacterAtPosition=function(t){var e,n,i;return e=(i=this.locationFromPosition(t)).index,n=i.offset,this.getTextAtIndex(e).getStringAtRange([n,n+1])},l.prototype.getLength=function(){return this.blockList.getEndPosition()},l.prototype.getBlocks=function(){return this.blockList.toArray()},l.prototype.getBlockCount=function(){return this.blockList.length},l.prototype.getEditCount=function(){return this.editCount},l.prototype.eachBlock=function(t){return this.blockList.eachObject(t)},l.prototype.eachBlockAtRange=function(t,e){var n,o,r,s,a,u,l,c,h,d,p,f;if(p=(u=t=i(t))[0],r=u[1],d=this.locationFromPosition(p),o=this.locationFromPosition(r),d.index===o.index)return n=this.getBlockAtIndex(d.index),f=[d.offset,o.offset],e(n,f,d.index);for(h=[],a=s=l=d.index,c=o.index;c>=l?c>=s:s>=c;a=c>=l?++s:--s)(n=this.getBlockAtIndex(a))?(f=function(){switch(a){case d.index:return[d.offset,n.text.getLength()];case o.index:return[0,o.offset];default:return[0,n.text.getLength()]}}(),h.push(e(n,f,a))):h.push(void 0);return h},l.prototype.getCommonAttributesAtRange=function(t){var n,r,s;return r=(t=i(t))[0],o(t)?this.getCommonAttributesAtPosition(r):(s=[],n=[],this.eachBlockAtRange(t,function(t,e){return e[0]!==e[1]?(s.push(t.text.getCommonAttributesAtRange(e)),n.push(c(t))):void 0}),e.Hash.fromCommonAttributesOfObjects(s).merge(e.Hash.fromCommonAttributesOfObjects(n)).toObject())},l.prototype.getCommonAttributesAtPosition=function(t){var n,i,o,r,s,a,l,h,d,p;if(s=(d=this.locationFromPosition(t)).index,h=d.offset,!(o=this.getBlockAtIndex(s)))return{};for(l in r=c(o),n=o.text.getAttributesAtPosition(h),i=o.text.getAttributesAtPosition(h-1),a=function(){var t,n;for(l in n=[],t=e.config.textAttributes)(p=t[l]).inheritable&&n.push(l);return n}(),i)((p=i[l])===n[l]||u.call(a,l)>=0)&&(r[l]=p);return r},l.prototype.getRangeOfCommonAttributeAtPosition=function(t,e){var n,o,r,s,a,u,l,c;return r=(a=this.locationFromPosition(e)).index,s=a.offset,c=(u=this.getTextAtIndex(r).getExpandedRangeForAttributeAtOffset(t,s))[0],o=u[1],l=this.positionFromLocation({index:r,offset:c}),n=this.positionFromLocation({index:r,offset:o}),i([l,n])},l.prototype.getBaseBlockAttributes=function(){var t,e,n,i,o,r,s;for(t=this.getBlockAtIndex(0).getAttributes(),n=i=1,s=this.getBlockCount();s>=1?s>i:i>s;n=s>=1?++i:--i)e=this.getBlockAtIndex(n).getAttributes(),r=Math.min(t.length,e.length),t=function(){var n,i,s;for(s=[],o=n=0,i=r;(i>=0?i>n:n>i)&&e[o]===t[o];o=i>=0?++n:--n)s.push(e[o]);return s}();return t},c=function(t){var e,n;return n={},(e=t.getLastAttribute())&&(n[e]=!0),n},l.prototype.getAttachmentById=function(t){var e,n,i,o;for(n=0,i=(o=this.getAttachments()).length;i>n;n++)if((e=o[n]).id===t)return e},l.prototype.getAttachmentPieces=function(){var t;return t=[],this.blockList.eachObject(function(e){var n;return n=e.text,t=t.concat(n.getAttachmentPieces())}),t},l.prototype.getAttachments=function(){var t,e,n,i,o;for(o=[],t=0,e=(i=this.getAttachmentPieces()).length;e>t;t++)n=i[t],o.push(n.attachment);return o},l.prototype.getRangeOfAttachment=function(t){var e,n,o,r,s,a,u;for(r=0,n=e=0,o=(s=this.blockList.toArray()).length;o>e;n=++e){if(u=(a=s[n].text).getRangeOfAttachment(t))return i([r+u[0],r+u[1]]);r+=a.getLength()}},l.prototype.getLocationRangeOfAttachment=function(t){var e;return e=this.getRangeOfAttachment(t),this.locationRangeFromRange(e)},l.prototype.getAttachmentPieceForAttachment=function(t){var e,n,i,o;for(e=0,n=(o=this.getAttachmentPieces()).length;n>e;e++)if((i=o[e]).attachment===t)return i},l.prototype.findRangesForTextAttribute=function(t,e){var n,i,o,r,s,a,u,l,c,h;for(h=(null!=e?e:{}).withValue,a=0,u=[],l=[],r=function(e){return null!=h?e.getAttribute(t)===h:e.hasAttribute(t)},n=0,i=(c=this.getPieces()).length;i>n;n++)o=(s=c[n]).getLength(),r(s)&&(u[1]===a?u[1]=a+o:l.push(u=[a,a+o])),a+=o;return l},l.prototype.locationFromPosition=function(t){var e,n;return null!=(n=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,t))).index?n:{index:(e=this.getBlocks()).length-1,offset:e[e.length-1].getLength()}},l.prototype.positionFromLocation=function(t){return this.blockList.findPositionAtIndexAndOffset(t.index,t.offset)},l.prototype.locationRangeFromPosition=function(t){return i(this.locationFromPosition(t))},l.prototype.locationRangeFromRange=function(t){var e,n,o,r;if(t=i(t))return r=t[0],n=t[1],o=this.locationFromPosition(r),e=this.locationFromPosition(n),i([o,e])},l.prototype.rangeFromLocationRange=function(t){var e,n;return t=i(t),e=this.positionFromLocation(t[0]),o(t)||(n=this.positionFromLocation(t[1])),i([e,n])},l.prototype.isEqualTo=function(t){return this.blockList.isEqualTo(null!=t?t.blockList:void 0)},l.prototype.getTexts=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.getBlocks()).length;n>e;e++)t=i[e],o.push(t.text);return o},l.prototype.getPieces=function(){var t,e,n,i,o;for(n=[],t=0,e=(i=this.getTexts()).length;e>t;t++)o=i[t],n.push.apply(n,o.getPieces());return n},l.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},l.prototype.toSerializableDocument=function(){var t;return t=[],this.blockList.eachObject(function(e){return t.push(e.copyWithText(e.text.toSerializableText()))}),new this.constructor(t)},l.prototype.toString=function(){return this.blockList.toString()},l.prototype.toJSON=function(){return this.blockList.toJSON()},l.prototype.toConsole=function(){var t;return JSON.stringify(function(){var e,n,i,o;for(o=[],e=0,n=(i=this.blockList.toArray()).length;n>e;e++)t=i[e],o.push(JSON.parse(t.text.toConsole()));return o}.call(this))},l}(e.Object)}.call(this),function(){e.LineBreakInsertion=function(){function t(t){var e;this.composition=t,this.document=this.composition.document,e=this.composition.getSelectedRange(),this.startPosition=e[0],this.endPosition=e[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return t.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?0!==this.startLocation.offset:this.breaksOnReturn&&"\n"!==this.nextCharacter},t.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&"\n"===this.nextCharacter||"\n"===this.previousCharacter)},t.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},t.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&0===this.startLocation.offset&&!this.block.isEmpty()},t.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},t}()}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty;s=e.normalizeRange,l=e.rangesAreEqual,u=e.rangeIsCollapsed,a=e.objectsAreEqual,t=e.arrayStartsWith,c=e.summarizeArrayChange,i=e.getAllAttributeNames,o=e.getBlockConfig,r=e.getTextConfig,n=e.extend,e.Composition=function(d){function p(){this.document=new e.Document,this.attachments=[],this.currentAttributes={},this.revision=0}var f;return h(p,d),p.prototype.setDocument=function(t){var e;return t.isEqualTo(this.document)?void 0:(this.document=t,this.refreshAttachments(),this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeDocument?e.compositionDidChangeDocument(t):void 0)},p.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}},p.prototype.loadSnapshot=function(t){var n,i,o,r;return n=t.document,r=t.selectedRange,null!=(i=this.delegate)&&"function"==typeof i.compositionWillLoadSnapshot&&i.compositionWillLoadSnapshot(),this.setDocument(null!=n?n:new e.Document),this.setSelection(null!=r?r:[0,0]),null!=(o=this.delegate)&&"function"==typeof o.compositionDidLoadSnapshot?o.compositionDidLoadSnapshot():void 0},p.prototype.insertText=function(t,e){var n,i,o,r;return r=(null!=e?e:{updatePosition:!0}).updatePosition,i=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(t,i)),n=(o=i[0])+t.getLength(),r&&this.setSelection(n),this.notifyDelegateOfInsertionAtRange([o,n])},p.prototype.insertBlock=function(t){var n;return null==t&&(t=new e.Block),n=new e.Document([t]),this.insertDocument(n)},p.prototype.insertDocument=function(t){var n,i,o;return null==t&&(t=new e.Document),i=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(t,i)),n=(o=i[0])+t.getLength(),this.setSelection(n),this.notifyDelegateOfInsertionAtRange([o,n])},p.prototype.insertString=function(t,n){var i,o;return i=this.getCurrentTextAttributes(),o=e.Text.textForStringWithAttributes(t,i),this.insertText(o,n)},p.prototype.insertBlockBreak=function(){var t,e,n;return e=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(e)),t=(n=e[0])+1,this.setSelection(t),this.notifyDelegateOfInsertionAtRange([n,t])},p.prototype.insertLineBreak=function(){var t,n;return(n=new e.LineBreakInsertion(this)).shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(n.startPosition)):n.shouldPrependListItem()?(t=new e.Document([n.block.copyWithoutText()]),this.insertDocument(t)):n.shouldInsertBlockBreak()?this.insertBlockBreak():n.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():n.shouldBreakFormattedBlock()?this.breakFormattedBlock(n):this.insertString("\n")},p.prototype.insertHTML=function(t){var n,i,o,r;return n=e.Document.fromHTML(t),o=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(n,o)),i=(r=o[0])+n.getLength()-1,this.setSelection(i),this.notifyDelegateOfInsertionAtRange([r,i])},p.prototype.replaceHTML=function(t){var n,i,o;return n=e.Document.fromHTML(t).copyUsingObjectsFromDocument(this.document),i=this.getLocationRange({strict:!1}),o=this.document.rangeFromLocationRange(i),this.setDocument(n),this.setSelection(o)},p.prototype.insertFile=function(t){var n,i;return(null!=(i=this.delegate)?i.compositionShouldAcceptFile(t):void 0)?(n=e.Attachment.attachmentForFile(t),this.insertAttachment(n)):void 0},p.prototype.insertFiles=function(t){var n,i,o,r,s,a,u;for(u=new e.Text,r=0,s=t.length;s>r;r++)o=t[r],(null!=(a=this.delegate)?a.compositionShouldAcceptFile(o):void 0)&&(n=e.Attachment.attachmentForFile(o),i=e.Text.textForAttachmentWithAttributes(n,this.currentAttributes),u=u.appendText(i));return this.insertText(u)},p.prototype.insertAttachment=function(t){var n;return n=e.Text.textForAttachmentWithAttributes(t,this.currentAttributes),this.insertText(n)},p.prototype.deleteInDirection=function(t){var e,n,i,o,r,s,a;return o=this.getLocationRange(),r=this.getSelectedRange(),(s=u(r))?i="backward"===t&&0===o[0].offset:a=o[0].index!==o[1].index,!(i&&this.canDecreaseBlockAttributeLevel()&&(n=this.getBlock(),n.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(r[0]),n.isEmpty()))&&(s&&(r=this.getExpandedRangeInDirection(t),"backward"===t&&(e=this.getAttachmentAtRange(r))),e?(this.editAttachment(e),!1):(this.setDocument(this.document.removeTextAtRange(r)),this.setSelection(r[0]),!i&&!a&&void 0))},p.prototype.moveTextFromRange=function(t){var e;return e=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(t,e)),this.setSelection(e)},p.prototype.removeAttachment=function(t){var e;return(e=this.document.getRangeOfAttachment(t))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(e)),this.setSelection(e[0])):void 0},p.prototype.removeLastBlockAttribute=function(){var t,e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],t=this.document.getBlockAtPosition(e),this.removeCurrentAttribute(t.getLastAttribute()),this.setSelection(i)},f=" ",p.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(f)},p.prototype.selectPlaceholder=function(){return null!=this.placeholderPosition?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+f.length]),this.getSelectedRange()):void 0},p.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},p.prototype.hasCurrentAttribute=function(t){var e;return null!=(e=this.currentAttributes[t])&&!1!==e},p.prototype.toggleCurrentAttribute=function(t){var e;return(e=!this.currentAttributes[t])?this.setCurrentAttribute(t,e):this.removeCurrentAttribute(t)},p.prototype.canSetCurrentAttribute=function(t){return o(t)?this.canSetCurrentBlockAttribute(t):this.canSetCurrentTextAttribute(t)},p.prototype.canSetCurrentTextAttribute=function(t){switch(t){case"href":return!this.selectionContainsAttachmentWithAttribute(t);default:return!0}},p.prototype.canSetCurrentBlockAttribute=function(){var t;if(t=this.getBlock())return!t.isTerminalBlock()},p.prototype.setCurrentAttribute=function(t,e){return o(t)?this.setBlockAttribute(t,e):(this.setTextAttribute(t,e),this.currentAttributes[t]=e,this.notifyDelegateOfCurrentAttributesChange())},p.prototype.setTextAttribute=function(t,n){var i,o;if(i=this.getSelectedRange())return i[0]!==i[1]?this.setDocument(this.document.addAttributeAtRange(t,n,i)):"href"===t?(o=e.Text.textForStringWithAttributes(n,{href:n}),this.insertText(o)):void 0},p.prototype.setBlockAttribute=function(t,e){var n;if(n=this.getSelectedRange())return this.canSetCurrentAttribute(t)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(t,e,n)),this.setSelection(n)):void 0},p.prototype.removeCurrentAttribute=function(t){return o(t)?(this.removeBlockAttribute(t),this.updateCurrentAttributes()):(this.removeTextAttribute(t),delete this.currentAttributes[t],this.notifyDelegateOfCurrentAttributesChange())},p.prototype.removeTextAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},p.prototype.removeBlockAttribute=function(t){var e;if(e=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(t,e))},p.prototype.canDecreaseNestingLevel=function(){var t;return(null!=(t=this.getBlock())?t.getNestingLevel():void 0)>0},p.prototype.canIncreaseNestingLevel=function(){var e,n,i;if(e=this.getBlock())return null!=(i=o(e.getLastNestableAttribute()))&&i.listAttribute?(n=this.getPreviousBlock())?t(n.getListItemAttributes(),e.getListItemAttributes()):void 0:e.getNestingLevel()>0},p.prototype.decreaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.decreaseNestingLevel()))},p.prototype.increaseNestingLevel=function(){var t;if(t=this.getBlock())return this.setDocument(this.document.replaceBlock(t,t.increaseNestingLevel()))},p.prototype.canDecreaseBlockAttributeLevel=function(){var t;return(null!=(t=this.getBlock())?t.getAttributeLevel():void 0)>0},p.prototype.decreaseBlockAttributeLevel=function(){var t,e;return(t=null!=(e=this.getBlock())?e.getLastAttribute():void 0)?this.removeCurrentAttribute(t):void 0},p.prototype.decreaseListLevel=function(){var t,e,n,i,o,r;for(r=this.getSelectedRange()[0],n=o=this.document.locationFromPosition(r).index,t=this.getBlock().getAttributeLevel();(e=this.document.getBlockAtIndex(n+1))&&e.isListItem()&&e.getAttributeLevel()>t;)n++;return r=this.document.positionFromLocation({index:o,offset:0}),i=this.document.positionFromLocation({index:n,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([r,i]))},p.prototype.updateCurrentAttributes=function(){var t,e,n,o,r,s;if(s=this.getSelectedRange({ignoreLock:!0})){for(e=this.document.getCommonAttributesAtRange(s),n=0,o=(r=i()).length;o>n;n++)e[t=r[n]]||this.canSetCurrentAttribute(t)||(e[t]=!1);if(!a(e,this.currentAttributes))return this.currentAttributes=e,this.notifyDelegateOfCurrentAttributesChange()}},p.prototype.getCurrentAttributes=function(){return n.call({},this.currentAttributes)},p.prototype.getCurrentTextAttributes=function(){var t,e,n,i;for(e in t={},n=this.currentAttributes)i=n[e],r(e)&&(t[e]=i);return t},p.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},p.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},p.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},p.proxyMethod("getSelectionManager().getPointRange"),p.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),p.proxyMethod("getSelectionManager().locationIsCursorTarget"),p.proxyMethod("getSelectionManager().selectionIsExpanded"),p.proxyMethod("delegate?.getSelectionManager"),p.prototype.setSelection=function(t){var e,n;return e=this.document.locationRangeFromRange(t),null!=(n=this.delegate)?n.compositionDidRequestChangingSelectionToLocationRange(e):void 0},p.prototype.getSelectedRange=function(){var t;return(t=this.getLocationRange())?this.document.rangeFromLocationRange(t):void 0},p.prototype.setSelectedRange=function(t){var e;return e=this.document.locationRangeFromRange(t),this.getSelectionManager().setLocationRange(e)},p.prototype.getPosition=function(){var t;return(t=this.getLocationRange())?this.document.positionFromLocation(t[0]):void 0},p.prototype.getLocationRange=function(t){var e;return null!=(e=this.getSelectionManager().getLocationRange(t))?e:s({index:0,offset:0})},p.prototype.getExpandedRangeInDirection=function(t){var e,n,i;return i=(n=this.getSelectedRange())[0],e=n[1],"backward"===t?i=this.translateUTF16PositionFromOffset(i,-1):e=this.translateUTF16PositionFromOffset(e,1),s([i,e])},p.prototype.moveCursorInDirection=function(t){var e,n,i,o;return this.editingAttachment?i=this.document.getRangeOfAttachment(this.editingAttachment):(o=this.getSelectedRange(),i=this.getExpandedRangeInDirection(t),n=!l(o,i)),this.setSelectedRange("backward"===t?i[0]:i[1]),n&&(e=this.getAttachmentAtRange(i))?this.editAttachment(e):void 0},p.prototype.expandSelectionInDirection=function(t){var e;return e=this.getExpandedRangeInDirection(t),this.setSelectedRange(e)},p.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},p.prototype.expandSelectionAroundCommonAttribute=function(t){var e,n;return e=this.getPosition(),n=this.document.getRangeOfCommonAttributeAtPosition(t,e),this.setSelectedRange(n)},p.prototype.selectionContainsAttachmentWithAttribute=function(t){var e,n,i,o;if(o=this.getSelectedRange()){for(e=0,n=(i=this.document.getDocumentAtRange(o).getAttachments()).length;n>e;e++)if(i[e].hasAttribute(t))return!0;return!1}},p.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},p.prototype.positionIsCursorTarget=function(t){var e;return(e=this.document.locationFromPosition(t))?this.locationIsCursorTarget(e):void 0},p.prototype.positionIsBlockBreak=function(t){var e;return null!=(e=this.document.getPieceAtPosition(t))?e.isBlockBreak():void 0},p.prototype.getSelectedDocument=function(){var t;return(t=this.getSelectedRange())?this.document.getDocumentAtRange(t):void 0},p.prototype.getAttachments=function(){return this.attachments.slice(0)},p.prototype.refreshAttachments=function(){var t,e,n,i,o,r,s,a,u,l,h,d;for(n=this.document.getAttachments(),t=(a=c(this.attachments,n)).added,h=a.removed,this.attachments=n,i=0,r=h.length;r>i;i++)(e=h[i]).delegate=null,null!=(u=this.delegate)&&"function"==typeof u.compositionDidRemoveAttachment&&u.compositionDidRemoveAttachment(e);for(d=[],o=0,s=t.length;s>o;o++)(e=t[o]).delegate=this,d.push(null!=(l=this.delegate)&&"function"==typeof l.compositionDidAddAttachment?l.compositionDidAddAttachment(e):void 0);return d},p.prototype.attachmentDidChangeAttributes=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidEditAttachment?e.compositionDidEditAttachment(t):void 0},p.prototype.attachmentDidChangePreviewURL=function(t){var e;return this.revision++,null!=(e=this.delegate)&&"function"==typeof e.compositionDidChangeAttachmentPreviewURL?e.compositionDidChangeAttachmentPreviewURL(t):void 0},p.prototype.editAttachment=function(t){var e;if(t!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=t,null!=(e=this.delegate)&&"function"==typeof e.compositionDidStartEditingAttachment?e.compositionDidStartEditingAttachment(this.editingAttachment):void 0},p.prototype.stopEditingAttachment=function(){var t;if(this.editingAttachment)return null!=(t=this.delegate)&&"function"==typeof t.compositionDidStopEditingAttachment&&t.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},p.prototype.canEditAttachmentCaption=function(){var t;return null!=(t=this.editingAttachment)?t.isPreviewable():void 0},p.prototype.updateAttributesForAttachment=function(t,e){return this.setDocument(this.document.updateAttributesForAttachment(t,e))},p.prototype.removeAttributeForAttachment=function(t,e){return this.setDocument(this.document.removeAttributeForAttachment(t,e))},p.prototype.breakFormattedBlock=function(t){var n,i,o,r,s;return i=t.document,n=t.block,s=[(r=t.startPosition)-1,r],n.getBlockBreakPosition()===t.startLocation.offset?(n.breaksOnReturn()&&"\n"===t.nextCharacter?r+=1:i=i.removeTextAtRange(s),s=[r,r]):"\n"===t.nextCharacter?"\n"===t.previousCharacter?s=[r-1,r+1]:(s=[r,r+1],r+=1):t.startLocation.offset-1!=0&&(r+=1),o=new e.Document([n.removeLastAttribute().copyWithoutText()]),this.setDocument(i.insertDocumentAtRange(o,s)),this.setSelection(r)},p.prototype.getPreviousBlock=function(){var t,e;return(e=this.getLocationRange())&&(t=e[0].index)>0?this.document.getBlockAtIndex(t-1):void 0},p.prototype.getBlock=function(){var t;return(t=this.getLocationRange())?this.document.getBlockAtIndex(t[0].index):void 0},p.prototype.getAttachmentAtRange=function(t){var n;return(n=this.document.getDocumentAtRange(t)).toString()===e.OBJECT_REPLACEMENT_CHARACTER+"\n"?n.getAttachments()[0]:void 0},p.prototype.notifyDelegateOfCurrentAttributesChange=function(){var t;return null!=(t=this.delegate)&&"function"==typeof t.compositionDidChangeCurrentAttributes?t.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},p.prototype.notifyDelegateOfInsertionAtRange=function(t){var e;return null!=(e=this.delegate)&&"function"==typeof e.compositionDidPerformInsertionAtRange?e.compositionDidPerformInsertionAtRange(t):void 0},p.prototype.translateUTF16PositionFromOffset=function(t,e){var n,i;return n=(i=this.document.toUTF16String()).offsetFromUCS2Offset(t),i.offsetToUCS2Offset(n+e)},p}(e.BasicObject)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.UndoManager=function(e){function n(t){this.composition=t,this.undoEntries=[],this.redoEntries=[]}var i;return t(n,e),n.prototype.recordUndoEntry=function(t,e){var n,o,r,s,a;return o=(s=null!=e?e:{}).context,n=s.consolidatable,r=this.undoEntries.slice(-1)[0],n&&i(r,t,o)?void 0:(a=this.createEntry({description:t,context:o}),this.undoEntries.push(a),this.redoEntries=[])},n.prototype.undo=function(){var t,e;return(e=this.undoEntries.pop())?(t=this.createEntry(e),this.redoEntries.push(t),this.composition.loadSnapshot(e.snapshot)):void 0},n.prototype.redo=function(){var t,e;return(t=this.redoEntries.pop())?(e=this.createEntry(t),this.undoEntries.push(e),this.composition.loadSnapshot(t.snapshot)):void 0},n.prototype.canUndo=function(){return this.undoEntries.length>0},n.prototype.canRedo=function(){return this.redoEntries.length>0},n.prototype.createEntry=function(t){var e,n,i;return n=(i=null!=t?t:{}).description,e=i.context,{description:null!=n?n.toString():void 0,context:JSON.stringify(e),snapshot:this.composition.getSnapshot()}},i=function(t,e,n){return(null!=t?t.description:void 0)===(null!=e?e.toString():void 0)&&(null!=t?t.context:void 0)===JSON.stringify(n)},n}(e.BasicObject)}.call(this),function(){e.Editor=function(){function t(t,n,i){this.composition=t,this.selectionManager=n,this.element=i,this.undoManager=new e.UndoManager(this.composition)}return t.prototype.loadDocument=function(t){return this.loadSnapshot({document:t,selectedRange:[0,0]})},t.prototype.loadHTML=function(t){return null==t&&(t=""),this.loadDocument(e.Document.fromHTML(t,{referenceElement:this.element}))},t.prototype.loadJSON=function(t){var n,i;return n=t.document,i=t.selectedRange,n=e.Document.fromJSON(n),this.loadSnapshot({document:n,selectedRange:i})},t.prototype.loadSnapshot=function(t){return this.undoManager=new e.UndoManager(this.composition),this.composition.loadSnapshot(t)},t.prototype.getDocument=function(){return this.composition.document},t.prototype.getSelectedDocument=function(){return this.composition.getSelectedDocument()},t.prototype.getSnapshot=function(){return this.composition.getSnapshot()},t.prototype.toJSON=function(){return this.getSnapshot()},t.prototype.deleteInDirection=function(t){return this.composition.deleteInDirection(t)},t.prototype.insertAttachment=function(t){return this.composition.insertAttachment(t)},t.prototype.insertDocument=function(t){return this.composition.insertDocument(t)},t.prototype.insertFile=function(t){return this.composition.insertFile(t)},t.prototype.insertHTML=function(t){return this.composition.insertHTML(t)},t.prototype.insertString=function(t){return this.composition.insertString(t)},t.prototype.insertText=function(t){return this.composition.insertText(t)},t.prototype.insertLineBreak=function(){return this.composition.insertLineBreak()},t.prototype.getSelectedRange=function(){return this.composition.getSelectedRange()},t.prototype.getPosition=function(){return this.composition.getPosition()},t.prototype.getClientRectAtPosition=function(t){var e;return e=this.getDocument().locationRangeFromRange([t,t+1]),this.selectionManager.getClientRectAtLocationRange(e)},t.prototype.expandSelectionInDirection=function(t){return this.composition.expandSelectionInDirection(t)},t.prototype.moveCursorInDirection=function(t){return this.composition.moveCursorInDirection(t)},t.prototype.setSelectedRange=function(t){return this.composition.setSelectedRange(t)},t.prototype.activateAttribute=function(t,e){return null==e&&(e=!0),this.composition.setCurrentAttribute(t,e)},t.prototype.attributeIsActive=function(t){return this.composition.hasCurrentAttribute(t)},t.prototype.canActivateAttribute=function(t){return this.composition.canSetCurrentAttribute(t)},t.prototype.deactivateAttribute=function(t){return this.composition.removeCurrentAttribute(t)},t.prototype.canDecreaseNestingLevel=function(){return this.composition.canDecreaseNestingLevel()},t.prototype.canIncreaseNestingLevel=function(){return this.composition.canIncreaseNestingLevel()},t.prototype.decreaseNestingLevel=function(){return this.canDecreaseNestingLevel()?this.composition.decreaseNestingLevel():void 0},t.prototype.increaseNestingLevel=function(){return this.canIncreaseNestingLevel()?this.composition.increaseNestingLevel():void 0},t.prototype.canDecreaseIndentationLevel=function(){return this.canDecreaseNestingLevel()},t.prototype.canIncreaseIndentationLevel=function(){return this.canIncreaseNestingLevel()},t.prototype.decreaseIndentationLevel=function(){return this.decreaseNestingLevel()},t.prototype.increaseIndentationLevel=function(){return this.increaseNestingLevel()},t.prototype.canRedo=function(){return this.undoManager.canRedo()},t.prototype.canUndo=function(){return this.undoManager.canUndo()},t.prototype.recordUndoEntry=function(t,e){var n,i,o;return i=(o=null!=e?e:{}).context,n=o.consolidatable,this.undoManager.recordUndoEntry(t,{context:i,consolidatable:n})},t.prototype.redo=function(){return this.canRedo()?this.undoManager.redo():void 0},t.prototype.undo=function(){return this.canUndo()?this.undoManager.undo():void 0},t}()}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.ManagedAttachment=function(e){function n(t,e){var n;this.attachmentManager=t,this.attachment=e,n=this.attachment,this.id=n.id,this.file=n.file}return t(n,e),n.prototype.remove=function(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)},n.proxyMethod("attachment.getAttribute"),
n.proxyMethod("attachment.hasAttribute"),n.proxyMethod("attachment.setAttribute"),n.proxyMethod("attachment.getAttributes"),n.proxyMethod("attachment.setAttributes"),n.proxyMethod("attachment.isPending"),n.proxyMethod("attachment.isPreviewable"),n.proxyMethod("attachment.getURL"),n.proxyMethod("attachment.getHref"),n.proxyMethod("attachment.getFilename"),n.proxyMethod("attachment.getFilesize"),n.proxyMethod("attachment.getFormattedFilesize"),n.proxyMethod("attachment.getExtension"),n.proxyMethod("attachment.getContentType"),n.proxyMethod("attachment.getFile"),n.proxyMethod("attachment.setFile"),n.proxyMethod("attachment.releaseFile"),n.proxyMethod("attachment.getUploadProgress"),n.proxyMethod("attachment.setUploadProgress"),n}(e.BasicObject)}.call(this),function(){var t=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;e.AttachmentManager=function(n){function i(t){var e,n,i;for(null==t&&(t=[]),this.managedAttachments={},n=0,i=t.length;i>n;n++)e=t[n],this.manageAttachment(e)}return t(i,n),i.prototype.getAttachments=function(){var t,e,n,i;for(e in i=[],n=this.managedAttachments)t=n[e],i.push(t);return i},i.prototype.manageAttachment=function(t){var n,i;return null!=(n=this.managedAttachments)[i=t.id]?n[i]:n[i]=new e.ManagedAttachment(this,t)},i.prototype.attachmentIsManaged=function(t){return t.id in this.managedAttachments},i.prototype.requestRemovalOfAttachment=function(t){var e;return this.attachmentIsManaged(t)&&null!=(e=this.delegate)&&"function"==typeof e.attachmentManagerDidRequestRemovalOfAttachment?e.attachmentManagerDidRequestRemovalOfAttachment(t):void 0},i.prototype.unmanageAttachment=function(t){var e;return e=this.managedAttachments[t.id],delete this.managedAttachments[t.id],e},i}(e.BasicObject)}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h;t=e.elementContainsNode,n=e.findChildIndexOfNode,r=e.nodeIsBlockStart,s=e.nodeIsBlockStartComment,o=e.nodeIsBlockContainer,a=e.nodeIsCursorTarget,u=e.nodeIsEmptyTextNode,l=e.nodeIsTextNode,i=e.nodeIsAttachmentElement,c=e.tagName,h=e.walkTree,e.LocationMapper=function(){function e(t){this.element=t}var d,p,f,m;return e.prototype.findLocationFromContainerAndOffset=function(e,i,o){var s,u,c,d,m,g,v;for(g=(null!=o?o:{strict:!0}).strict,u=0,c=!1,d={index:0,offset:0},(s=this.findAttachmentElementParentForNode(e))&&(e=s.parentNode,i=n(s)),v=h(this.element,{usingFilter:f});v.nextNode();){if((m=v.currentNode)===e&&l(e)){a(m)||(d.offset+=i);break}if(m.parentNode===e){if(u++===i)break}else if(!t(e,m)&&u>0)break;r(m,{strict:g})?(c&&d.index++,d.offset=0,c=!0):d.offset+=p(m)}return d},e.prototype.findContainerAndOffsetFromLocation=function(t){var e,i,s,a,u;if(0===t.index&&0===t.offset){for(e=this.element,a=0;e.firstChild;)if(e=e.firstChild,o(e)){a=1;break}return[e,a]}if(i=(u=this.findNodeAndOffsetFromLocation(t))[0],s=u[1],i){if(l(i))e=i,i.textContent,a=t.offset-s;else{if(e=i.parentNode,!r(i.previousSibling)&&!o(e))for(;i===e.lastChild&&(i=e,e=e.parentNode,!o(e)););a=n(i),0!==t.offset&&a++}return[e,a]}},e.prototype.findNodeAndOffsetFromLocation=function(t){var e,n,i,o,r,s,u,c;for(u=0,n=0,i=(c=this.getSignificantNodesForIndex(t.index)).length;i>n;n++){if(e=c[n],o=p(e),t.offset<=u+o)if(l(e)){if(r=e,s=u,t.offset===s&&a(r))break}else r||(r=e,s=u);if((u+=o)>t.offset)break}return[r,s]},e.prototype.findAttachmentElementParentForNode=function(t){for(;t&&t!==this.element;){if(i(t))return t;t=t.parentNode}},e.prototype.getSignificantNodesForIndex=function(t){var e,n,i,o,r;for(i=[],r=h(this.element,{usingFilter:d}),o=!1;r.nextNode();)if(n=r.currentNode,s(n)){if(null!=e?e++:e=0,e===t)o=!0;else if(o)break}else o&&i.push(n);return i},p=function(t){return t.nodeType===Node.TEXT_NODE?a(t)?0:t.textContent.length:"br"===c(t)||i(t)?1:0},d=function(t){return m(t)===NodeFilter.FILTER_ACCEPT?f(t):NodeFilter.FILTER_REJECT},m=function(t){return u(t)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},f=function(t){return i(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},e}()}.call(this),function(){var t,n,i=[].slice;t=e.getDOMRange,n=e.setDOMRange,e.PointMapper=function(){function e(){}return e.prototype.createDOMRangeFromPoint=function(e){var i,o,r,s,a,u,l,c;if(l=e.x,c=e.y,document.caretPositionFromPoint)return r=(a=document.caretPositionFromPoint(l,c)).offsetNode,o=a.offset,(i=document.createRange()).setStart(r,o),i;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(l,c);if(document.body.createTextRange){s=t();try{(u=document.body.createTextRange()).moveToPoint(l,c),u.select()}catch(h){}return i=t(),n(s),i}},e.prototype.getClientRectsForDOMRange=function(t){var e;return[(e=i.call(t.getClientRects()))[0],e[e.length-1]]},e}()}.call(this),function(){var t,n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function n(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},o={}.hasOwnProperty,r=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};t=e.getDOMRange,e.SelectionChangeObserver=function(e){function o(){this.run=n(this.run,this),this.update=n(this.update,this),this.selectionManagers=[]}var s;return i(o,e),o.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},o.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},o.prototype.registerSelectionManager=function(t){return r.call(this.selectionManagers,t)<0?(this.selectionManagers.push(t),this.start()):void 0},o.prototype.unregisterSelectionManager=function(t){var e;return this.selectionManagers=function(){var n,i,o,r;for(r=[],n=0,i=(o=this.selectionManagers).length;i>n;n++)(e=o[n])!==t&&r.push(e);return r}.call(this),0===this.selectionManagers.length?this.stop():void 0},o.prototype.notifySelectionManagersOfSelectionChange=function(){var t,e,n,i,o;for(i=[],t=0,e=(n=this.selectionManagers).length;e>t;t++)o=n[t],i.push(o.selectionDidChange());return i},o.prototype.update=function(){var e;return e=t(),s(e,this.domRange)?void 0:(this.domRange=e,this.notifySelectionManagersOfSelectionChange())},o.prototype.reset=function(){return this.domRange=null,this.update()},o.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0},s=function(t,e){return(null!=t?t.startContainer:void 0)===(null!=e?e.startContainer:void 0)&&(null!=t?t.startOffset:void 0)===(null!=e?e.startOffset:void 0)&&(null!=t?t.endContainer:void 0)===(null!=e?e.endContainer:void 0)&&(null!=t?t.endOffset:void 0)===(null!=e?e.endOffset:void 0)},o}(e.BasicObject),null==e.selectionChangeObserver&&(e.selectionChangeObserver=new e.SelectionChangeObserver)}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h=function(t,e){return function(){return t.apply(e,arguments)}},d=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;i=e.getDOMSelection,n=e.getDOMRange,c=e.setDOMRange,t=e.elementContainsNode,s=e.nodeIsCursorTarget,r=e.innerElementIsActive,o=e.handleEvent,a=e.normalizeRange,u=e.rangeIsCollapsed,l=e.rangesAreEqual,e.SelectionManager=function(p){function f(t){this.element=t,this.selectionDidChange=h(this.selectionDidChange,this),this.didMouseDown=h(this.didMouseDown,this),this.locationMapper=new e.LocationMapper(this.element),this.pointMapper=new e.PointMapper,this.lockCount=0,o("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return d(f,p),f.prototype.getLocationRange=function(t){var e;return null==t&&(t={}),!1===t.strict?this.createLocationRangeFromDOMRange(n(),{strict:!1}):t.ignoreLock?this.currentLocationRange:null!=(e=this.lockedLocationRange)?e:this.currentLocationRange},f.prototype.setLocationRange=function(t){var e;if(!this.lockedLocationRange)return t=a(t),(e=this.createDOMRangeFromLocationRange(t))?(c(e),this.updateCurrentLocationRange(t)):void 0},f.prototype.setLocationRangeFromPointRange=function(t){var e,n;return t=a(t),n=this.getLocationAtPoint(t[0]),e=this.getLocationAtPoint(t[1]),this.setLocationRange([n,e])},f.prototype.getClientRectAtLocationRange=function(t){var e;return(e=this.createDOMRangeFromLocationRange(t))?this.getClientRectsForDOMRange(e)[1]:void 0},f.prototype.locationIsCursorTarget=function(t){var e,n;return e=(n=this.findNodeAndOffsetFromLocation(t))[0],n[1],s(e)},f.prototype.lock=function(){return 0==this.lockCount++?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},f.prototype.unlock=function(){var t;return 0==--this.lockCount&&(t=this.lockedLocationRange,this.lockedLocationRange=null,null!=t)?this.setLocationRange(t):void 0},f.prototype.clearSelection=function(){var t;return null!=(t=i())?t.removeAllRanges():void 0},f.prototype.selectionIsCollapsed=function(){var t;return!0===(null!=(t=n())?t.collapsed:void 0)},f.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},f.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),f.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),f.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),f.proxyMethod("pointMapper.createDOMRangeFromPoint"),f.proxyMethod("pointMapper.getClientRectsForDOMRange"),f.prototype.didMouseDown=function(){return this.pauseTemporarily()},f.prototype.pauseTemporarily=function(){var e,n,i,r,s;return this.paused=!0,s=this,n=function(){var e,n;for(s.paused=!1,clearTimeout(r),e=0,n=i.length;n>e;e++)i[e].destroy();return t(document,s.element)?s.selectionDidChange():void 0},r=setTimeout(n,200),i=function(){var t,i,r,s;for(s=[],t=0,i=(r=["mousemove","keydown"]).length;i>t;t++)e=r[t],s.push(o(e,{onElement:document,withCallback:n}));return s}()},f.prototype.selectionDidChange=function(){return this.paused||r(this.element)?void 0:this.updateCurrentLocationRange()},f.prototype.updateCurrentLocationRange=function(t){var e;return(null!=t?t:t=this.createLocationRangeFromDOMRange(n()))&&!l(t,this.currentLocationRange)?(this.currentLocationRange=t,null!=(e=this.delegate)&&"function"==typeof e.locationRangeDidChange?e.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},f.prototype.createDOMRangeFromLocationRange=function(t){var e,n,i,o;return i=this.findContainerAndOffsetFromLocation(t[0]),n=u(t)?i:null!=(o=this.findContainerAndOffsetFromLocation(t[1]))?o:i,null!=i&&null!=n?((e=document.createRange()).setStart.apply(e,i),e.setEnd.apply(e,n),e):void 0},f.prototype.createLocationRangeFromDOMRange=function(t,e){var n,i;if(null!=t&&this.domRangeWithinElement(t)&&(i=this.findLocationFromContainerAndOffset(t.startContainer,t.startOffset,e)))return t.collapsed||(n=this.findLocationFromContainerAndOffset(t.endContainer,t.endOffset,e)),a([i,n])},f.prototype.getLocationAtPoint=function(t){var e,n;return(e=this.createDOMRangeFromPoint(t))&&null!=(n=this.createLocationRangeFromDOMRange(e))?n[0]:void 0},f.prototype.domRangeWithinElement=function(e){return e.collapsed?t(this.element,e.startContainer):t(this.element,e.startContainer)&&t(this.element,e.endContainer)},f}(e.BasicObject)}.call(this),function(){var t,n,i,o=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty,s=[].slice;n=e.rangeIsCollapsed,i=e.rangesAreEqual,t=e.objectsAreEqual,e.EditorController=function(r){function a(t){var n,i;this.editorElement=t.editorElement,n=t.document,i=t.html,this.selectionManager=new e.SelectionManager(this.editorElement),this.selectionManager.delegate=this,this.composition=new e.Composition,this.composition.delegate=this,this.attachmentManager=new e.AttachmentManager(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=new e.InputController(this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new e.CompositionController(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new e.ToolbarController(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new e.Editor(this.composition,this.selectionManager,this.editorElement),null!=n?this.editor.loadDocument(n):this.editor.loadHTML(i)}return o(a,r),a.prototype.registerSelectionManager=function(){return e.selectionChangeObserver.registerSelectionManager(this.selectionManager)},a.prototype.unregisterSelectionManager=function(){return e.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},a.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},a.prototype.compositionDidChangeCurrentAttributes=function(t){return this.currentAttributes=t,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},a.prototype.compositionDidPerformInsertionAtRange=function(t){return this.pasting?this.pastedRange=t:void 0},a.prototype.compositionShouldAcceptFile=function(t){return this.notifyEditorElement("file-accept",{file:t})},a.prototype.compositionDidAddAttachment=function(t){var e;return e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-add",{attachment:e})},a.prototype.compositionDidEditAttachment=function(t){var e;return this.compositionController.rerenderViewForObject(t),e=this.attachmentManager.manageAttachment(t),this.notifyEditorElement("attachment-edit",{attachment:e}),this.notifyEditorElement("change")},a.prototype.compositionDidChangeAttachmentPreviewURL=function(t){return this.compositionController.invalidateViewForObject(t),this.notifyEditorElement("change")},a.prototype.compositionDidRemoveAttachment=function(t){var e;return e=this.attachmentManager.unmanageAttachment(t),this.notifyEditorElement("attachment-remove",{attachment:e})},a.prototype.compositionDidStartEditingAttachment=function(t){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(t),this.compositionController.installAttachmentEditorForAttachment(t),this.selectionManager.setLocationRange(this.attachmentLocationRange)},a.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},a.prototype.compositionDidRequestChangingSelectionToLocationRange=function(t){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=t,this.compositionRevisionWhenLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},a.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},a.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},a.prototype.getSelectionManager=function(){return this.selectionManager},a.proxyMethod("getSelectionManager().setLocationRange"),a.proxyMethod("getSelectionManager().getLocationRange"),a.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},a.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},a.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},a.prototype.compositionControllerDidRender=function(){return null!=this.requestedLocationRange&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},a.prototype.compositionControllerDidFocus=function(){return this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},a.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},a.prototype.compositionControllerDidSelectAttachment=function(t){return this.composition.editAttachment(t)},a.prototype.compositionControllerDidRequestDeselectingAttachment=function(t){var e,n;return e=null!=(n=this.attachmentLocationRange)?n:this.composition.document.getLocationRangeOfAttachment(t),this.selectionManager.setLocationRange(e[1])},a.prototype.compositionControllerWillUpdateAttachment=function(t){return this.editor.recordUndoEntry("Edit Attachment",{context:t.id,consolidatable:!0})},a.prototype.compositionControllerDidRequestRemovalOfAttachment=function(t){return this.removeAttachment(t)},a.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},a.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},a.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},a.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},a.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},a.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},a.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},a.prototype.inputControllerWillPaste=function(t){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:t})},a.prototype.inputControllerDidPaste=function(t){return t.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:t})},a.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},a.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},a.prototype.inputControllerDidReceiveKeyboardCommand=function(t){return this.toolbarController.applyKeyboardCommand(t)},a.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},a.prototype.inputControllerDidReceiveDragOverPoint=function(t){return this.selectionManager.setLocationRangeFromPointRange(t)},a.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},a.prototype.locationRangeDidChange=function(t){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!i(this.attachmentLocationRange,t)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},a.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},a.prototype.toolbarDidInvokeAction=function(t){return this.invokeAction(t)},a.prototype.toolbarDidToggleAttribute=function(t){return this.recordFormattingUndoEntry(),this.composition.toggleCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},a.prototype.toolbarDidUpdateAttribute=function(t,e){return this.recordFormattingUndoEntry(),this.composition.setCurrentAttribute(t,e),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},a.prototype.toolbarDidRemoveAttribute=function(t){return this.recordFormattingUndoEntry(),this.composition.removeCurrentAttribute(t),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},a.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},a.prototype.toolbarDidShowDialog=function(t){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:t})},a.prototype.toolbarDidHideDialog=function(t){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:t})},a.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},a.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},a.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},increaseBlockLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseBlockLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}}},a.prototype.canInvokeAction=function(t){var e,n;return!!this.actionIsExternal(t)||!!(null!=(e=this.actions[t])&&null!=(n=e.test)?n.call(this):void 0)},a.prototype.invokeAction=function(t){var e,n;return this.actionIsExternal(t)?this.notifyEditorElement("action-invoke",{actionName:t}):null!=(e=this.actions[t])&&null!=(n=e.perform)?n.call(this):void 0},a.prototype.actionIsExternal=function(t){return/^x-./.test(t)},a.prototype.getCurrentActions=function(){var t,e;for(t in e={},this.actions)e[t]=this.canInvokeAction(t);return e},a.prototype.updateCurrentActions=function(){var e;return e=this.getCurrentActions(),t(e,this.currentActions)?void 0:(this.currentActions=e,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},a.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},a.prototype.render=function(){return this.compositionController.render()},a.prototype.updateInputElement=function(){var t,n;return t=this.compositionController.getSerializableElement(),n=e.serializeToContentType(t,"text/html"),this.editorElement.setInputElementValue(n)},a.prototype.notifyEditorElement=function(t,e){switch(t){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(t,e)},a.prototype.removeAttachment=function(t){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(t),this.render()},a.prototype.recordFormattingUndoEntry=function(){var t;return t=this.selectionManager.getLocationRange(),n(t)?void 0:this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0})},a.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},a.prototype.getUndoContext=function(){var t;return t=1<=arguments.length?s.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(s.call(t))},a.prototype.getLocationContext=function(){var t;return t=this.selectionManager.getLocationRange(),n(t)?t[0].index:t},a.prototype.getTimeContext=function(){return e.config.undoInterval>0?Math.floor((new Date).getTime()/e.config.undoInterval):0},a.prototype.isFocused=function(){var t;return this.editorElement===(null!=(t=this.editorElement.ownerDocument)?t.activeElement:void 0)},a}(e.Controller)}.call(this),function(){var t,n,i,o,r,s,a,u,l,c,h,d,p;o=e.makeElement,r=e.triggerEvent,n=e.handleEvent,i=e.handleEventOnce,t=e.AttachmentView.attachmentSelector,e.registerElement("trix-editor",(h=0,s=function(t){return!document.querySelector(":focus")&&t.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===t?t.focus():void 0},d=function(t){return t.hasAttribute("contenteditable")?void 0:(t.setAttribute("contenteditable",""),i("focus",{onElement:t,withCallback:function(){return u(t)}}))},u=function(t){return c(t),p(t)},c=function(t){return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("enableObjectResizing"):void 0)?(document.execCommand("enableObjectResizing",!1,!1),n("mscontrolselect",{onElement:t,preventDefault:!0})):void 0},p=function(){var t;return("function"==typeof document.queryCommandSupported?document.queryCommandSupported("DefaultParagraphSeparator"):void 0)&&("div"===(t=e.config.blockAttributes["default"].tagName)||"p"===t)?document.execCommand("DefaultParagraphSeparator",!1,t):void 0},a=/Trident.*rv:11/.test(navigator.userAgent),{defaultCSS:"%t:empty:not(:focus)::before {\n  content: attr(placeholder);\n  color: graytext;\n}\n\n%t a[contenteditable=false] {\n  cursor: text;\n}\n\n%t img {\n  max-width: 100%;\n  height: auto;\n}\n\n%t "+t+" figcaption textarea {\n  resize: none;\n}\n\n%t "+t+" figcaption textarea.trix-autoresize-clone {\n  position: absolute;\n  left: -9999px;\n  max-height: 0px;\n}\n\n%t "+t+" figcaption[data-trix-placeholder]:empty::before {\n  content: attr(data-trix-placeholder);\n  color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n  display: "+(l=a?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"}).display+" !important;\n  width: "+l.width+" !important;\n  padding: 0 !important;\n  margin: 0 !important;\n  border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n  vertical-align: top !important;\n  margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n  vertical-align: bottom !important;\n  margin-right: -1px !important;\n}",trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++h),this.trixId)}},toolbarElement:{get:function(){var t,e,n;return this.hasAttribute("toolbar")?null!=(e=this.ownerDocument)?e.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(n="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",n),t=o("trix-toolbar",{id:n}),this.parentNode.insertBefore(t,this),t):void 0}},inputElement:{get:function(){var t,e,n;return this.hasAttribute("input")?null!=(n=this.ownerDocument)?n.getElementById(this.getAttribute("input")):void 0:this.parentNode?(e="trix-input-"+this.trixId,this.setAttribute("input",e),t=o("input",{type:"hidden",id:e}),this.parentNode.insertBefore(t,this.nextElementSibling),t):void 0}},editor:{get:function(){var t;return null!=(t=this.editorController)?t.editor:void 0}},name:{get:function(){var t;return null!=(t=this.inputElement)?t.name:void 0}},value:{get:function(){var t;return null!=(t=this.inputElement)?t.value:void 0},set:function(t){var e;return this.defaultValue=t,null!=(e=this.editor)?e.loadHTML(this.defaultValue):void 0}},notify:function(t,e){return this.editorController?r("trix-"+t,{onElement:this,attributes:e}):void 0},setInputElementValue:function(t){var e;return null!=(e=this.inputElement)?e.value=t:void 0},createdCallback:function(){return d(this)},attachedCallback:function(){return this.hasAttribute("data-trix-internal")?void 0:(null==this.editorController&&(this.editorController=new e.EditorController({editorElement:this,html:this.defaultValue=this.value})),this.editorController.registerSelectionManager(),this.registerResetListener(),s(this),requestAnimationFrame((t=this,function(){return t.notify("initialize")})));var t},detachedCallback:function(){var t;return null!=(t=this.editorController)&&t.unregisterSelectionManager(),this.unregisterResetListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},resetBubbled:function(t){var e;return t.target!==(null!=(e=this.inputElement)?e.form:void 0)||t.defaultPrevented?void 0:this.reset()},reset:function(){return this.value=this.defaultValue}}))}.call(this),function(){}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd&&define(e)}.call(this),function(){}.call(this),function(){var t=this;(function(){(function(){var t=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},WebSocket:window.WebSocket,logger:window.console,createConsumer:function(t){var n;return null==t&&(t=null!=(n=this.getConfig("url"))?n:this.INTERNAL.default_mount_path),new e.Consumer(this.createWebSocketURL(t))},getConfig:function(t){var e;return null!=(e=document.head.querySelector("meta[name='action-cable-"+t+"']"))?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?((e=document.createElement("a")).href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var e,n;if(e=1<=arguments.length?t.call(arguments,0):[],this.debugging)return e.push(Date.now()),(n=this.logger).log.apply(n,["[ActionCable]"].concat(t.call(e)))}}}).call(this)}).call(t);var e=t.ActionCable;(function(){(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};e.ConnectionMonitor=function(){function n(e){this.connection=e,this.visibilityDidChange=t(this.visibilityDidChange,this),this.reconnectAttempts=0}var i,o,r;return n.pollInterval={min:3,max:30},n.staleThreshold=6,n.prototype.start=function(){if(!this.isRunning())return this.startedAt=o(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),e.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},n.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=o(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),e.log("ConnectionMonitor stopped")},n.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},n.prototype.recordPing=function(){return this.pingedAt=o()},n.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,e.log("ConnectionMonitor recorded connect")},n.prototype.recordDisconnect=function(){return this.disconnectedAt=o(),e.log("ConnectionMonitor recorded disconnect")},n.prototype.startPolling=function(){return this.stopPolling(),this.poll()},n.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},n.prototype.poll=function(){return this.pollTimeout=setTimeout((t=this,function(){return t.reconnectIfStale(),t.poll()}),this.getPollInterval());var t},n.prototype.getPollInterval=function(){var t,e,n,o;return n=(o=this.constructor.pollInterval).min,e=o.max,t=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*i(t,n,e))},n.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return e.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+r(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?e.log("ConnectionMonitor skipping reopening recent disconnect"):(e.log("ConnectionMonitor reopening"),this.connection.reopen())},n.prototype.connectionIsStale=function(){var t;return r(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},n.prototype.disconnectedRecently=function(){return this.disconnectedAt&&r(this.disconnectedAt)<this.constructor.staleThreshold},
n.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout((t=this,function(){if(t.connectionIsStale()||!t.connection.isOpen())return e.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),t.connection.reopen()}),200);var t},o=function(){return(new Date).getTime()},r=function(t){return(o()-t)/1e3},i=function(t,e,n){return Math.max(e,Math.min(n,t))},n}()}).call(this),function(){var t,n,i,o,r,s=[].slice,a=function(t,e){return function(){return t.apply(e,arguments)}},u=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};o=e.INTERNAL,n=o.message_types,i=o.protocols,r=2<=i.length?s.call(i,0,t=i.length-1):(t=0,[]),i[t++],e.Connection=function(){function t(t){this.consumer=t,this.open=a(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new e.ConnectionMonitor(this),this.disconnected=!0}return t.reopenDelay=500,t.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},t.prototype.open=function(){return this.isActive()?(e.log("Attempted to open WebSocket, but existing socket is "+this.getState()),!1):(e.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+i),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new e.WebSocket(this.consumer.url,i),this.installEventHandlers(),this.monitor.start(),!0)},t.prototype.close=function(t){var e;if((null!=t?t:{allowReconnect:!0}).allowReconnect||this.monitor.stop(),this.isActive())return null!=(e=this.webSocket)?e.close():void 0},t.prototype.reopen=function(){var t;if(e.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(n){return t=n,e.log("Failed to reopen WebSocket",t)}finally{e.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},t.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},t.prototype.isOpen=function(){return this.isState("open")},t.prototype.isActive=function(){return this.isState("open","connecting")},t.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),u.call(r,t)>=0},t.prototype.isState=function(){var t,e;return e=1<=arguments.length?s.call(arguments,0):[],t=this.getState(),u.call(e,t)>=0},t.prototype.getState=function(){var t,e;for(e in WebSocket)if(WebSocket[e]===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},t.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},t.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},t.prototype.events={message:function(t){var e,i,o;if(this.isProtocolSupported())switch(e=(o=JSON.parse(t.data)).identifier,i=o.message,o.type){case n.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case n.ping:return this.monitor.recordPing();case n.confirmation:return this.subscriptions.notify(e,"connected");case n.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",i)}},open:function(){if(e.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return e.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(){if(e.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return e.log("WebSocket onerror event")}},t}()}.call(this),function(){var t=[].slice;e.Subscriptions=function(){function n(t){this.consumer=t,this.subscriptions=[]}return n.prototype.create=function(t,n){var i,o,r;return o="object"==typeof(i=t)?i:{channel:i},r=new e.Subscription(this.consumer,o,n),this.add(r)},n.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},n.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},n.prototype.reject=function(t){var e,n,i,o,r;for(o=[],e=0,n=(i=this.findAll(t)).length;e<n;e++)r=i[e],this.forget(r),this.notify(r,"rejected"),o.push(r);return o},n.prototype.forget=function(t){var e;return this.subscriptions=function(){var n,i,o,r;for(r=[],n=0,i=(o=this.subscriptions).length;n<i;n++)(e=o[n])!==t&&r.push(e);return r}.call(this),t},n.prototype.findAll=function(t){var e,n,i,o,r;for(o=[],e=0,n=(i=this.subscriptions).length;e<n;e++)(r=i[e]).identifier===t&&o.push(r);return o},n.prototype.reload=function(){var t,e,n,i,o;for(i=[],t=0,e=(n=this.subscriptions).length;t<e;t++)o=n[t],i.push(this.sendCommand(o,"subscribe"));return i},n.prototype.notifyAll=function(){var e,n,i,o,r,s,a;for(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],s=[],i=0,o=(r=this.subscriptions).length;i<o;i++)a=r[i],s.push(this.notify.apply(this,[a,n].concat(t.call(e))));return s},n.prototype.notify=function(){var e,n,i,o,r,s,a;for(s=arguments[0],n=arguments[1],e=3<=arguments.length?t.call(arguments,2):[],r=[],i=0,o=(a="string"==typeof s?this.findAll(s):[s]).length;i<o;i++)s=a[i],r.push("function"==typeof s[n]?s[n].apply(s,e):void 0);return r},n.prototype.sendCommand=function(t,e){var n;return n=t.identifier,this.consumer.send({command:e,identifier:n})},n}()}.call(this),function(){e.Subscription=function(){function t(t,n,i){this.consumer=t,null==n&&(n={}),this.identifier=JSON.stringify(n),e(this,i)}var e;return t.prototype.perform=function(t,e){return null==e&&(e={}),e.action=t,this.send(e)},t.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},t.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},e=function(t,e){var n,i;if(null!=e)for(n in e)i=e[n],t[n]=i;return t},t}()}.call(this),function(){e.Consumer=function(){function t(t){this.url=t,this.subscriptions=new e.Subscriptions(this),this.connection=new e.Connection(this)}return t.prototype.send=function(t){return this.connection.send(t)},t.prototype.connect=function(){return this.connection.open()},t.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},t.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},t}()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=e:"function"==typeof define&&define.amd&&define(e)}.call(this),function(){this.App||(this.App={}),App.cable=ActionCable.createConsumer()}.call(this),function(){document.addEventListener("trix-file-accept",function(t){return t.preventDefault()})}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this);