1!function(){var n={},t=this,r=t.async;n.noConflict=function(){return t.async=r,n};var e=function(n,t){if(n.forEach)return n.forEach(t);for(var r=0;r<n.length;r+=1)t(n[r],r,n)},u=function(n,t){if(n.map)return n.map(t);var r=[];return e(n,function(n,e,u){r.push(t(n,e,u))}),r},c=function(n,t,r){return n.reduce?n.reduce(t,r):(e(n,function(n,e,u){r=t(r,n,e,u)}),r)},o=function(n){if(Object.keys)return Object.keys(n);var t=[];for(var r in n)n.hasOwnProperty(r)&&t.push(r);return t};"undefined"!=typeof process&&process.nextTick?n.nextTick=process.nextTick:n.nextTick=function(n){setTimeout(n,0)},n.forEach=function(n,t,r){if(r=r||function(){},!n.length)return r();var u=0;e(n,function(e){t(e,function(t){t?(r(t),r=function(){}):(u+=1)===n.length&&r(null)})})},n.forEachSeries=function(n,t,r){if(r=r||function(){},!n.length)return r();var e=0,u=function(){t(n[e],function(t){t?(r(t),r=function(){}):(e+=1)===n.length?r(null):u()})};u()},n.forEachLimit=function(n,t,r,e){if(e=e||function(){},!n.length||t<=0)return e();var u=0,c=0,o=0;!function i(){if(u===n.length)return e();for(;o<t&&c<n.length;)o+=1,r(n[(c+=1)-1],function(t){t?(e(t),e=function(){}):(o-=1,(u+=1)===n.length?e():i())})}()};var i=function(t){return function(){var r=Array.prototype.slice.call(arguments);return t.apply(null,[n.forEach].concat(r))}},f=function(t){return function(){var r=Array.prototype.slice.call(arguments);return t.apply(null,[n.forEachSeries].concat(r))}},l=function(n,t,r,e){var c=[];n(t=u(t,function(n,t){return{index:t,value:n}}),function(n,t){r(n.value,function(r,e){c[n.index]=e,t(r)})},function(n){e(n,c)})};n.map=i(l),n.mapSeries=f(l),n.reduce=function(t,r,e,u){n.forEachSeries(t,function(n,t){e(r,n,function(n,e){r=e,t(n)})},function(n){u(n,r)})},n.inject=n.reduce,n.foldl=n.reduce,n.reduceRight=function(t,r,e,c){var o=u(t,function(n){return n}).reverse();n.reduce(o,r,e,c)},n.foldr=n.reduceRight;var a=function(n,t,r,e){var c=[];n(t=u(t,function(n,t){return{index:t,value:n}}),function(n,t){r(n.value,function(r){r&&c.push(n),t()})},function(){e(u(c.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})};n.filter=i(a),n.filterSeries=f(a),n.select=n.filter,n.selectSeries=n.filterSeries;var s=function(n,t,r,e){var c=[];n(t=u(t,function(n,t){return{index:t,value:n}}),function(n,t){r(n.value,function(r){r||c.push(n),t()})},function(){e(u(c.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})};n.reject=i(s),n.rejectSeries=f(s);var p=function(n,t,r,e){n(t,function(n,t){r(n,function(r){r?(e(n),e=function(){}):t()})},function(){e()})};n.detect=i(p),n.detectSeries=f(p),n.some=function(t,r,e){n.forEach(t,function(n,t){r(n,function(n){n&&(e(!0),e=function(){}),t()})},function(){e(!1)})},n.any=n.some,n.every=function(t,r,e){n.forEach(t,function(n,t){r(n,function(n){n||(e(!1),e=function(){}),t()})},function(){e(!0)})},n.all=n.every,n.sortBy=function(t,r,e){n.map(t,function(n,t){r(n,function(r,e){r?t(r):t(null,{value:n,criteria:e})})},function(n,t){if(n)return e(n);var r=function(n,t){var r=n.criteria,e=t.criteria;return r<e?-1:r>e?1:0};e(null,u(t.sort(r),function(n){return n.value}))})},n.auto=function(n,t){t=t||function(){};var r=o(n);if(!r.length)return t(null);var u={},i=[],f=function(n){i.unshift(n)},l=function(n){for(var t=0;t<i.length;t+=1)if(i[t]===n)return void i.splice(t,1)},a=function(){e(i.slice(0),function(n){n()})};f(function(){o(u).length===r.length&&(t(null,u),t=function(){})}),e(r,function(r){var e=n[r]instanceof Function?[n[r]]:n[r],o=function(n){if(n)t(n),t=function(){};else{var e=Array.prototype.slice.call(arguments,1);e.length<=1&&(e=e[0]),u[r]=e,a()}},i=e.slice(0,Math.abs(e.length-1))||[],s=function(){return c(i,function(n,t){return n&&u.hasOwnProperty(t)},!0)&&!u.hasOwnProperty(r)};if(s())e[e.length-1](o,u);else{var p=function(){s()&&(l(p),e[e.length-1](o,u))};f(p)}})},n.waterfall=function(t,r){if(r=r||function(){},!t.length)return r();var e=function(t){return function(u){if(u)r(u),r=function(){};else{var c=Array.prototype.slice.call(arguments,1),o=t.next();o?c.push(e(o)):c.push(r),n.nextTick(function(){t.apply(null,c)})}}};e(n.iterator(t))()},n.parallel=function(t,r){if(r=r||function(){},t.constructor===Array)n.map(t,function(n,t){n&&n(function(n){var r=Array.prototype.slice.call(arguments,1
1);r.length<=1&&(r=r[0]),t.call(null,n,r)})},r);else{var e={};n.forEach(o(t),function(n,r){t[n](function(t){var u=Array.prototype.slice.call(arguments,1);u.length<=1&&(u=u[0]),e[n]=u,r(t)})},function(n){r(n,e)})}},n.series=function(t,r){if(r=r||function(){},t.constructor===Array)n.mapSeries(t,function(n,t){n&&n(function(n){var r=Array.prototype.slice.call(arguments,1);r.length<=1&&(r=r[0]),t.call(null,n,r)})},r);else{var e={};n.forEachSeries(o(t),function(n,r){t[n](function(t){var u=Array.prototype.slice.call(arguments,1);u.length<=1&&(u=u[0]),e[n]=u,r(t)})},function(n){r(n,e)})}},n.iterator=function(n){var t=function(r){var e=function(){return n.length&&n[r].apply(null,arguments),e.next()};return e.next=function(){return r<n.length-1?t(r+1):null},e};return t(0)},n.apply=function(n){var t=Array.prototype.slice.call(arguments,1);return function(){return n.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var y=function(n,t,r,e){var u=[];n(t,function(n,t){r(n,function(n,r){u=u.concat(r||[]),t(n)})},function(n){e(n,u)})};n.concat=i(y),n.concatSeries=f(y),n.whilst=function(t,r,e){t()?r(function(u){if(u)return e(u);n.whilst(t,r,e)}):e()},n.until=function(t,r,e){t()?e():r(function(u){if(u)return e(u);n.until(t,r,e)})},n.queue=function(t,r){var u=0,c={tasks:[],concurrency:r,saturated:null,empty:null,drain:null,push:function(t,u){t.constructor!==Array&&(t=[t]),e(t,function(t){c.tasks.push({data:t,callback:"function"==typeof u?u:null}),c.saturated&&c.tasks.length==r&&c.saturated(),n.nextTick(c.process)})},process:function(){if(u<c.concurrency&&c.tasks.length){var n=c.tasks.shift();c.empty&&0==c.tasks.length&&c.empty(),u+=1,t(n.data,function(){u-=1,n.callback&&n.callback.apply(n,arguments),c.drain&&c.tasks.length+u==0&&c.drain(),c.process()})}},length:function(){return c.tasks.length},running:function(){return u}};return c};var v=function(n){return function(t){var r=Array.prototype.slice.call(arguments,1);t.apply(null,r.concat([function(t){var r=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&e(r,function(t){console[n](t)}))}]))}};n.log=v("log"),n.dir=v("dir"),n.memoize=function(n,t){var r={},e={};t=t||function(n){return n};var u=function(){var u=Array.prototype.slice.call(arguments),c=u.pop(),o=t.apply(null,u);o in r?c.apply(null,r[o]):o in e?e[o].push(c):(e[o]=[c],n.apply(null,u.concat([function(){r[o]=arguments;var n=e[o];delete e[o];for(var t=0,u=n.length;t<u;t++)n[t].apply(null,arguments)}])))};return u.unmemoized=n,u},n.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},"undefined"!=typeof define&&define.amd?define("async",[],function(){return n}):"undefined"!=typeof module&&module.exports?module.exports=n:t.async=n}(); 2base64={},base64.PADCHAR="=",base64.ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",base64.getbyte64=function(e,t){var r=base64.ALPHA.indexOf(e.charAt(t));if(-1==r)throw"Cannot decode base64";return r},base64.decode=function(e){e=""+e;var t,r,a,h=base64.getbyte64,n=e.length;if(0==n)return e;if(n%4!=0)throw"Cannot decode base64";t=0,e.charAt(n-1)==base64.PADCHAR&&(t=1,e.charAt(n-2)==base64.PADCHAR&&(t=2),n-=4);var s=[];for(r=0;r<n;r+=4)a=h(e,r)<<18|h(e,r+1)<<12|h(e,r+2)<<6|h(e,r+3),s.push(String.fromCharCode(a>>16,a>>8&255,255&a));switch(t){case 1:a=h(e,r)<<18|h(e,r+1)<<12|h(e,r+2)<<6,s.push(String.fromCharCode(a>>16,a>>8&255));break;case 2:a=h(e,r)<<18|h(e,r+1)<<12,s.push(String.fromCharCode(a>>16))}return s.join("")},base64.getbyte=function(e,t){var r=e.charCodeAt(t);if(r>255)throw"INVALID_CHARACTER_ERR: DOM Exception 5";return r},base64.encode=function(e){if(1!=arguments.length)throw"SyntaxError: Not enough arguments";var t,r,a=base64.PADCHAR,h=base64.ALPHA,n=base64.getbyte,s=[],A=(e=""+e).length-e.length%3;if(0==e.length)return e;for(t=0;t<A;t+=3)r=n(e,t)<<16|n(e,t+1)<<8|n(e,t+2),s.push(h.charAt(r>>18)),s.push(h.charAt(r>>12&63)),s.push(h.charAt(r>>6&63)),s.push(h.charAt(63&r));switch(e.length-A){case 1:r=n(e,t)<<16,s.push(h.charAt(r>>18)+h.charAt(r>>12&63)+a+a);break;case 2:r=n(e,t)<<16|n(e,t+1)<<8,s.push(h.charAt(r>>18)+h.charAt(r>>12&63)+h.charAt(r>>6&63)+a)}return s.join("")}; 3var JSON;JSON||(JSON={}),function(){"use strict";function f(t){return t<10?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,r,f,o,u,i=gap,p=e[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof rep&&(p=rep.call(e,t,p)),typeof p){case"string":return quote(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(gap+=indent,u=[],"[object Array]"===Object.prototype.toString.apply(p)){for(o=p.length,n=0;n<o;n+=1)u[n]=str(n,p)||"null";return f=0===u.length?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+i+"]":"["+u.join(",")+"]",gap=i,f}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(f=str(r=rep[n],p))&&u.push(quote(r)+(gap?": ":":")+f);else for(r in p)Object.prototype.hasOwnProperty.call(p,r)&&(f=str(r,p))&&u.push(quote(r)+(gap?": ":":")+f);return f=0===u.length?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+i+"}":"{"+u.join(",")+"}",gap=i,f}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
3"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var n,r,f=t[e];if(f&&"object"==typeof f)for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&((r=walk(f,n))!==undefined?f[n]=r:delete f[n]);return reviver.call(t,e,f)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(); 4!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ie.type(e);return"function"!==n&&!ie.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function r(e,t,n){if(ie.isFunction(t))return ie.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ie.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(de.test(t))return ie.filter(t,e,n);t=ie.filter(t,e)}return ie.grep(e,function(e){return ie.inArray(e,t)>=0!==n})}function i(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t=xe[e]={};return ie.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function a(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(he.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(a(),ie.ready())}function u(e,t,n){if(n===undefined&&1===e.nodeType){var r="data-"+t.replace(Ne,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ce.test(n)?ie.parseJSON(n):n)}catch(i){}ie.data(e,t,n)}else n=undefined}return n}function l(e){var t;for(t in e)if(("data"!==t||!ie.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(ie.acceptData(e)){var i,o,a=ie.expando,s=e.nodeType,u=s?ie.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||n!==undefined||"string"!=typeof t)return l||(l=s?e[a]=J.pop()||ie.guid++:a),u[l]||(u[l]=s?{}:{toJSON:ie.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=ie.extend(u[l],t):u[l].data=ie.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),n!==undefined&&(o[ie.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[ie.camelCase(t)]):i=o,i}}function f(e,t,n){if(ie.acceptData(e)){var r,i,o=e.nodeType,a=o?ie.cache:e,s=o?e[ie.expando]:ie.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){i=(t=ie.isArray(t)?t.concat(ie.map(t,ie.camelCase)):t in r?[t]:(t=ie.camelCase(t))in r?[t]:t.split(" ")).length;for(;i--;)delete r[t[i]];if(n?!l(r):!ie.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?ie.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function d(){return!0}function p(){return!1}function h(){try{return he.activeElement}catch(e){}}function m(e){var t=Me.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==Te?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Te?e.querySelectorAll(t||"*"):undefined;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ie.nodeName(r,t)?o.push(r):ie.merge(o,g(r,t));return t===undefined||t&&ie.nodeName(e,t)?ie.merge([e],o):o}function y(e){De.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==ie.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Ue.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,r=0;null!=(n=e[r]);r++)ie._data(n,"globalEval",!t||ie._data(t[r],"globalEval"))}function T(e,t){if(1===t.nodeType&&ie.hasData(e)){var n,r,i,o=ie._data(e),a=ie._data(t,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r<i;r++)ie.event.add(t,n,s[n][r]);a.data&&(a.data=ie.extend({},a.data))}}function C(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[ie.expando]){for(r in(i=ie._data(t)).events)ie.removeEvent(t,r,i.handle);t.removeAttribute(ie.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,x(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!ie.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&De.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(t,n){var r,i=ie(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:ie.css(i[0],"display");return i.detach(),o}function E(e){var t=he,n=Ke[e];return n||("none"!==(n=N(e,t))&&n||((t=((Ge=(Ge||ie("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow||Ge[0].contentDocument).document).write(),t.close(),n=N(e,t),Ge.detach()),Ke[e]=n),n}function k(e,t){return{get:function(){var n=e();if(null!=n){if(!n)return(this.get=t).apply(this,arguments);delete this.get}}}}function S(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=ft.length;i--;)if((t=ft[i]+n)in e)return t;return r}function A(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)(r=e[a]).style&&(o[a]=ie._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Se(r)&&(o[a]=ie._data(r,"olddisplay",E(r.nodeName)))):(i=Se(r),(n&&"none"!==n||!i)&&ie._data(r,"olddisplay",i?n:ie.css(r,"display"))));for(a=0;a<s;a++)(r=e[a]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function D(e,t,n){var r=st.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function j(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=ie.css(e,n+ke[o],!0,i)),r?("content"===n&&(a-=ie.css(e,"padding"+ke[o],!0,i)),"margin"!==n&&(a-=ie.css(e,"border"+ke[o]+"Width",!0,i))):(a+=ie.css(e,"padding"+ke[o],!0,i),"padding"!==n&&(a+=ie.css(e,"border"+ke[o]+"Width",!0,i)));return a}function L(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Ze(e),a=ne.boxSizing&&"border-box"===ie.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=et(e,t,o))<0||null==i)&&(i=e.style[t]),nt.test(i))return i;r=a&&(ne.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+j(e,t,n||(a?"border":"content"),r,o)+"px"}function H(e,t,n,r,i){return new H.prototype.init(e,t,n,r,i)}function q(){return setTimeout(function(){dt=undefined}),dt=ie.now()}function _(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=ke[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function M(e,t,n){for(var r,i=(Ct[t]||[]).concat(Ct["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function F(e,t,n){var r,i,o,a,s,u,l,c=this,f={},d=e.style,p=e.nodeType&&Se(e),h=ie._data(e,"fxshow");for(r in n.queue||(null==(s=ie._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,ie.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===("none"===(l=ie.css(e,"display"))?ie._data(e,"olddisplay")||E(e.nodeName):l)&&"none"===ie.css(e,"float")&&(ne.inlineBlockNeedsLayout&&"inline"!==E(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",ne.shrinkWrapBlocks()||c.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),t)if(i=t[r],bt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!h||h[r]===undefined)continue;p=!0}f[r]=h&&h[r]||ie.style(e,r)}else l=undefined;if(ie.isEmptyObject(f))"inline"===("none"===l?E(e.nodeName):l)&&(d.display=l);else for(r in h?"hidden"in h&&(p=h.hidden):h=ie._data(e,"fxshow",{}),o&&(h.hidden=!p),p?ie(e).show():c.done(function(){ie(e).hide()}),c.done(function(){var t;for(t in ie._removeData(e,"fxshow"),f)ie.style(e,t,f[t])}),f)a=M(p?h[r]:0,r,c),r in h||(h[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"he
4ight"===r?1:0))}function O(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=ie.camelCase(n)],o=e[n],ie.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ie.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}function B(e,t,n){var r,i,o=0,a=Tt.length,s=ie.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=dt||q(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:ie.extend({},t),opts:ie.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:dt||q(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ie.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(O(c,l.opts.specialEasing);o<a;o++)if(r=Tt[o].call(l,e,c,l.opts))return r;return ie.map(c,M,l),ie.isFunction(l.opts.start)&&l.opts.start.call(e,l),ie.fx.timer(ie.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function P(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(be)||[];if(ie.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function R(e,t,n,r){function i(s){var u;return o[s]=!0,ie.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Vt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function W(e,t){var n,r,i=ie.ajaxSettings.flatOptions||{};for(r in t)t[r]!==undefined&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&ie.extend(!0,e,n),e}function $(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),i===undefined&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}function z(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function I(e,t,n,r){var i;if(ie.isArray(t))ie.each(t,function(t,i){n||Gt.test(e)?r(e,i):I(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ie.type(t))r(e,t);else for(i in t)I(e+"["+i+"]",t[i],n,r)}function X(){try{return new e.XMLHttpRequest}catch(t){}}function U(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function V(e){return ie.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var J=[],Y=J.slice,G=J.concat,Q=J.push,K=J.indexOf,Z={},ee=Z.toString,te=Z.hasOwnProperty,ne={},re="1.11.2",ie=function(e,t){return new ie.fn.init(e,t)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,se=/-([\da-z])/gi,ue=function(e,t){return t.toUpperCase()};ie.fn=ie.prototype={jquery:re,constructor:ie,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:Y.call(this)},pushStack:function(e){var t=ie.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ie.each(this,e,t)},map:function(e){return this.pushStack(ie.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Q,sort:J.sort,splice:J.splice},ie.extend=ie.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{}
4,s++),"object"==typeof a||ie.isFunction(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(i=arguments[s]))for(r in i)e=a[r],a!==(n=i[r])&&(l&&n&&(ie.isPlainObject(n)||(t=ie.isArray(n)))?(t?(t=!1,o=e&&ie.isArray(e)?e:[]):o=e&&ie.isPlainObject(e)?e:{},a[r]=ie.extend(l,o,n)):n!==undefined&&(a[r]=n));return a},ie.extend({expando:"jQuery"+(re+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ie.type(e)},isArray:Array.isArray||function(e){return"array"===ie.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!ie.isArray(e)&&e-parseFloat(e)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==ie.type(e)||e.nodeType||ie.isWindow(e))return!1;try{if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ne.ownLast)for(t in e)return te.call(e,t);for(t in e);return t===undefined||te.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[ee.call(e)]||"object":typeof e},globalEval:function(t){t&&ie.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ae,"ms-").replace(se,ue)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i=0,o=e.length,a=n(e);if(r){if(a)for(;i<o&&!1!==t.apply(e[i],r);i++);else for(i in e)if(!1===t.apply(e[i],r))break}else if(a)for(;i<o&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(oe,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?ie.merge(r,"string"==typeof e?[e]:e):Q.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(K)return K.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!=n)for(;t[r]!==undefined;)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,r){var i,o=0,a=e.length,s=[];if(n(e))for(;o<a;o++)null!=(i=t(e[o],o,r))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,r))&&s.push(i);return G.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),ie.isFunction(e)?(n=Y.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(Y.call(arguments)))}).guid=e.guid=e.guid||ie.guid++,r):undefined},now:function(){return+new Date},support:ne}),ie.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var le=function(e){function t(e,t,n,r){var i,o,a,s,u,l,f,p,h,m;if((t?t.ownerDocument||t:R)!==H&&L(t),n=n||[],s=(t=t||H).nodeType,"string"!=typeof e||!e||1!==s&&9!==s&&11!==s)return n;if(!r&&_){if(11!==s&&(i=ve.exec(e)))if(a=i[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&B(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return K.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&w.getElementsByClassName)return K.apply(n,t.getElementsByClassName(a)),n}if(w.qsa&&(!M||!M.test(e))){if(p=f=P,h=t,m=1!==s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=E(e),(f=t.getAttribute("id"))?p=f.replace(xe,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",u=l.length;u--;)l[u]=p+d(l[u]);h=be.test(e)&&c(t.parentNode)||t,m=l.join(",")}if(m)try{return K.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{f||t.removeAttribute("id")}}}return S(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=$++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((s=(u=t[P]||(t[P]={}))[r])&&s[0]===W&&s[1]===o)return l[2]=s[2];if(u[r]=l,l[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function y(e,t,n,i,o,a){return i&&!i[P]&&(i=y(i)),o&&!o[P]&&(o=y(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],h=a.length,y=r||m(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?y:g(y,d,e,s,u),b=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,b,s,u),i)for(l=g(b,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(b[p[c]]=!(v[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(v[c]=f);o(null,b=[],l,u)}for(c=b.length;c--;)(f=b[c])&&(l=o?ee(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else b=g(b===a?b.splice(h,b.length):b),o?o(null,a,b,u):K.apply(a,b)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=T.relative[e[s].type])c=[p(h(c),n)];
vendor: 4,276 bytes, line 4
4else{if((n=T.filter[e[s].type].apply(null,e[s].matches))[P]){for(r=++s;r<i&&!T.relative[e[r].type];r++);return y(s>1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ue,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return h(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",m=r&&[],y=[],v=A,b=r||o&&T.find.TAG("*",l),x=W+=null==v?1:Math.random()||.1,w=b.length;for(l&&(A=a!==H&&a);h!==w&&null!=(c=b[h]);h++){if(o&&c){for(f=0;d=e[f++];)if(d(c,a,s)){u.push(c);break}l&&(W=x)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,y,a,s);if(r){if(p>0)for(;h--;)m[h]||y[h]||(y[h]=G.call(u));y=g(y)}K.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=x,A=v),m};return i?r(a):a}var x,w,T,C,N,E,k,S,A,D,j,L,H,q,_,M,F,O,B,P="sizzle"+1*new Date,R=e.document,W=0,$=0,z=n(),I=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,J={}.hasOwnProperty,Y=[],G=Y.pop,Q=Y.push,K=Y.push,Z=Y.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=re.replace("w","w#"),oe="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",ae=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ue=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),fe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(ae),pe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ye=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,xe=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ce=function(){L()};try{K.apply(Y=Z.call(R.childNodes),R.childNodes),Y[R.childNodes.length].nodeType}catch(Ne){K={apply:Y.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in w=t.support={},N=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=r.documentElement,(n=r.defaultView)&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),_=!N(r),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ye.test(r.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!r.getElementsByName||!r.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);
vendor: 12,100 bytes, lines 4-5
4if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if(_)return t.getElementsByClassName(e)},F=[],M=[],(w.qsa=ye.test(r.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+P+"'></a><select id='"+P+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||M.push("~="),e.querySelectorAll(":checked").length||M.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||M.push(".#.+[+~]")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(w.matchesSelector=ye.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),F.push("!=",ae)}),M=M.length&&new RegExp(M.join("|")),F=F.length&&new RegExp(F.join("|")),t=ye.test(q.compareDocumentPosition),B=t||ye.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===R&&B(R,e)?-1:t===r||t.ownerDocument===R&&B(R,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,u=[e],l=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:D?ee(D,e)-ee(D,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?a(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},r):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(fe,"='$1']"),w.matchesSelector&&_&&(!F||!F.test(n))&&(!M||!M.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(Ne){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&J.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):undefined;return r!==undefined?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},(T=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,Te),e[3]=(e[3]||e[4]||e[5]||"").replace(we,Te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,Te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&v){for(p=(l=(c=g[P]||(g[P]={}))[e]||[])[0]===W&&l[1],d=l[0]===W&&l[2],f=p&&g.childNodes[p];f=++p&&f&&f[m]||(d=p=0)||h.pop();)if(1===f.nodeType&&++d&&f===t){c[e]=[W,p,d];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===W)d=l[1];else for(;(f=++p&&f&&f[m]||(d=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++d||(v&&((f[P]||(f[P]={}))[e]=[W,d]),f!==t)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=ee(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(ue,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,Te),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,Te).toLowerCase(),function(t){var n;do{if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return me.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=T.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=u(x);return f.prototype=T.filters=T.pseudos,T.setFilters=new f,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=I[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=T.preFilter;s;){for(a in r&&!(i=le.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=ce.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ue," ")}),s=s.slice(r.length)),T.filter)!(i=he[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):I(e,u).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=E(e)),n=t.length;n--;)(o=v(t[n]))[P]?r.push(o):i.push(o);(o=X(e,b(i,r))).selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,f=!r&&E(e=l.selector||e);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(!(t=(T.find.ID(a.matches[0].replace(we,Te),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i], 5!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(we,Te),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return K.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,be.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ie.find=le,ie.expr=le.selectors,ie.expr[":"]=ie.expr.pseudos,ie.unique=le.uniqueSort,ie.text=le.getText,ie.isXMLDoc=le.isXML,ie.contains=le.contains;var ce=ie.expr.match.needsContext,fe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,de=/^.[^:#\[\.,]*$/;ie.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ie.find.matchesSelector(r,e)?[r]:[]:ie.find.matches(e,ie.grep(t,function(e){return 1===e.nodeType}))},ie.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(ie(e).filter(function(){for(t=0;t<i;t++)if(ie.contains(r[t],this))return!0}));for(t=0;t<i;t++)ie.find(e,r[t],n);return(n=this.pushStack(i>1?ie.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ce.test(e)?ie(e):e||[],!1).length}});var pe,he=e.document,me=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(ie.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:me.exec(e))||!n[1]&&t)return!t||t.jquery?(t||pe).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof ie?t[0]:t,ie.merge(this,ie.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:he,!0)),fe.test(n[1])&&ie.isPlainObject(t))for(n in t)ie.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=he.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return pe.find(e);this.length=1,this[0]=r}return this.context=he,this.selector=e,this}
vendor: 6,945 bytes, line 5
5return e.nodeType?(this.context=this[0]=e,this.length=1,this):ie.isFunction(e)?"undefined"!=typeof pe.ready?pe.ready(e):e(ie):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),ie.makeArray(e,this))}).prototype=ie.fn,pe=ie(he);var ge=/^(?:parents|prev(?:Until|All))/,ye={children:!0,contents:!0,next:!0,prev:!0};ie.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(n===undefined||1!==i.nodeType||!ie(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),ie.fn.extend({has:function(e){var t,n=ie(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(ie.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ce.test(e)||"string"!=typeof e?ie(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&ie.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?ie.unique(o):o)},index:function(e){return e?"string"==typeof e?ie.inArray(this[0],ie(e)):ie.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ie.unique(ie.merge(this.get(),ie(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ie.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ie.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ie.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return ie.dir(e,"nextSibling")},prevAll:function(e){return ie.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ie.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ie.dir(e,"previousSibling",n)},siblings:function(e){return ie.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ie.sibling(e.firstChild)},contents:function(e){return ie.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ie.merge([],e.childNodes)}},function(e,t){ie.fn[e]=function(n,r){var i=ie.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ie.filter(r,i)),this.length>1&&(ye[e]||(i=ie.unique(i)),ge.test(e)&&(i=i.reverse())),this.pushStack(i)}});var ve,be=/\S+/g,xe={};ie.Callbacks=function(e){e="string"==typeof e?xe[e]||o(e):ie.extend({},e);var t,n,r,i,a,s,u=[],l=!e.once&&[],c=function(o){for(n=e.memory&&o,r=!0,a=s||0,s=0,i=u.length,t=!0;u&&a<i;a++)if(!1===u[a].apply(o[0],o[1])&&e.stopOnFalse){n=!1;break}t=!1,u&&(l?l.length&&c(l.shift()):n?u=[]:f.disable())},f={add:function(){if(u){var r=u.length;!function o(t){ie.each(t,function(t,n){var r=ie.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&o(n)})}(arguments),t?i=u.length:n&&(s=r,c(n))}return this},remove:function(){return u&&ie.each(arguments,function(e,n){for(var r;(r=ie.inArray(n,u,r))>-1;)u.splice(r,1),t&&(r<=i&&i--,r<=a&&a--)}),this},has:function(e){return e?ie.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],i=0,this},disable:function(){return u=l=n=undefined,this},disabled:function(){return!u},lock:function(){return l=undefined,n||f.disable(),this},locked:function(){return!l},fireWith:function(e,n){return!u||r&&!l||(n=[e,(n=n||[]).slice?n.slice():n],t?l.push(n):c(n)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!r}};return f},ie.extend({Deferred:function(e){var t=[["resolve","done",ie.Callbacks("once memory"),"resolved"],["reject","fail",ie.Callbacks("once memory"),"rejected"],["notify","progress",ie.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ie.Deferred(function(n){ie.each(t,function(t,o){var a=ie.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&ie.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ie.extend(e,r):r}},i={};return r.pipe=r.then,ie.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=Y.call(arguments),a=o.length,s=1!==a||e&&ie.isFunction(e.promise)?a:0,u=1===s?e:ie.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?Y.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i<a;i++)o[i]&&ie.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),ie.fn.ready=function(e){return ie.ready.promise().done(e),this},ie.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ie.readyWait++:ie.ready(!0)},ready:function(e){if(!0===e?!--ie.readyWait:!ie.isReady){if(!he.body)return setTimeout(ie.ready);ie.isReady=!0,!0!==e&&--ie.readyWait>0||(ve.resolveWith(he,[ie]),ie.fn.triggerHandler&&(ie(he).triggerHandler("ready"),ie(he).off("ready")))}}}),ie.ready.promise=function(t){if(!ve)if(ve=ie.Deferred(),"complete"===he.readyState)setTimeout(ie.ready);else if(he.addEventListener)he.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{he.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&he.documentElement}catch(r){}n&&n.doScroll&&function t(){if(!ie.isReady){try{n.doScroll("left")}catch(r){return setTimeout(t,50)}a(),ie.ready()}}()}return ve.promise(t)};var we,Te=typeof undefined;for(we in ie(ne))break;ne.ownLast="0"!==we,ne.inlineBlockNeedsLayout=!1,ie(function(){var e,t,n,r;(n=he.getElementsByTagName("body")[0])&&n.style&&(t=he.createElement("div"),(r=he.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),typeof t.style.zoom!==Te&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=he.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(t){ne.deleteExpando=!1}}e=null}(),ie.acceptData=function(e){var t=ie.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var Ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ne=/([A-Z])/g;ie.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?ie.cache[e[ie.expando]]:e[ie.expando])&&!l(e)}
5,data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),ie.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(e===undefined){if(this.length&&(i=ie.data(o),1===o.nodeType&&!ie._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&u(o,r=ie.camelCase(r.slice(5)),i[r]);ie._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){ie.data(this,e)}):arguments.length>1?this.each(function(){ie.data(this,e,t)}):o?u(o,e,ie.data(o,e)):undefined},removeData:function(e){return this.each(function(){ie.removeData(this,e)})}}),ie.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ie._data(e,t),n&&(!r||ie.isArray(n)?r=ie._data(e,t,ie.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ie.queue(e,t),r=n.length,i=n.shift(),o=ie._queueHooks(e,t),a=function(){ie.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie._data(e,n)||ie._data(e,n,{empty:ie.Callbacks("once memory").add(function(){ie._removeData(e,t+"queue"),ie._removeData(e,n)})})}}),ie.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ie.queue(this[0],e):t===undefined?this:this.each(function(){var n=ie.queue(this,e,t);ie._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ie.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ie.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ie.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=undefined),e=e||"fx";a--;)(n=ie._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ke=["Top","Right","Bottom","Left"],Se=function(e,t){return e=t||e,"none"===ie.css(e,"display")||!ie.contains(e.ownerDocument,e)},Ae=ie.access=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===ie.type(n))for(s in i=!0,n)ie.access(e,t,s,n[s],!0,o,a);else if(r!==undefined&&(i=!0,ie.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ie(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},De=/^(?:checkbox|radio)$/i;!function(){var e=he.createElement("input"),t=he.createElement("div"),n=he.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===t.firstChild.nodeType,ne.tbody=!t.getElementsByTagName("tbody").length,ne.htmlSerialize=!!t.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==he.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ne.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ne.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(r){ne.deleteExpando=!1}}}(),function(){var t,n,r=he.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ne[t+"Bubbles"]=n in e)||(r.setAttribute(n,"t"),ne[t+"Bubbles"]=!1===r.attributes[n].expando);r=null}();var je=/^(?:input|select|textarea)$/i,Le=/^key/,He=/^(?:mouse|pointer|contextmenu)|click/,qe=/^(?:focusinfocus|focusoutblur)$/,_e=/^([^.]*)(?:\.(.+)|)$/;ie.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,m,g=ie._data(e);if(g){for(n.handler&&(n=(u=n).handler,i=u.selector),n.guid||(n.guid=ie.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||((c=g.handle=function(e){return typeof ie===Te||e&&ie.event.triggered===e.type?undefined:ie.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(be)||[""]).length;s--;)p=m=(o=_e.exec(t[s])||[])[1],h=(o[2]||"").split(".").sort(),p&&(l=ie.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=ie.event.special[p]||{},f=ie.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ie.expr.match.needsContext.test(i),namespace:h.join(".")}
5,u),(d=a[p])||((d=a[p]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,r,h,c)||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),ie.event.global[p]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,m,g=ie.hasData(e)&&ie._data(e);if(g&&(c=g.events)){for(l=(t=(t||"").match(be)||[""]).length;l--;)if(p=m=(s=_e.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=ie.event.special[p]||{},d=c[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(e,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,g.handle)||ie.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)ie.event.remove(e,p+t[l],n,r,!0);ie.isEmptyObject(c)&&(delete g.handle,ie._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,u,l,c,f,d=[r||he],p=te.call(t,"type")?t.type:t,h=te.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||he,3!==r.nodeType&&8!==r.nodeType&&!qe.test(p+ie.event.triggered)&&(p.indexOf(".")>=0&&(p=(h=p.split(".")).shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,(t=t[ie.expando]?t:new ie.Event(p,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:ie.makeArray(n,[t]),l=ie.event.special[p]||{},i||!l.trigger||!1!==l.trigger.apply(r,n))){if(!i&&!l.noBubble&&!ie.isWindow(r)){for(u=l.delegateType||p,qe.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||he)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,(o=(ie._data(s,"events")||{})[t.type]&&ie._data(s,"handle"))&&o.apply(s,n),(o=a&&s[a])&&o.apply&&ie.acceptData(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(d.pop(),n))&&ie.acceptData(r)&&a&&r[p]&&!ie.isWindow(r)){(c=r[a])&&(r[a]=null),ie.event.triggered=p;try{r[p]()}catch(m){}ie.event.triggered=undefined,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=ie.event.fix(e);var t,n,r,i,o,a=[],s=Y.call(arguments),u=(ie._data(this,"events")||{})[e.type]||[],l=ie.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=ie.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(r.namespace)||(e.handleObj=r,e.data=r.data,(n=((ie.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))!==undefined&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(i=[],o=0;o<s;o++)i[n=(r=t[o]).selector+" "]===undefined&&(i[n]=r.needsContext?ie(n,this).index(u)>=0:ie.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[ie.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=He.test(i)?this.mouseHooks:Le.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new ie.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];return e.target||(e.target=o.srcElement||he),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{}
5,keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||he).documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||o===undefined||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===h()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(ie.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return ie.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ie.extend(new ie.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ie.event.trigger(i,null,t):ie.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},ie.removeEvent=he.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===Te&&(e[r]=null),e.detachEvent(r,n))},ie.Event=function(e,t){if(!(this instanceof ie.Event))return new ie.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&!1===e.returnValue?d:p):this.type=e,t&&ie.extend(this,t),this.timeStamp=e&&e.timeStamp||ie.now(),this[ie.expando]=!0},ie.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=d,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=d,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=d,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}}
5,ie.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ie.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||ie.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ne.submitBubbles||(ie.event.special.submit={setup:function(){if(ie.nodeName(this,"form"))return!1;ie.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=ie.nodeName(t,"input")||ie.nodeName(t,"button")?t.form:undefined;n&&!ie._data(n,"submitBubbles")&&(ie.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),ie._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ie.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(ie.nodeName(this,"form"))return!1;ie.event.remove(this,"._submit")}}),ne.changeBubbles||(ie.event.special.change={setup:function(){if(je.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(ie.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ie.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ie.event.simulate("change",this,e,!0)})),!1;ie.event.add(this,"beforeactivate._change",function(e){var t=e.target;je.test(t.nodeName)&&!ie._data(t,"changeBubbles")&&(ie.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ie.event.simulate("change",this.parentNode,e,!0)}),ie._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return ie.event.remove(this,"._change"),!je.test(this.nodeName)}}),ne.focusinBubbles||ie.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ie.event.simulate(t,e.target,ie.event.fix(e),!0)};ie.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=ie._data(r,t);i||r.addEventListener(e,n,!0),ie._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=ie._data(r,t)-1;i?ie._data(r,t,i):(r.removeEventListener(e,n,!0),ie._removeData(r,t))}}}),ie.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){for(o in"string"!=typeof t&&(n=n||t,t=undefined),e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),!1===r)r=p;else if(!r)return this;return 1===i&&(a=r,(r=function(e){return ie().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ie.guid++)),this.each(function(){ie.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ie(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=undefined),!1===n&&(n=p),this.each(function(){ie.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){ie.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ie.event.trigger(e,t,n,!0)}});var Me="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Fe=/ jQuery\d+="(?:null|\d+)"/g,Oe=new RegExp("<(?:"+Me+")[\\s/>]","i"),Be=/^\s+/,Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Re=/<([\w:]+)/,We=/<tbody/i,$e=/<|&#?\w+;/,ze=/<(?:script|style|link)/i,Ie=/checked\s*(?:[^=]|=\s*.checked.)/i,Xe=/^$|\/(?:java|ecma)script/i,Ue=/^true\/(.*)/,Ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Je={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ye=m(he).appendChild(he.createElement("div"));Je.optgroup=Je.option,Je.tbody=Je.tfoot=Je.colgroup=Je.caption=Je.thead,Je.th=Je.td,ie.extend({clone:function(e,t,n){var r,i,o,a,s,u=ie.contains(e.ownerDocument,e);if(ne.html5Clone||ie.isXMLDoc(e)||!Oe.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Ye.innerHTML=e.outerHTML,Ye.removeChild(o=Ye.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ie.isXMLDoc(e)))for(r=g(o),s=g(e),a=0;null!=(i=s[a]);++a)r[a]&&C(i,r[a]);if(t)if(n)for(s=s||g(e),r=r||g(o),a=0;null!=(i=s[a]);a++)T(i,r[a]);else T(e,o);return(r=g(o,"script")).length>0&&w(r,!u&&g(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=m(t),p=[],h=0;h<f;h++)if((o=e[h])||0===o)if("object"===ie.type(o))ie.merge(p,o.nodeType?[o]:o);else if($e.test(o)){for(s=s||d.appendChild(t.createElement("div")),u=(Re.exec(o)||["",""])[1].toLowerCase(),c=Je[u]||Je._default,s.innerHTML=c[1]+o.replace(Pe,"<$1></$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!ne.leadingWhitespace&&Be.test(o)&&p.push(t.createTextNode(Be.exec(o)[0])),!ne.tbody)for(i=(o="table"!==u||We.test(o)?"<table>"!==c[1]||We.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)ie.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(ie.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else p.push(t.createTextNode(o));for(s&&d.removeChild(s),ne.appendChecked||ie.grep(g(p,"input"),y),h=0;o=p[h++];)if((!r||-1===ie.inArray(o,r))&&(a=ie.contains(o.ownerDocument,o),s=g(d.appendChild(o),"script"),a&&w(s),n))for(i=0;o=s[i++];)Xe.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,t){for(var n,r,i,o,a=0,s=ie.expando,u=ie.cache,l=ne.deleteExpando,c=ie.event.special;null!=(n=e[a]);a++)if((t||ie.acceptData(n))&&(o=(i=n[s])&&u[i])){if(o.events)for(r in o.events)c[r]?ie.event.remove(n,r):ie.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l?delete n[s]:typeof n.removeAttribute!==Te?n.removeAttribute(s):n[s]=null,J.push(i))}}}),ie.fn.extend({text:function(e){return Ae(this,function(e){return e===undefined?ie.text(this):this.empty().append((this[0]&&this[0].ownerDocument||he).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||v(this,e).appendChild(e)})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=v(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ie.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ie.cleanData(g(n)),n.parentNode&&(t&&ie.contains(n.ownerDocument,n)&&w(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ie.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ie.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ie.clone(this,e,t)})},html:function(e){return Ae(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(Fe,""):undefined;if("string"==typeof e&&!ze.test(e)&&(ne.htmlSerialize||!Oe.test(e))&&(ne.leadingWhitespace||!Be.test(e))&&!Je[(Re.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Pe,"<$1></$2>");try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ie.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,ie.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=G.apply([],e);var n,r,i,o,a,s,u=0,l=this.length,c=this,f=l-1,d=e[0],p=ie.isFunction(d);if(p||l>1&&"string"==typeof d&&!ne.checkClone&&Ie.test(d))return this.each(function(n){var r=c.eq(n);p&&(e[0]=d.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=(s=ie.buildFragment(e,this[0].ownerDocument,!1,this)).firstChild,1===s.childNodes.length&&(s=n),n)){for(i=(o=ie.map(g(s,"script"),b)).length;u<l;u++)r=s,u!==f&&(r=ie.clone(r,!0,!0),i&&ie.merge(o,g(r,"script"))),t.call(this[u],r,u);if(i)for(a=o[o.length-1].ownerDocument,ie.map(o,x),u=0;u<i;u++)r=o[u],Xe.test(r.type||"")&&!ie._data(r,"globalEval")&&ie.contains(a,r)&&(r.src?ie._evalUrl&&ie._evalUrl(r.src):ie.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Ve,"")));s=n=null}return this}}),ie.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ie.fn[e]=function(e){for(var n,r=0,i=[],o=ie(e),a=o.length-1;r<=a;r++)n=r===a?this:this.clone(!0),ie(o[r])[t](n),Q.apply(i,n.get());return this.pushStack(i)}});var Ge,Qe,Ke={};ne.shrinkWrapBlocks=function(){return null!=Qe?Qe:(Qe=!1,(t=he.getElementsByTagName("body")[0])&&t.style?(e=he.createElement("div"),(n=he.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",t.appendChild(n).appendChild(e),typeof e.style.zoom!==Te&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(he.createElement("div")).style.width="5px",Qe=3!==e.offsetWidth),t.removeChild(n),Qe):void 0);var e,t,n};var Ze,et,tt=/^margin/,nt=new RegExp("^("+Ee+")(?!px)[a-z%]+$","i"),rt=/^(top|right|bottom|left)$/;e.getComputedStyle?(Ze=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):e.getComputedStyle(t,null)},et=function(e,t,n){var r,i,o,a,s=e.style;return a=(n=n||Ze(e))?n.getPropertyValue(t)||n[t]:undefined,n&&(""!==a||ie.contains(e.ownerDocument,e)||(a=ie.style(e,t)),nt.test(a)&&tt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),a===undefined?a:a+""}):he.documentElement.currentStyle&&(Ze=function(e){return e.currentStyle},et=function(e,t,n){var r,i,o,a,s=e.style;return null==(a=(n=n||Ze(e))?n[t]:undefined)&&s&&s[t]&&(a=s[t]),nt.test(a)&&!rt.test(t)&&(r=s.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left
5=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),a===undefined?a:a+""||"auto"}),function(){function t(){var t,n,r,i;(n=he.getElementsByTagName("body")[0])&&n.style&&(t=he.createElement("div"),(r=he.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,u=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,(i=t.appendChild(he.createElement("div"))).style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",u=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight),t.removeChild(i)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>", 6(i=t.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(s=0===i[0].offsetHeight)&&(i[0].style.display="",i[1].style.display="none",s=0===i[0].offsetHeight),n.removeChild(r))}var n,r,i,o,a,s,u;(n=he.createElement("div")).innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(r=(i=n.getElementsByTagName("a")[0])&&i.style)&&(r.cssText="float:left;opacity:.5",ne.opacity="0.5"===r.opacity,ne.cssFloat=!!r.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,ie.extend(ne,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==u&&t(),u}}))}(),ie.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};var it=/alpha\([^)]*\)/i,ot=/opacity\s*=\s*([^)]*)/,at=/^(none|table(?!-c[ea]).+)/,st=new RegExp("^("+Ee+")(.*)$","i"),ut=new RegExp("^([+-])=("+Ee+")","i"),lt={position:"absolute",visibility:"hidden",display:"block"},ct={letterSpacing:"0",fontWeight:"400"},ft=["Webkit","O","Moz","ms"];ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=et(e,"opacity");return""===n?"1":n}}}},cssNumber:{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:ne.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=ie.camelCase(t),u=e.style;if(t=ie.cssProps[s]||(ie.cssProps[s]=S(u,s)),a=ie.cssHooks[t]||ie.cssHooks[s],n===undefined)return a&&"get"in a&&(i=a.get(e,!1,r))!==undefined?i:u[t];if("string"===(o=typeof n)&&(i=ut.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(ie.css(e,t)),o="number"),null!=n&&n==n&&("number"!==o||ie.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&(n=a.set(e,n,r))===undefined)))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=ie.camelCase(t);return t=ie.cssProps[s]||(ie.cssProps[s]=S(e.style,s)),(a=ie.cssHooks[t]||ie.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),o===undefined&&(o=et(e,t,r)),"normal"===o&&t in ct&&(o=ct[t]),""===n||n?(i=parseFloat(o),!0===n||ie.isNumeric(i)?i||0:o):o}}),ie.each(["height","width"],function(e,t){ie.cssHooks[t]={get:function(e,n,r){if(n)return at.test(ie.css(e,"display"))&&0===e.offsetWidth?ie.swap(e,lt,function(){return L(e,t,r)}):L(e,t,r)},set:function(e,n,r){var i=r&&Ze(e);return D(e,n,r?j(e,t,r,ne.boxSizing&&"border-box"===ie.css(e,"boxSizing",!1,i),i):0)}}}),ne.opacity||(ie.cssHooks.opacity={get:function(e,t){return ot.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ie.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ie.trim(o.replace(it,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=it.test(o)?o.replace(it,i):o+" "+i)}}),ie.cssHooks.marginRight=k(ne.reliableMarginRight,function(e,t){if(t)return ie.swap(e,{display:"inline-block"},et,[e,"marginRight"])}),ie.each({margin:"",padding:"",border:"Width"},function(e,t){ie.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ke[r]+t]=o[r]||o[r-2]||o[0];return i}},tt.test(e)||(ie.cssHooks[e+t].set=D)}),ie.fn.extend({css:function(e,t){return Ae(this,function(e,t,n){var r,i,o={},a=0;if(ie.isArray(t)){for(r=Ze(e),i=t.length;a<i;a++)o[t[a]]=ie.css(e,t[a],!1,r);return o}return n!==undefined?ie.style(e,t,n):ie.css(e,t)},e,t,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Se(this)?ie(this).show():ie(this).hide()})}}),ie.Tween=H,H.prototype={constructor:H,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ie.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.options.duration?this.pos=t=ie.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ie.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){ie.fx.step[e.prop]?ie.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ie.cssProps[e.prop]]||ie.cssHooks[e.prop])?ie.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ie.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ie.fx=H.prototype.init,ie.fx.step={};var dt,pt,ht,mt,gt,yt,vt,bt=/^(?:toggle|show|hide)$/,xt=new RegExp("^(?:([+-])=|)("+Ee+")([a-z%]*)$","i"),wt=/queueHooks$/,Tt=[F],Ct={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=xt.exec(t),o=i&&i[3]||(ie.cssNumber[e]?"":"px"),a=(ie.cssNumber[e]||"px"!==o&&+r)&&xt.exec(ie.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{a/=s=s||".5",ie.style(n.elem,e,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};ie.Animation=ie.extend(B,{tweener:function(e,t){ie.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r<i;r++)n=e[r],Ct[n]=Ct[n]||[],Ct[n].unshift(t)},prefilter:function(e,t){t?Tt.unshift(e):Tt.push(e)}}),ie.speed=function(e,t,n){var r=e&&"object"==typeof e?ie.extend({},e):{complete:n||!n&&t||ie.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ie.isFunction(t)&&t};return r.duration=ie.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ie.fx.speeds?ie.fx.speeds[r.duration]:ie.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){ie.isFunction(r.old)&&r.old.call(this),r.queue&&ie.dequeue(this,r.queue)},r},ie.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ie.isEmptyObject(e),o=ie.speed(t,n,r),a=function(){var t=B(this,ie.extend({},e),o);(i||ie._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=ie.timers,a=ie._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||ie.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=ie._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ie.timers,a=r?r.length:0;for(n.finish=!0,ie.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1)
6);for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ie.each(["toggle","show","hide"],function(e,t){var n=ie.fn[t];ie.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(_(t,!0),e,r,i)}}),ie.each({slideDown:_("show"),slideUp:_("hide"),slideToggle:_("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ie.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ie.timers=[],ie.fx.tick=function(){var e,t=ie.timers,n=0;for(dt=ie.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||ie.fx.stop(),dt=undefined},ie.fx.timer=function(e){ie.timers.push(e),e()?ie.fx.start():ie.timers.pop()},ie.fx.interval=13,ie.fx.start=function(){pt||(pt=setInterval(ie.fx.tick,ie.fx.interval))},ie.fx.stop=function(){clearInterval(pt),pt=null},ie.fx.speeds={slow:600,fast:200,_default:400},ie.fn.delay=function(e,t){return e=ie.fx&&ie.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},(mt=he.createElement("div")).setAttribute("className","t"),mt.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",yt=mt.getElementsByTagName("a")[0],vt=(gt=he.createElement("select")).appendChild(he.createElement("option")),ht=mt.getElementsByTagName("input")[0],yt.style.cssText="top:1px",ne.getSetAttribute="t"!==mt.className,ne.style=/top/.test(yt.getAttribute("style")),ne.hrefNormalized="/a"===yt.getAttribute("href"),ne.checkOn=!!ht.value,ne.optSelected=vt.selected,ne.enctype=!!he.createElement("form").enctype,gt.disabled=!0,ne.optDisabled=!vt.disabled,(ht=he.createElement("input")).setAttribute("value",""),ne.input=""===ht.getAttribute("value"),ht.value="t",ht.setAttribute("type","radio"),ne.radioValue="t"===ht.value;var Nt=/\r/g;ie.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=ie.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,ie(this).val()):e)?i="":"number"==typeof i?i+="":ie.isArray(i)&&(i=ie.map(i,function(e){return null==e?"":e+""})),(t=ie.valHooks[this.type]||ie.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))})):i?(t=ie.valHooks[i.type]||ie.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:"string"==typeof(n=i.value)?n.replace(Nt,""):null==n?"":n:void 0}}),ie.extend({valHooks:{option:{get:function(e){var t=ie.find.attr(e,"value");return null!=t?t:ie.trim(ie.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&(ne.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ie.nodeName(n.parentNode,"optgroup"))){if(t=ie(n).val(),o)return t;a.push(t)}return a}
6,set:function(e,t){for(var n,r,i=e.options,o=ie.makeArray(t),a=i.length;a--;)if(r=i[a],ie.inArray(ie.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),ie.each(["radio","checkbox"],function(){ie.valHooks[this]={set:function(e,t){if(ie.isArray(t))return e.checked=ie.inArray(ie(e).val(),t)>=0}},ne.checkOn||(ie.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et,kt,St=ie.expr.attrHandle,At=/^(?:checked|selected)$/i,Dt=ne.getSetAttribute,jt=ne.input;ie.fn.extend({attr:function(e,t){return Ae(this,ie.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ie.removeAttr(this,e)})}}),ie.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Te?ie.prop(e,t,n):(1===o&&ie.isXMLDoc(e)||(t=t.toLowerCase(),r=ie.attrHooks[t]||(ie.expr.match.bool.test(t)?kt:Et)),n===undefined?r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=ie.find.attr(e,t))?undefined:i:null!==n?r&&"set"in r&&(i=r.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n):void ie.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(be);if(o&&1===e.nodeType)for(;n=o[i++];)r=ie.propFix[n]||n,ie.expr.match.bool.test(n)?jt&&Dt||!At.test(n)?e[r]=!1:e[ie.camelCase("default-"+n)]=e[r]=!1:ie.attr(e,n,""),e.removeAttribute(Dt?n:r)},attrHooks:{type:{set:function(e,t){if(!ne.radioValue&&"radio"===t&&ie.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),kt={set:function(e,t,n){return!1===t?ie.removeAttr(e,n):jt&&Dt||!At.test(n)?e.setAttribute(!Dt&&ie.propFix[n]||n,n):e[ie.camelCase("default-"+n)]=e[n]=!0,n}},ie.each(ie.expr.match.bool.source.match(/\w+/g),function(e,t){var n=St[t]||ie.find.attr;St[t]=jt&&Dt||!At.test(t)?function(e,t,r){var i,o;return r||(o=St[t],St[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,St[t]=o),i}:function(e,t,n){if(!n)return e[ie.camelCase("default-"+t)]?t.toLowerCase():null}}),jt&&Dt||(ie.attrHooks.value={set:function(e,t,n){if(!ie.nodeName(e,"input"))return Et&&Et.set(e,t,n);e.defaultValue=t}}),Dt||(Et={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},St.id=St.name=St.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},ie.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Et.set},ie.attrHooks.contenteditable={set:function(e,t,n){Et.set(e,""!==t&&t,n)}},ie.each(["width","height"],function(e,t){ie.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ne.style||(ie.attrHooks.style={get:function(e){return e.style.cssText||undefined},set:function(e,t){return e.style.cssText=t+""}});var Lt=/^(?:input|select|textarea|button|object)$/i,Ht=/^(?:a|area)$/i;ie.fn.extend({prop:function(e,t){return Ae(this,ie.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ie.propFix[e]||e,this.each(function(){try{this[e]=undefined,delete this[e]}catch(t){}})}}),ie.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!ie.isXMLDoc(e))&&(t=ie.propFix[t]||t,i=ie.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ie.find.attr(e,"tabindex");return t?parseInt(t,10):Lt.test(e.nodeName)||Ht.test(e.nodeName)&&e.href?0:-1}}}}),ne.hrefNormalized||ie.each(["href","src"],function(e,t){ie.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ne.optSelected||(ie.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ie.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ie.propFix[this.toLowerCase()]=this}),ne.enctype||(ie.propFix.enctype="encoding");var qt=/[\t\r\n\f]/g;ie.fn.extend({addClass:function(e){var t,n,r,i,o,a,s=0,u=this.length,l="string"==typeof e&&e;if(ie.isFunction(e))return this.each(function(t){ie(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(be)||[];s<u;s++)if(r=1===(n=this[s]).nodeType&&(n.className?(" "+n.className+" ").replace(qt," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=ie.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,r,i,o,a,s=0,u=this.length,l=0===arguments.length||"string"==typeof e&&e;if(ie.isFunction(e))return this.each(function(t){ie(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(be)||[];s<u;s++)if(r=1===(n=this[s]).nodeType&&(n.className?(" "+n.className+" ").replace(qt," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=e?ie.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ie.isFunction(e)?this.each(function(n){ie(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=ie(this),o=e.match(be)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else n!==Te&&"boolean"!==n||(this.className&&ie._data(this,"__className__",this.className),this.className=this.className||!1===e?"":ie._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(qt," ").indexOf(t)>=0)return!0;return!1}}),ie.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ie.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ie.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var _t=ie.now(),Mt=/\?/,Ft=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ie.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=ie.trim(t+"");return i&&!ie.trim(i.replace(Ft,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():ie.error("Invalid JSON: "+t)},ie.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?n=(new DOMParser).parseFromString(t,"text/xml"):((n=new ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t))}catch(r){n=undefined}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ie.error("Invalid XML: "+t),n};
6var Ot,Bt,Pt=/#.*$/,Rt=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,$t=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zt=/^(?:GET|HEAD)$/,It=/^\/\//,Xt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ut={},Vt={},Jt="*/".concat("*");try{Bt=location.href}catch(cn){(Bt=he.createElement("a")).href="",Bt=Bt.href}Ot=Xt.exec(Bt.toLowerCase())||[],ie.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Bt,type:"GET",isLocal:$t.test(Ot[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ie.parseJSON,"text xml":ie.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?W(W(e,ie.ajaxSettings),t):W(ie.ajaxSettings,e)},ajaxPrefilter:P(Ut),ajaxTransport:P(Vt),ajax:function(e,t){function n(e,t,n,r){var i,c,y,v,x,T=t;2!==b&&(b=2,s&&clearTimeout(s),l=undefined,a=r||"",w.readyState=e>0?4:0,i=e>=200&&e<300||304===e,n&&(v=$(f,w,n)),v=z(f,v,w,i),i?(f.ifModified&&((x=w.getResponseHeader("Last-Modified"))&&(ie.lastModified[o]=x),(x=w.getResponseHeader("etag"))&&(ie.etag[o]=x)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=v.state,c=v.data,i=!(y=v.error))):(y=T,!e&&T||(T="error",e<0&&(e=0))),w.status=e,w.statusText=(t||T)+"",i?h.resolveWith(d,[c,T,w]):h.rejectWith(d,[w,T,y]),w.statusCode(g),g=undefined,u&&p.trigger(i?"ajaxSuccess":"ajaxError",[w,f,i?c:y]),m.fireWith(d,[w,T]),u&&(p.trigger("ajaxComplete",[w,f]),--ie.active||ie.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=undefined),t=t||{};var r,i,o,a,s,u,l,c,f=ie.ajaxSetup({},t),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?ie(d):ie.event,h=ie.Deferred(),m=ie.Callbacks("once memory"),g=f.statusCode||{},y={},v={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c)for(c={};t=Wt.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)g[t]=[g[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return l&&l.abort(t),n(0,t),this}};if(h.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||Bt)+"").replace(Pt,"").replace(It,Ot[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=ie.trim(f.dataType||"*").toLowerCase().match(be)||[""],null==f.crossDomain&&(r=Xt.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===Ot[1]&&r[2]===Ot[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Ot[3]||("http:"===Ot[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=ie.param(f.data,f.traditional)),R(Ut,f,t,w),2===b)return w;for(i in(u=ie.event&&f.global)&&0==ie.active++&&ie.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!zt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(Mt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Rt.test(o)?o.replace(Rt,"$1_="+_t++):o+(Mt.test(o)?"&":"?")+"_="+_t++)),f.ifModified&&(ie.lastModified[o]&&w.setRequestHeader("If-Modified-Since",ie.lastModified[o]),ie.etag[o]&&w.setRequestHeader("If-None-Match",ie.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Jt+"; q=0.01":""):f.accepts["*"]),f.headers)w.setRequestHeader(i,f.headers[i]);if(f.beforeSend&&(!1===f.beforeSend.call(d,w,f)||2===b))return w.abort();for(i in x="abort",{success:1,error:1,complete:1})w[i](f[i]);if(l=R(Vt,f,t,w)){w.readyState=1,u&&p.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},f.timeout));try{b=1,l.send(y,n)}catch(cn){if(!(b<2))throw cn;n(-1,cn)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return ie.get(e,t,n,"json")},getScript:function(e,t){return ie.get(e,undefined,t,"script")}}),ie.each(["get","post"],function(e,t){ie[t]=function(e,n,r,i){return ie.isFunction(n)&&(i=i||r,r=n,n=undefined),ie.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),ie._evalUrl=function(e){return ie.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},ie.fn.extend({wrapAll:function(e){if(ie.isFunction(e))return this.each(function(t){ie(this).wrapAll(e.call(this,t))});if(this[0]){var t=ie(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return ie.isFunction(e)?this.each(function(t){ie(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ie(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ie.isFunction(e);return this.each(function(n){ie(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ie.nodeName(this,"body")||ie(this).replaceWith(this.childNodes)}).end()}}),ie.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||ie.css(e,"display"))},ie.expr.filters.visible=function(e){return!ie.expr.filters.hidden(e)};var Yt=/%20/g,Gt=/\[\]$/,Qt=/\r?\n/g,Kt=/^(?:submit|button|image|reset|file)$/i,Zt=/^(?:input|select|textarea|keygen)/i;ie.param=function(e,t){var n,r=[],i=function(e,t){t=ie.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=ie.ajaxSettings&&ie.ajaxSettings.traditional),ie.isArray(e)||e.jquery&&!ie.isPlainObject(e))ie.each(e,function(){i(this.name,this.value)});else for(n in e)I(n,e[n],t,i);return r.join("&").replace(Yt,"+")},ie.fn.extend({serialize:function(){return ie.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ie.prop(this,"elements");return e?ie.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ie(this).is(":disabled")&&Zt.test(this.nodeName)&&!Kt.test(e)&&(this.checked||!De.test(e))}).map(function(e,t){var n=ie(this).val();return null==n?null:ie.isArray(n)?ie.map(n,function(e){return{name:t.name,value:e.replace(Qt,"\r\n")}}):{name:t.name,value:n.replace(Qt,"\r\n")}}).get()}}),ie.ajaxSettings.xhr=e.ActiveXObject!==undefined?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.t
6ype)&&X()||U()}:X;var en=0,tn={},nn=ie.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in tn)tn[e](undefined,!0)}),ne.cors=!!nn&&"withCredentials"in nn,(nn=ne.ajax=!!nn)&&ie.ajaxTransport(function(e){var t;if(!e.crossDomain||ne.cors)return{send:function(n,r){var i,o=e.xhr(),a=++en;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];for(i in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)n[i]!==undefined&&o.setRequestHeader(i,n[i]+"");o.send(e.hasContent&&e.data||null),t=function(n,i){var s,u,l;if(t&&(i||4===o.readyState))if(delete tn[a],t=undefined,o.onreadystatechange=ie.noop,i)4!==o.readyState&&o.abort();else{l={},s=o.status,"string"==typeof o.responseText&&(l.text=o.responseText);try{u=o.statusText}catch(cn){u=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=l.text?200:404}l&&r(s,u,l,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=tn[a]=t:t()}
6,abort:function(){t&&t(undefined,!0)}}}),ie.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ie.globalEval(e),e}}}),ie.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ie.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=he.head||ie("head")[0]||he.documentElement;return{send:function(r,i){(t=he.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(undefined,!0)}}}});var rn=[],on=/(=)\?(?=&|$)|\?\?/;ie.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rn.pop()||ie.expando+"_"+_t++;return this[e]=!0,e}}),ie.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(on.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&on.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=ie.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(on,"$1"+i):!1!==t.jsonp&&(t.url+=(Mt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||ie.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,rn.push(i)),a&&ie.isFunction(o)&&o(a[0]),a=o=undefined}),"script"}),ie.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||he;var r=fe.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ie.buildFragment([e],t,i),i&&i.length&&ie(i).remove(),ie.merge([],r.childNodes))};var an=ie.fn.load;ie.fn.load=function(e,t,n){if("string"!=typeof e&&an)return an.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=ie.trim(e.slice(s,e.length)),e=e.slice(0,s)),ie.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(o="POST"),a.length>0&&ie.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?ie("<div>").append(ie.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ie.fn[t]=function(e){return this.on(t,e)}}),ie.expr.filters.animated=function(e){return ie.grep(ie.timers,function(t){return e===t.elem}).length};var sn=e.document.documentElement;ie.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ie.css(e,"position"),c=ie(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ie.css(e,"top"),u=ie.css(e,"left"),("absolute"===l||"fixed"===l)&&ie.inArray("auto",[o,u])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),ie.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ie.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){ie.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,ie.contains(t,i)?(typeof i.getBoundingClientRect!==Te&&(r=i.getBoundingClientRect()),n=V(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ie.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ie.nodeName(e[0],"html")||(n=e.offset()),n.top+=ie.css(e[0],"borderTopWidth",!0),n.left+=ie.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ie.css(r,"marginTop",!0),left:t.left-n.left-ie.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||sn;e&&!ie.nodeName(e,"html")&&"static"===ie.css(e,"position");)e=e.offsetParent;return e||sn})}}),ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);ie.fn[e]=function(r){return Ae(this,function(e,r,i){var o=V(e);if(i===undefined)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?ie(o).scrollLeft():i,n?i:ie(o).scrollTop()):e[r]=i},e,r,arguments.length,null)}}),ie.each(["top","left"],function(e,t){ie.cssHooks[t]=k(ne.pixelPosition,function(e,n){if(n)return n=et(e,t),nt.test(n)?ie(e).position()[t]+"px":n})}),ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ie.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Ae(this,function(t,n,r){var i;return ie.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?ie.css(t,n,a):ie.style(t,n,r,a)},t,o?r:undefined,o,null)}})}),ie.fn.size=function(){return this.length},ie.fn.andSelf=ie.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var un=e.jQuery,ln=e.$;return ie.noConflict=function(t){return e.$===ie&&(e.$=ln),t&&e.jQuery===ie&&(e.jQuery=un),ie},typeof t===Te&&(e.jQuery=e.$=ie),ie}); 7!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,n){var s,o,a,r=e.nodeName.toLowerCase();return"area"===r?(o=(s=e.parentNode).name,!(!e.href||!o||"map"!==s.nodeName.toLowerCase())&&(!!(a=t("img[usemap='#"+o+"']")[0])&&i(a))):(/^(input|select|textarea|button|object)$/.test(r)?!e.disabled:"a"===r&&e.href||n)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n,s,o,a;t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),n="absolute"===i,s=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&s.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:(n=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id
7)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var n=t.attr(i,"tabindex"),s=isNaN(n);return(s||n>=0)&&e(i,!s)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function n(e,i,n,o){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return e===undefined?a["inner"+i].call(this):this.each(function(){t(this).css(o,n(this,e)+"px")})},t.fn["outer"+i]=function(e,s){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,s)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=(s=t.fn.removeData,function(e){return arguments.length?s.call(this,t.camelCase(e)):s.call(this)})),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:(a=t.fn.focus,function(e,i){return"number"==typeof e?this.each(function(){var n=this;setTimeout(function(){t(n).focus(),i&&i.call(n)},e)}):a.apply(this,arguments)}),disableSelection:(o="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(o+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(e!==undefined)return this.css("zIndex",e);if(this.length)for(var i,n,s=t(this[0]);s.length&&s[0]!==document;){if(("absolute"===(i=s.css("position"))||"relative"===i||"fixed"===i)&&(n=parseInt(s.css("zIndex"),10),!isNaN(n)&&0!==n))return n;s=s.parent()}return 0}}),t.ui.plugin={add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i,n){var s,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)t.options[o[s][0]]&&o[s][1].apply(t.element,i)}};var r=0,u=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,s,o;for(o=0;null!=(s=i[o]);o++)try{(n=t._data(s,"events"))&&n.remove&&t(s).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var s,o,a,r,u={},l=e.split(".")[0];return e=e.split(".")[1],s=l+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[l]=t[l]||{},o=t[l][e],a=t[l][e]=function(t,e){if(!this._createWidget)return new a(t,e);arguments.length&&this._createWidget(t,e)},t.extend(a,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(n,function(e,n){var s,o;t.isFunction(n)?u[e]=(s=function(){return i.prototype[e].apply(this,arguments)},o=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}):u[e]=n}),a.prototype=t.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||e},u,{constructor:a,namespace:l,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete o._childConstructors):i._childConstructors.push(a),t.widget.bridge(e,a),a},t.widget.extend=function(e){for(var i,n,s=u.call(arguments,1),o=0,a=s.length;o<a;o++)for(i in s[o])n=s[o][i],s[o].hasOwnProperty(i)&&n!==undefined&&(t.isPlainObject(n)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):e[i]=n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(s){var o="string"==typeof s,a=u.call(arguments,1
vendor: 5,518 bytes, line 7
7),r=this;return o?this.each(function(){var i,o=t.data(this,n);return"instance"===s?(r=o,!1):o?t.isFunction(o[s])&&"_"!==s.charAt(0)?(i=o[s].apply(o,a))!==o&&i!==undefined?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+s+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+s+"'")}):(a.length&&(s=t.widget.extend.apply(null,[s].concat(a))),this.each(function(){var e=t.data(this,n);e?(e.option(s||{}),e._init&&e._init()):t.data(this,n,new i(s,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=r++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,s,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(n=e.split(".")).shift(),n.length){for(s=a[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)s[n[o]]=s[n[o]]||{},s=s[n[o]];if(e=n.pop(),1===arguments.length)return s[e]===undefined?null:s[e];s[e]=i}else{if(1===arguments.length)return this.options[e]===undefined?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,a){function r(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var u=n.match(/^([\w:-]*)\s*(.*)$/),l=u[1]+o.eventNamespace,h=u[2];h?s.delegate(h,l,r):i.bind(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var s,o,a=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var a,r=s?!0===s||"number"==typeof s?i:s.effect||i:e;"number"==typeof(s=s||{})&&(s={duration:s}),a=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&t.effects&&t.effects.effect[r]?n[e](s):r!==e&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}});t.widget;!function(){function e(t,e,i){return[parseFloat(t[0])*(f.test(t[0])?e/100:1),parseFloat(t[1])*(f.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var s,o,a=Math.max,r=Math.abs,u=Math.round,l=/left|center|right/,h=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,m=t.fn.position;
vendor: 5,068 bytes, line 7
7t.position={scrollbarWidth:function(){if(s!==undefined)return s;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),e===(i=o.offsetWidth)&&(i=n[0].clientWidth),n.remove(),s=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n||s?i.width():i.outerWidth(),height:n||s?i.height():i.outerHeight()}}},t.fn.position=function(s){if(!s||!s.of)return m.apply(this,arguments);s=t.extend({},s);var f,p,v,g,_,b,y=t(s.of),w=t.position.getWithinInfo(s.within),x=t.position.getScrollInfo(w),C=(s.collision||"flip").split(" "),E={};return b=n(y),y[0].preventDefault&&(s.at="left top"),p=b.width,v=b.height,g=b.offset,_=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(s[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=c.exec(i[0]),e=c.exec(i[1]),E[this]=[t?t[0]:0,e?e[0]:0],s[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===C.length&&(C[1]=C[0]),"right"===s.at[0]?_.left+=p:"center"===s.at[0]&&(_.left+=p/2),"bottom"===s.at[1]?_.top+=v:"center"===s.at[1]&&(_.top+=v/2),f=e(E.at,p,v),_.left+=f[0],_.top+=f[1],this.each(function(){var n,l,h=t(this),c=h.outerWidth(),d=h.outerHeight(),m=i(this,"marginLeft"),b=i(this,"marginTop"),T=c+m+i(this,"marginRight")+x.width,W=d+b+i(this,"marginBottom")+x.height,k=t.extend({},_),A=e(E.my,h.outerWidth(),h.outerHeight());"right"===s.my[0]?k.left-=c:"center"===s.my[0]&&(k.left-=c/2),"bottom"===s.my[1]?k.top-=d:"center"===s.my[1]&&(k.top-=d/2),k.left+=A[0],k.top+=A[1],o||(k.left=u(k.left),k.top=u(k.top)),n={marginLeft:m,marginTop:b},t.each(["left","top"],function(e,i){t.ui.position[C[e]]&&t.ui.position[C[e]][i](k,{targetWidth:p,targetHeight:v,elemWidth:c,elemHeight:d,collisionPosition:n,collisionWidth:T,collisionHeight:W,offset:[f[0]+A[0],f[1]+A[1]],my:s.my,at:s.at,within:w,elem:h})}),s.using&&(l=function(t){var e=g.left-k.left,i=e+p-c,n=g.top-k.top,o=n+v-d,u={target:{element:y,left:g.left,top:g.top,width:p,height:v},element:{element:h,left:k.left,top:k.top,width:c,height:d},horizontal:i<0?"left":e>0?"right":"center",vertical:o<0?"top":n>0?"bottom":"middle"};p<c&&r(e+i)<p&&(u.horizontal="center"),v<d&&r(n+o)<v&&(u.vertical="middle"),a(r(e),r(i))>a(r(n),r(o))?u.important="horizontal":u.important="vertical",s.using.call(this,t,u)}),h.offset(t.extend(k,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,r=t.left-e.collisionPosition.marginLeft,u=s-r,l=r+e.collisionWidth-o-s;e.collisionWidth>o?u>0&&l<=0?(i=t.left+u+e.collisionWidth-o-s,t.left+=u-i):t.left=l>0&&u<=0?s:u>l?s+o-e.collisionWidth:s:u>0?t.left+=u:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,u=s-r,l=r+e.collisionHeight-o-s;e.collisionHeight>o?u>0&&l<=0?(i=t.top+u+e.collisionHeight-o-s,t.top+=u-i):t.top=l>0&&u<=0?s:u>l?s+o-e.collisionHeight:s:u>0?t.top+=u:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,a=s.width,u=s.isWindow?s.scrollLeft:s.offset.left,l=t.left-e.collisionPosition.marginLeft,h=l-u,c=l+e.collisionWidth-a-u,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,m=-2*e.offset[0];h<0?((i=t.left+d+f+m+e.collisionWidth-a-o)<0||i<r(h))&&(t.left+=d+f+m):c>0&&((n=t.left-e.collisionPosition.marginLeft+d+f+m-u)>0||r(n)<c)&&(t.left+=d+f+m)},top:function(t,e){var i,n,s=e.within,o=s.offset.top+s.scrollTop,a=s.height,u=s.isWindow?s.scrollTop:s.offset.top,l=t.top-e.collisionPosition.marginTop,h=l-u,c=l+e.collisionHeight-a-u,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];h<0?((n=t.top+d+f+m+e.collisionHeight-a-o)<0||n<r(h))&&(t.top+=d+f+m):c>0&&((i=t.top-e.collisionPosition.marginTop+d+f+m-u)>0||r(i)<c)&&(t.top+=d+f+m)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,s,a,r=document.getElementsByTagName("body")[0],u=document.createElement("div");
vendor: 7,328 bytes, line 7
7for(a in e=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"}),n)e.style[a]=n[a];e.appendChild(u),(i=r||document.documentElement).insertBefore(e,i.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",s=t(u).offset().left,o=s>10&&s<11,e.innerHTML="",i.removeChild(e)}()}();t.ui.position,t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var i,n,s,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,n=this.previousFilter||"",s=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),s===n?o=!0:s=n+s,i=this._filterMenuItems(s),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(s=String.fromCharCode(e.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(e,i),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,i=this,n=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.parent(),s=t("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),(e=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),e.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,s,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),s<0?this.activeMenu.scrollTop(o+s):s+r>a&&this.activeMenu.scrollTop(o+s-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
7se").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-n-s<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var i,n,s;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).text()))})}});t.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,a="input"===s;this.isMultiLine=!!o||!a&&this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(n){n.target===e.element[0]||n.target===i||t.contains(i,n.target)||e.close()})})},menufocus:function(e,i){var n,s;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s}
7)&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),(n=i.item.attr("aria-label")||s.value)&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,s){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").text(i.label).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}), 8t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}});t.ui.autocomplete}); 9!function(e,t,i){function o(i,o,n){var r=t.createElement(i);return o&&(r.id=ee+o),n&&(r.style.cssText=n),e(r)}function n(){return i.innerHeight?i.innerHeight:e(i).height()}function r(e){var t=E.length,i=(j+e)%t;return i<0?t+i:i}function l(e,t){return Math.round((/%/.test(e)?("x"===t?H.width():n())/100:1)*parseInt(e,10))}function h(e,t){return e.photo||e.photoRegex.test(t)}function s(e,t){return e.retinaUrl&&i.devicePixelRatio>1?t.replace(e.photoRegex,e.retinaSuffix):t}function a(e){"contains"in y[0]&&!y[0].contains(e.target)&&(e.stopPropagation(),y.focus())}function d(){var t,i=e.data(A,Z);for(t in null==i?(O=e.extend({},Y),console&&console.log&&console.log("Error: cboxElement missing settings object")):O=e.extend({},i),O)e.isFunction(O[t])&&"on"!==t.slice(0,2)&&(O[t]=O[t].call(A));O.rel=O.rel||A.rel||e(A).data("rel")||"nofollow",O.href=O.href||e(A).attr("href"),O.title=O.title||A.title,"string"==typeof O.href&&(O.href=e.trim(O.href))}function c(i,o){e(t).trigger(i),se.trigger(i),e.isFunction(o)&&o.call(A)}function u(){var e,t,i,o,n,r=ee+"Slideshow_",l="click."+ee;O.slideshow&&E[1]?(t=function(){clearTimeout(e)},i=function(){(O.loop||E[j+1])&&(e=setTimeout(J.next,O.slideshowSpeed))},o=function(){R.html(O.slideshowStop).unbind(l).one(l,n),se.bind(ne,i).bind(oe,t).bind(re,n),y.removeClass(r+"off").addClass(r+"on")},n=function(){t(),se.unbind(ne,i).unbind(oe,t).unbind(re,n),R.html(O.slideshowStart).unbind(l).one(l,function(){J.next(),o()}),y.removeClass(r+"on").addClass(r+"off")},O.slideshowAuto?o():n()):y.removeClass(r+"off "+r+"on")}function p(i){G||(A=i,d(),E=e(A),j=0,"nofollow"!==O.rel&&(E=e("."+te).filter(function(){var t,i=e.data(this,Z);return i&&(t=e(this).data("rel")||i.rel||this.rel),t===O.rel}),-1===(j=E.index(A))&&(E=E.add(A),j=E.length-1)),g.css({opacity:parseFloat(O.opacity),cursor:O.overlayClose?"pointer":"auto",visibility:"visible"}).show(),V&&y.add(g).removeClass(V),O.className&&y.add(g).addClass(O.className),V=O.className,O.closeButton?P.html(O.close).appendTo(x):P.appendTo("<div/>"),$||($=q=!0,y.css({visibility:"hidden",display:"block"}),W=o(ae,"LoadedContent","width:0; height:0; overflow:hidden"),x.css({width:"",height:""}).append(W),_=b.height()+k.height()+x.outerHeight(!0)-x.height(),D=T.width()+C.width()+x.outerWidth(!0)-x.width(),N=W.outerHeight(!0),z=W.outerWidth(!0),O.w=l(O.initialWidth,"x"),O.h=l(O.initialHeight,"y"),J.position(),u(),c(ie,O.onOpen),B.add(S).hide(),y.focus(),O.trapFocus&&t.addEventListener&&(t.addEventListener("focus",a,!0),se.one(le,function(){t.removeEventListener("focus",a,!0)})),O.returnFocus&&se.one(le,function(){e(A).focus()})),w())}function f(){!y&&t.body&&(X=!1,H=e(i),y=o(ae).attr({id:Z,"class":!1===e.support.opacity?ee+"IE":"",role:"dialog",tabindex:"-1"}).hide(),g=o(ae,"Overlay").hide(),L=e([o(ae,"LoadingOverlay")[0],o(ae,"LoadingGraphic")[0]]),v=o(ae,"Wrapper"),x=o(ae,"Content").append(S=o(ae,"Title"),M=o(ae,"Current"),K=e('<button type="button"/>').attr({id:ee+"Previous"}),I=e('<button type="button"/>').attr({id:ee+"Next"}),R=o("button","Slideshow"),L),P=e('<button type="button"/>').attr({id:ee+"Close"}),v.append(o(ae).append(o(ae,"TopLeft"),b=o(ae,"TopCenter"),o(ae,"TopRight")),o(ae,!1,"clear:left").append(T=o(ae,"MiddleLeft"),x,C=o(ae,"MiddleRight")),o(ae,!1,"clear:left").append(o(ae,"BottomLeft"),k=o(ae,"BottomCenter"),o(ae,"BottomRight"))).find("div div").css({float:"left"}),F=o(ae,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),B=I.add(K).add(M).add(R),e(t.body).append(g,y.append(v,F)))}function m(){function i(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),p(this))}return!!y&&(X||(X=!0,I.click(function(){J.next()}),K.click(function(){J.prev()}),P.click(function(){J.close()}),g.click(function(){O.overlayClose&&J.close()}),e(t).bind("keydown."+ee,function(e){var t=e.keyCode;$&&O.escKey&&27===t&&(e.preventDefault(),J.close()),$&&O.arrowKey&&E[1]&&
9!e.altKey&&(37===t?(e.preventDefault(),K.click()):39===t&&(e.preventDefault(),I.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+ee,"."+te,i):e("."+te).live("click."+ee,i)),!0)}function w(){var n,r,a,u=J.prep,p=++de;q=!0,U=!1,A=E[j],d(),c(he),c(oe,O.onLoad),O.h=O.height?l(O.height,"y")-N-_:O.innerHeight&&l(O.innerHeight,"y"),O.w=O.width?l(O.width,"x")-z-D:O.innerWidth&&l(O.innerWidth,"x"),O.mw=O.w,O.mh=O.h,O.maxWidth&&(O.mw=l(O.maxWidth,"x")-z-D,O.mw=O.w&&O.w<O.mw?O.w:O.mw),O.maxHeight&&(O.mh=l(O.maxHeight,"y")-N-_,O.mh=O.h&&O.h<O.mh?O.h:O.mh),n=O.href,Q=setTimeout(function(){L.show()},100),O.inline?(a=o(ae).hide().insertBefore(e(n)[0]),se.one(he,function(){a.replaceWith(W.children())}),u(e(n))):O.iframe?u(" "):O.html?u(O.html):h(O,n)?(n=s(O,n),U=t.createElement("img"),e(U).addClass(ee+"Photo").bind("error",function(){O.title=!1,u(o(ae,"Error").html(O.imgError))}).one("load",function(){var t;p===de&&(U.alt=e(A).attr("alt")||e(A).attr("data-alt")||"",O.retinaImage&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),O.scalePhotos&&(r=function(){U.height-=U.height*t,U.width-=U.width*t},O.mw&&U.width>O.mw&&(t=(U.width-O.mw)/U.width,r()),O.mh&&U.height>O.mh&&(t=(U.height-O.mh)/U.height,r())),O.h&&(U.style.marginTop=Math.max(O.mh-U.height,0)/2+"px"),E[1]&&(O.loop||E[j+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",setTimeout(function(){u(U)},1))}),setTimeout(function(){U.src=n},1)):n&&F.load(n,O.data,function(t,i){p===de&&u("error"===i?o(ae,"Error").html(O.xhrError):e(this).contents())})}var g,y,v,x,b,T,C,k,E,H,W,F,L,S,M,R,I,K,P,B,O,_,D,N,z,A,j,U,$,q,G,Q,J,V,X,Y={transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"{current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,trapFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined,closeButton:!0},Z="colorbox",ee="cbox",te=ee+"Element",ie=ee+"_open",oe=ee+"_load",ne=ee+"_complete",re=ee+"_cleanup",le=ee+"_closed",he=ee+"_purge",se=e("<a/>"),ae="div",de=0,ce={};e.colorbox||(e(f),(J=e.fn[Z]=e[Z]=function(t,i){var o=this;if(t=t||{},f(),m()){if(e.isFunction(o))o=e("<a/>"),t.open=!0;else if(!o[0])return o;i&&(t.onComplete=i),o.each(function(){e.data(this,Z,e.extend({},e.data(this,Z)||Y,t))}).addClass(te),(e.isFunction(t.open)&&t.open.call(o)||t.open)&&p(o[0])}return o}).position=function(t,i){function o(){b[0].style.width=k[0].style.width=x[0].style.width=parseInt(y[0].style.width,10)-D+"px",x[0].style.height=T[0].style.height=C[0].style.height=parseInt(y[0].style.height,10)-_+"px"}var r,h,s,a=0,d=0,c=y.offset();if(H.unbind("resize."+ee),y.css({top:-9e4,left:-9e4}),h=H.scrollTop(),s=H.scrollLeft(),O.fixed?(c.top-=h,c.left-=s,y.css({position:"fixed"})):(a=h,d=s,y.css({position:"absolute"})),!1!==O.right?d+=Math.max(H.width()-O.w-z-D-l(O.right,"x"),0):!1!==O.left?d+=l(O.left,"x"):d+=Math.round(Math.max(H.width()-O.w-z-D,0)/2),!1!==O.bottom?a+=Math.max(n()-O.h-N-_-l(O.bottom,"y"),0):!1!==O.top?a+=l(O.top,"y"):a+=Math.round(Math.max(n()-O.h-N-_,0)/2),y.css({top:c.top,left:c.left,visibility:"visible"}),v[0].style.width=v[0].style.height="9999px",r={width:O.w+z+D,height:O.h+N+_,top:a,left:d},t){var u=0;e.each(r,function(e){r[e]===ce[e]||(u=t)}),t=u}ce=r,t||y.css(r),y.dequeue().animate(r,{duration:t||0,complete:function(){o(),q=!1,v[0].style.width=O.w+z+D+"px",v[0].style.height=O.h+N+_+"px",O.reposition&&setTimeout(function(){H.bind("resize."+ee,J.position)},1),i&&i()},step:o})},J.resize=function(e){var t;$&&((e=e||{}).width&&(O.w=l(e.width,"x")-z-D),e.innerWidth&&(O.w=l(e.innerWidth,"x")),W.css({width:O.w}
9),e.height&&(O.h=l(e.height,"y")-N-_),e.innerHeight&&(O.h=l(e.innerHeight,"y")),e.innerHeight||e.height||(t=W.scrollTop(),W.css({height:"auto"}),O.h=W.height()),W.css({height:O.h}),t&&W.scrollTop(t),J.position("none"===O.transition?0:O.speed))},J.prep=function(i){function n(){return O.w=O.w||W.width(),O.w=O.mw&&O.mw<O.w?O.mw:O.w,O.w}function l(){return O.h=O.h||W.height(),O.h=O.mh&&O.mh<O.h?O.mh:O.h,O.h}if($){var a,d="none"===O.transition?0:O.speed;W.empty().remove(),(W=o(ae,"LoadedContent").append(i)).hide().appendTo(F.show()).css({width:n(),overflow:O.scrolling?"auto":"hidden"}).css({height:l()}).prependTo(x),F.hide(),e(U).css({float:"none"}),a=function(){function i(){!1===e.support.opacity&&y[0].style.removeAttribute("filter")}var n,l,a=E.length,u="frameBorder",p="allowTransparency";$&&(l=function(){clearTimeout(Q),L.hide(),c(ne,O.onComplete)},S.html(O.title).add(W).show(),a>1?("string"==typeof O.current&&M.html(O.current.replace("{current}",j+1).replace("{total}",a)).show(),I[O.loop||j<a-1?"show":"hide"]().html(O.next),K[O.loop||j?"show":"hide"]().html(O.previous),O.slideshow&&R.show(),O.preloading&&e.each([r(-1),r(1)],function(){var i,o=E[this],n=e.data(o,Z);n&&n.href?(i=n.href,e.isFunction(i)&&(i=i.call(o))):i=e(o).attr("href"),i&&h(n,i)&&(i=s(n,i),t.createElement("img").src=i)})):B.hide(),O.iframe?(u in(n=o("iframe")[0])&&(n[u]=0),p in n&&(n[p]="true"),O.scrolling||(n.scrolling="no"),e(n).attr({src:O.href,name:(new Date).getTime(),"class":ee+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",l).appendTo(W),se.one(he,function(){n.src="//about:blank"}),O.fastIframe&&e(n).trigger("load")):l(),"fade"===O.transition?y.fadeTo(d,1,i):i())},"fade"===O.transition?y.fadeTo(d,0,function(){J.position(0,a)}):J.position(d,a)}},J.next=function(){!q&&E[1]&&(O.loop||E[j+1])&&(j=r(1),p(E[j]))},J.prev=function(){!q&&E[1]&&(O.loop||j)&&(j=r(-1),p(E[j]))},J.close=function(){$&&!G&&(G=!0,$=!1,c(re,O.onCleanup),H.unbind("."+ee),g.fadeTo(O.fadeOut||0,0),y.stop().fadeTo(O.fadeOut||0,0,function(){y.add(g).css({opacity:1,cursor:"auto"}).hide(),c(he),W.empty().remove(),setTimeout(function(){G=!1,c(le,O.onClosed)},1)}))},J.remove=function(){y&&(y.stop(),e.colorbox.close(),y.stop().remove(),g.remove(),G=!1,y=null,e("."+te).removeData(Z).removeClass(te),e(t).unbind("click."+ee))},J.element=function(){return e(A)},J.settings=Y)}(jQuery,document,window); 10!function(e,o,t){function n(e){return e}function i(e){return decodeURIComponent(e.replace(r," "))}var r=/\+/g;e.cookie=function(r,c,u){if(c!==t&&!/Object/.test(Object.prototype.toString.call(c))){if(u=e.extend({},e.cookie.defaults,u),null===c&&(u.expires=-1),"number"==typeof u.expires){var a=u.expires,p=u.expires=new Date;p.setDate(p.getDate()+a)}return c=String(c),o.cookie=[encodeURIComponent(r),"=",u.raw?c:encodeURIComponent(c),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var s,l=(u=c||e.cookie.defaults||{}).raw?n:i,f=o.cookie.split("; "),d=0;s=f[d]&&f[d].split("=");d++)if(l(s.shift())===r)return l(s.join("="));return null},e.cookie.defaults={},e.removeCookie=function(o,t){return null!==e.cookie(o,t)&&(e.cookie(o,null,t),!0)}}(jQuery,document); 11!function(e,t){function r(e,r){a.addType(e,function(n,o,u){var s,p,l,f,d=o,c=(new Date).getTime();if(!n){d={},f=[],l=0;try{for(n=r.length;n=r.key(l++);)i.test(n)&&((p=JSON.parse(r.getItem(n))).expires&&p.expires<=c?f.push(n):d[n.replace(i,"")]=p.data);for(;n=f.pop();)r.removeItem(n)}catch(y){}return d}if(n="__amplify__"+n,o===t){if(!((p=(s=r.getItem(n))?JSON.parse(s):{expires:-1}).expires&&p.expires<=c))return p.data;r.removeItem(n)}else if(null===o)r.removeItem(n);else{p=JSON.stringify({data:o,expires:u.expires?c+u.expires:null});try{r.setItem(n,p)}catch(y){a[e]();try{r.setItem(n,p)}catch(y){throw a.error()}}}return d})}var a=e.store=function(e,t,r,i){i=a.type;return r&&r.type&&r.type in a.types&&(i=r.type),a.types[i](e,t,r||{})};a.types={},a.type=null,a.addType=function(e,t){a.type||(a.type=e),a.types[e]=t,a[e]=function(t,r,i){return(i=i||{}).type=e,a(t,r,i)}},a.error=function(){return"amplify.store quota exceeded"};var i=/^__amplify__/;for(var n in{localStorage:1,sessionStorage:1})try{window[n].getItem&&r(n,window[n])}catch(o){}if(window.globalStorage)try{r("globalStorage",window.globalStorage[window.location.hostname]),"sessionStorage"===a.type&&(a.type="globalStorage")}catch(o){}!function(){if(!a.types.localStorage){var e=document.createElement("div"),r="amplify";e.style.display="none",document.getElementsByTagName("head")[0].appendChild(e),e.addBehavior&&(e.addBehavior("#default#userdata"),a.addType("userData",function(i,n,o){e.load(r);var u,s,p,l,f,d=n,c=(new Date).getTime();if(!i){for(d={},f=[],l=0;u=e.XMLDocument.documentElement.attributes[l++];)(s=JSON.parse(u.value)).expires&&s.expires<=c?f.push(u.name):d[u.name]=s.data;for(;i=f.pop();)e.removeAttribute(i);return e.save(r),d}if(i=i.replace(/[^-._0-9A-Za-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u37f-\u1fff\u200c-\u200d\u203f\u2040\u2070-\u218f]/g,"-"),n===t){if(!((s=(u=e.getAttribute(i))?JSON.parse(u):{expires:-1}).expires&&s.expires<=c))return s.data;e.removeAttribute(i)}else null===n?e.removeAttribute(i):(p=e.getAttribute(i),s=JSON.stringify({data:n,expires:o.expires?c+o.expires:null}),e.setAttribute(i,s));try{e.save(r)}catch(y){null===p?e.removeAttribute(i):e.setAttribute(i,p),a.userData();try{e.setAttribute(i,s),e.save(r)}catch(y){throw null===p?e.removeAttribute(i):e.setAttribute(i,p),a.error()}}return d}))}}(),function(){function e(e){return e===t?t:JSON.parse(JSON.stringify(e))}
11var r={};a.addType("memory",function(a,i,n){return a?i===t?e(r[a]):null===i?(delete r[a],null):(r[a]=i,n.expires&&setTimeout(function(){delete r[a]},n.expires),i):e(r)})}()}(this.amplify=this.amplify||{}); 12var Liquid={author:"<%= AUTHOR %>",version:"<%= VERSION %>",readTemplateFile:function(){throw"This liquid context does not allow includes."},registerFilters:function(e){Liquid.Template.registerFilter(e)},parse:function(e){return Liquid.Template.parse(e)}}; 13Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var r=0;r<this.length;r++)if(this[r]==t)return r;return-1}),Array.prototype.clear||(Array.prototype.clear=function(){this.length=0}),Array.prototype.map||(Array.prototype.map=function(t){var r=this.length;if("function"!=typeof t)throw"Array.map requires first argument to be a function";for(var e=new Array(r),i=arguments[1],n=0;n<r;n++)n in this&&(e[n]=t.call(i,this[n],n,this));return e}),Array.prototype.first||(Array.prototype.first=function(){return this[0]}),Array.prototype.last||(Array.prototype.last=function(){return this[this.length-1]}),Array.prototype.flatten||(Array.prototype.flatten=function(){for(var t=this.length,r=[],e=0;e<t;e++)this[e]instanceof Array?r=r.concat(this[e]):r.push(this[e]);return r}),Array.prototype.each||(Array.prototype.each=function(t){var r=this.length;if("function"!=typeof t)throw"Array.each requires first argument to be a function";for(var e=arguments[1],i=0;i<r;i++)i in this&&t.call(e,this[i],i,this);return null}),Array.prototype.include||(Array.prototype.include=function(t){this.length;return this.indexOf(t)>=0}),String.prototype.capitalize||(String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}),String.prototype.strip||(String.prototype.strip=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Liquid.extensions={},Liquid.extensions.object={},Liquid.extensions.object.update=function(t){for(var r in t)this[r]=t[r];return this},Liquid.extensions.object.hasKey=function(t){return!!this[t]},Liquid.extensions.object.hasValue=function(t){for(var r in this)if(this[r]==t)return!0;return!1}; 14!function(){var t=!1,n=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(i){function r(){!t&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;t=!0;var s=new this;for(var o in t=!1,i)s[o]="function"==typeof i[o]&&"function"==typeof e[o]&&n.test(i[o])?function(t,n){return function(){var i=this._super;this._super=e[t];var r=n.apply(this,arguments);return this._super=i,r}}(o,i[o]):i[o];return r.prototype=s,r.prototype.constructor=r,r.extend=arguments.callee,r}}(); 15Liquid.Tag=Class.extend({init:function(i,t,n){this.tagName=i,this.markup=t,this.nodelist=this.nodelist||[],this.parse(n)},parse:function(){},render:function(){return""}}); 16Liquid.Block=Liquid.Tag.extend({init:function(t,e,i){this.blockName=t,this.blockDelimiter="end"+this.blockName,this._super(t,e,i)},parse:function(t){this.nodelist||(this.nodelist=[]),this.nodelist.clear();var e=t.shift();for(t.push("");t.length;){if(/^\{\%/.test(e)){var i=e.match(/^\{\%\s*(\w+)\s*(.*)?\%\}$/);if(!i)throw"Tag '"+e+"' was not properly terminated with: %}";if(this.blockDelimiter==i[1])return void this.endTag();i[1]in Liquid.Template.tags?this.nodelist.push(new Liquid.Template.tags[i[1]](i[1],i[2],t)):this.unknownTag(i[1],i[2],t)}else/^\{\{/.test(e)?this.nodelist.push(this.createVariable(e)):this.nodelist.push(e);e=t.shift()}this.assertMissingDelimitation()},endTag:function(){},unknownTag:function(t){switch(t){case"else":throw this.blockName+" tag does not expect else tag";case"end":throw"'end' is not a valid delimiter for "+this.blockName+" tags. use "+this.blockDelimiter;default:throw"Unknown tag: "+t}},createVariable:function(t){var e=t.match(/^\{\{(.*)\}\}$/);if(e)return new Liquid.Variable(e[1]);throw"Variable '"+t+"' was not properly terminated with: }}"},render:function(t){return this.renderAll(this.nodelist,t)},renderAll:function(t,e){return(t||[]).map(function(t){var i="";try{i=t.render?t.render(e):t}catch(n){i=e.handleError(n)}return i})},assertMissingDelimitation:function(){throw this.blockName+" tag was never closed"}}); 17Liquid.Document=Liquid.Block.extend({init:function(i){this.blockDelimiter=[],this.parse(i)},assertMissingDelimitation:function(){}}); 18Liquid.Strainer=Class.extend({init:function(i){this.context=i},respondTo:function(i){return!(i=i.toString()).match(/^__/)&&(!Liquid.Strainer.requiredMethods.include(i)&&i in this)}}),Liquid.Strainer.filters={},Liquid.Strainer.globalFilter=function(i){for(var r in i)Liquid.Strainer.filters[r]=i[r]},Liquid.Strainer.requiredMethods=["respondTo","context"],Liquid.Strainer.create=function(i){var r=new Liquid.Strainer(i);for(var t in Liquid.Strainer.filters)r[t]=Liquid.Strainer.filters[t];return r};
19Liquid.Context=Class.extend({init:function(t,e,i){this.scopes=[t||{}],this.registers=e||{},this.errors=[],this.rethrowErrors=i,this.strainer=Liquid.Strainer.create(this)},get:function(t){return this.resolve(t)},set:function(t,e){this.scopes[0][t]=e},hasKey:function(t){return!!this.resolve(t)},push:function(){var t={};return this.scopes.unshift(t),t},merge:function(t){return Liquid.extensions.object.update.call(this.scopes[0],t)},pop:function(){if(1==this.scopes.length)throw"Context stack error";return this.scopes.shift()},stack:function(t,e){var i=null;this.push();try{i=t.apply(e||this.strainer)}finally{this.pop()}return i},invoke:function(t,e){return this.strainer.respondTo(t)?this.strainer[t].apply(this.strainer,e):0==e.length?null:e[0]},resolve:function(t){switch(t){case null:case"nil":case"null":case"":return null;case"true":return!0;case"false":return!1;case"blank":case"empty":return"";default:if(/^'(.*)'$/.test(t))return t.replace(/^'(.*)'$/,"$1");if(/^"(.*)"$/.test(t))return t.replace(/^"(.*)"$/,"$1");if(/^(\d+)$/.test(t))return parseInt(t.replace(/^(\d+)$/,"$1"));if(/^(\d[\d\.]+)$/.test(t))return parseFloat(t.replace(/^(\d[\d\.]+)$/,"$1"));if(/^\((\S+)\.\.(\S+)\)$/.test(t)){var e=t.match(/^\((\S+)\.\.(\S+)\)$/),i=parseInt(e[1]),r=parseInt(e[2]),s=[];if(isNaN(i)||isNaN(r)){i=e[1].charCodeAt(0);for(var n=(r=e[2].charCodeAt(0))-i+1,o=0;o<n;o++)s.push(String.fromCharCode(o+i))}else for(n=r-i+1,o=0;o<n;o++)s.push(o+i);return s}return this.variable(t)}},findVariable:function(t){for(var e=0;e<this.scopes.length;e++){var i=this.scopes[e];if(i&&"undefined"!=typeof i[t]){var r=i[t];return"function"==typeof r&&(r=r.apply(this),i[t]=r),r&&this._isObject(r)&&"toLiquid"in r&&(r=r.toLiquid()),r&&this._isObject(r)&&"setContext"in r&&r.setContext(self),r}}return null},variable:function(t){if("string"!=typeof t)return null;var e=t.match(/\[[^\]]+\]|(?:[\w\-]\??)+/g),i=e.shift(),r=i.match(/^\[(.*)\]$/);r&&(i=this.resolve(r[1]));var s=this.findVariable(i),n=this;return s&&e.each(function(t){var e=t.match(/^\[(.*)\]$/);if(e){t=n.resolve(e[1]);"function"==typeof s[t]&&(s[t]=s[t].apply(this)),s=s[t],n._isObject(s)&&"toLiquid"in s&&(s=s.toLiquid())}else{if((n._isObject(s)||"hash"==typeof s)&&t in s){var i=s[t];"function"==typeof i&&(i=s[t]=i.apply(n)),s=n._isObject(i)&&"toLiquid"in i?i.toLiquid():i}else if(/^\d+$/.test(t)){var r=parseInt(t);"function"==typeof s[r]&&(s[r]=s[r].apply(n)),s=n._isObject(s)&&n._isObject(s[r])&&"toLiquid"in s[r]?s[r].toLiquid():s[r]}else{if(!s||"function"!=typeof s[t]||!["length","size","first","last"].include(t))return s=null;"toLiquid"in(s=s[t].apply(t))&&(s=s.toLiquid())}n._isObject(s)&&"setContext"in s&&s.setContext(n)}}),s},addFilters:function(t){(t=t.flatten()).each(function(t){if(!this._isObject(t))throw"Expected object but got: "+typeof t;this.strainer.addMethods(t)})},handleError:function(t){if(this.errors.push(t),this.rethrowErrors)throw t;return"Liquid error: "+(t.message?t.message:t.description?t.description:t)},_isObject:function(t){return null!=t&&"object"==typeof t}}); 20Liquid.Template=Class.extend({init:function(){this.root=null,this.registers={},this.assigns={},this.errors=[],this.rethrowErrors=!1},parse:function(r){return this.root=new Liquid.Document(Liquid.Template.tokenize(r)),this},render:function(){if(!this.root)return"";var r={ctx:arguments[0],filters:arguments[1],registers:arguments[2]},t=null;r.ctx instanceof Liquid.Context?(t=r.ctx,this.assigns=t.assigns,this.registers=t.registers):(r.ctx&&Liquid.extensions.object.update.call(this.assigns,r.ctx),r.registers&&Liquid.extensions.object.update.call(this.registers,r.registers),t=new Liquid.Context(this.assigns,this.registers,this.rethrowErrors)),r.filters&&t.addFilters(arg.filters);try{return this.root.render(t).join("")}finally{this.errors=t.errors}},renderWithErrors:function(){var r=this.rethrowErrors;this.rethrowErrors=!0;var t=this.render.apply(this,arguments);return this.rethrowErrors=r,t}}),Liquid.Template.tags={},Liquid.Template.registerTag=function(r,t){Liquid.Template.tags[r]=t},Liquid.Template.registerFilter=function(r){Liquid.Strainer.globalFilter(r)},Liquid.Template.tokenize=function(r){var t=r.split(/(\{\%.*?\%\}|\{\{.*?\}\}?)/);return""==t[0]&&t.shift(),t},Liquid.Template.parse=function(r){return(new Liquid.Template).parse(r)}; 21Liquid.Variable=Class.extend({init:function(t){this.markup=t,this.name=null,this.filters=[];
21var i=this,n=t.match(/\s*("[^"]+"|'[^']+'|[^\s,|]+)/);if(n){this.name=n[1];var a=t.match(/\|\s*(.*)/);if(a)a[1].split(/\|/).each(function(t){var n=t.match(/\s*(\w+)/);if(n){var a=n[1],s=[];(t.match(/(?:[:|,]\s*)("[^"]+"|'[^']+'|[^\s,|]+)/g)||[]).flatten().each(function(t){var i=t.match(/^[\s|:|,]*(.*?)[\s]*$/);i&&s.push(i[1])}),i.filters.push([a,s])}})}},render:function(t){if(null==this.name)return"";var i=t.get(this.name);return this.filters.each(function(n){var a=n[0],s=(n[1]||[]).map(function(i){return t.get(i)});s.unshift(i),i=t.invoke(a,s)}),i}}); 22Liquid.Condition=Class.extend({init:function(t,n,i){this.left=t,this.operator=n,this.right=i,this.childRelation=null,this.childCondition=null,this.attachment=null},evaluate:function(t){t=t||new Liquid.Context;var n=this.interpretCondition(this.left,this.right,this.operator,t);switch(this.childRelation){case"or":return n||this.childCondition.evaluate(t);case"and":return n&&this.childCondition.evaluate(t);default:return n}},or:function(t){this.childRelation="or",this.childCondition=t},and:function(t){this.childRelation="and",this.childCondition=t},attach:function(t){return this.attachment=t,this.attachment},isElse:!1,interpretCondition:function(t,n,i,o){if(!i)return o.get(t);if(t=o.get(t),n=o.get(n),!(i=Liquid.Condition.operators[i]))throw"Unknown operator "+i;return i(t,n)},toString:function(){return"<Condition "+this.left+" "+this.operator+" "+this.right+">"}}),Liquid.Condition.operators={"==":function(t,n){return t==n},"=":function(t,n){return t==n},"!=":function(t,n){return t!=n},"<>":function(t,n){return t!=n},"<":function(t,n){return t<n},">":function(t,n){return t>n},"<=":function(t,n){return t<=n},">=":function(t,n){return t>=n},contains:function(t,n){return t.include(n)},hasKey:function(t,n){return Liquid.extensions.object.hasKey.call(t,n)},hasValue:function(t,n){return Liquid.extensions.object.hasValue.call(t,n)}},Liquid.ElseCondition=Liquid.Condition.extend({isElse:!0,evaluate:function(){return!0},toString:function(){return"<ElseCondition>"}}); 23Liquid.Drop=Class.extend({setContext:function(t){this.context=t},beforeMethod:function(){},invokeDrop:function(t){var e=this.beforeMethod();return!e&&t in this&&(e=this[t].apply(this)),e},hasKey:function(){return!0}}); 24var hackObjectEach=function(t){if("function"!=typeof t)throw"Object.each requires first argument to be a function";var e=0,i=arguments[1];for(var a in this){var n=this[a],r=[a,n];r.key=a,r.value=n,t.call(i,r,e,this),e++}return null};Liquid.Template.registerTag("assign",Liquid.Tag.extend({tagSyntax:/((?:\(?[\w\-\.\[\]]\)?)+)\s*=\s*((?:"[^"]+"|'[^']+'|[^\s,|]+)+)/,init:function(t,e,i){var a=e.match(this.tagSyntax);if(!a)throw"Syntax error in 'assign' - Valid syntax: assign [var] = [source]";this.to=a[1],this.from=a[2],this._super(t,e,i)},render:function(t){return t.scopes.last()[this.to.toString()]=t.get(this.from),""}})),Liquid.Template.registerTag("cache",Liquid.Block.extend({tagSyntax:/(\w+)/,init:function(t,e,i){var a=e.match(this.tagSyntax);if(!a)throw"Syntax error in 'cache' - Valid syntax: cache [var]";this.to=a[1],this._super(t,e,i)},render:function(t){var e=this._super(t);return t.scopes.last()[this.to]=[e].flatten().join(""),""}})),Liquid.Template.registerTag("capture",Liquid.Block.extend({tagSyntax:/(\w+)/,init:function(t,e,i){var a=e.match(this.tagSyntax);if(!a)throw"Syntax error in 'capture' - Valid syntax: capture [var]";this.to=a[1],this._super(t,e,i)},render:function(t){var e=this._super(t);return t.set(this.to,[e].flatten().join("")),""}})),Liquid.Template.registerTag("case",Liquid.Block.extend({tagSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)/,tagWhenSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)(?:(?:\s+or\s+|\s*\,\s*)("[^"]+"|'[^']+'|[^\s,|]+.*))?/,init:function(t,e,i){this.blocks=[],this.nodelist=[];var a=e.match(this.tagSyntax);if(!a)throw"Syntax error in 'case' - Valid syntax: case [condition]";this.left=a[1],this._super(t,e,i)},unknownTag:function(t,e,i){switch(t){case"when":this.recordWhenCondition(e);break;case"else":this.recordElseCondition(e);break;default:this._super(t,e,i)}},render:function(t){var e=this,i=[],a=!0;return t.stack(function(){for(var n=0;n<e.blocks.length;n++){var r=e.blocks[n];if(r.isElse)return 1==a&&(i=[i,e.renderAll(r.attachment,t)].flatten()),i;r.evaluate(t)&&(a=!1,i=[i,e.renderAll(r.attachment,t)].flatten())}}),i},recordWhenCondition:function(t){for(;t;){var e=t.match(this.tagWhenSyntax);if(!e)throw"Syntax error in tag 'case' - Valid when condition: {% when [condition] [or c
24ondition2...] %} ";t=e[2];var i=new Liquid.Condition(this.left,"==",e[1]);this.blocks.push(i),this.nodelist=i.attach([])}},recordElseCondition:function(t){if(""!=(t||"").strip())throw"Syntax error in tag 'case' - Valid else condition: {% else %} (no parameters) ";var e=new Liquid.ElseCondition;this.blocks.push(e),this.nodelist=e.attach([])}})),Liquid.Template.registerTag("comment",Liquid.Block.extend({render:function(){return""}})),Liquid.Template.registerTag("cycle",Liquid.Tag.extend({tagSimpleSyntax:/"[^"]+"|'[^']+'|[^\s,|]+/,tagNamedSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)\s*\:\s*(.*)/,init:function(t,e,i){var a;if(a=e.match(this.tagNamedSyntax))this.variables=this.variablesFromString(a[2]),this.name=a[1];else{if(!(a=e.match(this.tagSimpleSyntax)))throw"Syntax error in 'cycle' - Valid syntax: cycle [name :] var [, var2, var3 ...]";this.variables=this.variablesFromString(e),this.name="'"+this.variables.toString()+"'"}this._super(t,e,i)},render:function(t){var e=this,i=t.get(e.name),a="";return t.registers.cycle||(t.registers.cycle={}),t.registers.cycle[i]||(t.registers.cycle[i]=0),t.stack(function(){var n=t.registers.cycle[i],r=t.get(e.variables[n]);(n+=1)==e.variables.length&&(n=0),t.registers.cycle[i]=n,a=r}),a},variablesFromString:function(t){return t.split(",").map(function(t){var e=t.match(/\s*("[^"]+"|'[^']+'|[^\s,|]+)\s*/);return e[1]?e[1]:null})}})),Liquid.Template.registerTag("for",Liquid.Block.extend({tagSyntax:/(\w+)\s+in\s+((?:\(?[\w\-\.\[\]]\)?)+)/,init:function(t,e,i){var a=e.match(this.tagSyntax);if(!a)throw"Syntax error in 'for loop' - Valid syntax: for [item] in [collection]";this.variableName=a[1],this.collectionName=a[2],this.name=this.variableName+"-"+this.collectionName,this.attributes={};e.replace(this.tagSyntax,"");var n=e.match(/(\w*?)\s*\:\s*("[^"]+"|'[^']+'|[^\s,|]+)/g);n&&n.each(function(t){t=t.split(":"),this.attributes[t[0].strip()]=t[1].strip()},this),this._super(t,e,i)},render:function(t){var e=this,i=[],a=t.get(this.collectionName)||[],n=[0,a.length];if(t.registers["for"]||(t.registers["for"]={}),this.attributes.limit||this.attributes.offset){var r=0,s=0,o=0;n=[r="continue"==this.attributes.offset?t.registers["for"][this.name]:t.get(this.attributes.offset)||0,(o=(s=t.get(this.attributes.limit))?r+s+1:a.length)-1],t.registers["for"][this.name]=o}return segment=a.slice(n[0],n[1]),segment&&0!=segment.length?(t.stack(function(){var a=segment.length;segment.each(function(n,r){t.set(e.variableName,n),t.set("forloop",{name:e.name,length:a,index:r+1,index0:r,rindex:a-r,rindex0:a-r-1,first:0==r,last:r==a-1}),i.push((e.renderAll(e.nodelist,t)||[]).join(""))})}),[i].flatten().join("")):""}})),Liquid.Template.registerTag("if",Liquid.Block.extend({tagSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)\s*([=!<>a-z_]+)?\s*("[^"]+"|'[^']+'|[^\s,|]+)?/,init:function(t,e,i){this.nodelist=[],this.blocks=[],this.pushBlock("if",e),this._super(t,e,i)},unknownTag:function(t,e,i){["elsif","else"].include(t)?this.pushBlock(t,e):this._super(t,e,i)},render:function(t){var e=this,i="";return t.stack(function(){for(var a=0;a<e.blocks.length;a++){var n=e.blocks[a];if(n.evaluate(t))return void(i=e.renderAll(n.attachment,t))}}),[i].flatten().join("")},pushBlock:function(t,e){var i;if("else"==t)i=new Liquid.ElseCondition;else{var a=e.split(/\b(and|or)\b/).reverse();if(!(r=a.shift().match(this.tagSyntax)))throw"Syntax Error in tag '"+t+"' - Valid syntax: "+t+" [expression]";for(var n=new Liquid.Condition(r[1],r[2],r[3]);a.length>0;){var r,s=a.shift();if(!(r=a.shift().match(this.tagSyntax)))throw"Syntax Error in tag '"+t+"' - Valid syntax: "+t+" [expression]";var o=new Liquid.Condition(r[1],r[2],r[3]);o[s](n),n=o}i=n}i.attach([]),this.blocks.push(i),this.nodelist=i.attachment}})),Liquid.Template.registerTag("ifchanged",Liquid.Block.extend({render:function(t){var e=this,i="";return t.stack(function(){var a=e.renderAll(e.nodelist,t).join("");a!=t.registers.ifchanged&&(i=a,t.registers.ifchanged=i)}),i}})),Liquid.Template.registerTag("include",Liquid.Tag.extend({tagSyntax:/((?:"[^"]+"|'[^']+'|[^\s,|]+)+)(\s+(?:with|for)\s+((?:"[^"]+"|'[^']+'|[^\s,|]+)+))?/,init:function(t,e,
24i){var a=(e||"").match(this.tagSyntax);if(!a)throw"Error in tag 'include' - Valid syntax: include '[template]' (with|for) [object|collection]";this.templateName=a[1],this.templateNameVar=this.templateName.substring(1,this.templateName.length-1),this.variableName=a[3],this.attributes={};var n=e.match(/(\w*?)\s*\:\s*("[^"]+"|'[^']+'|[^\s,|]+)/g);n&&n.each(function(t){t=t.split(":"),this.attributes[t[0].strip()]=t[1].strip()},this),this._super(t,e,i)},render:function(t){var e=this,i=Liquid.readTemplateFile(t.get(this.templateName)),a=Liquid.parse(i),n=t.get(this.variableName||this.templateNameVar),r="";return t.stack(function(){e.attributes.each=hackObjectEach,e.attributes.each(function(e){t.set(e.key,t.get(e.value))}),n instanceof Array?r=n.map(function(i){return t.set(e.templateNameVar,i),a.render(t)}):(t.set(e.templateNameVar,n),r=a.render(t))}),r=[r].flatten().join("")}})),Liquid.Template.registerTag("unless",Liquid.Template.tags["if"].extend({render:function(t){var e=this,i="";return t.stack(function(){if((n=e.blocks[0]).evaluate(t))for(var a=1;a<e.blocks.length;a++){var n;if((n=e.blocks[a]).evaluate(t))return void(i=e.renderAll(n.attachment,t))}else i=[e.renderAll(n.attachment,t)].flatten().join("")}),i}})); 25Liquid.Template.registerFilter({size:function(t){return t.length?t.length:0},downcase:function(t){return t.toString().toLowerCase()},upcase:function(t){return t.toString().toUpperCase()},capitalize:function(t){return t.toString().capitalize()},escape:function(t){return t=(t=(t=(t=(t=t.toString()).replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/"/g,""")},h:function(t){return t=(t=(t=(t=(t=t.toString()).replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/"/g,""")},truncate:function(t,e,n){if(!t||""==t)return"";e=e||50,n=n||"...";t.slice(0,e);return t.length>e?t.slice(0,e)+n:t},truncatewords:function(t,e,n){if(!t||""==t)return"";e=parseInt(e||15),n=n||"...";var r=t.toString().split(" "),i=Math.max(e,0);return r.length>i?r.slice(0,i).join(" ")+n:t},truncate_words:function(t,e,n){if(!t||""==t)return"";e=parseInt(e||15),n=n||"...";var r=t.toString().split(" "),i=Math.max(e,0);return r.length>i?r.slice(0,i).join(" ")+n:t},strip_html:function(t){return t.toString().replace(/<.*?>/g,"")},strip_newlines:function(t){return t.toString().replace(/\n/g,"")},join:function(t,e){return e=e||" ",t.join(e)},sort:function(t){return t.sort()},reverse:function(t){return t.reverse()},replace:function(t,e,n){return n=n||"",t.toString().replace(new RegExp(e,"g"),n)},replace_first:function(t,e,n){return n=n||"",t.toString().replace(new RegExp(e,""),n)},newline_to_br:function(t){return t.toString().replace(/\n/g,"<br/>\n")},date:function(t,e){var n;return t instanceof Date&&(n=t),n instanceof Date||"now"!=t||(n=new Date),n instanceof Date||(n=new Date(t)),n instanceof Date||(n=new Date(Date.parse(t))),n instanceof Date?n.strftime(e):t},first:function(t){return t[0]},last:function(t){return(t=t)[t.length-1]}}); 26(function(){var n=this,t=n._,r={},e=Array.prototype,i=Object.prototype,u=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=i.toString,f=i.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,y=e.filter,d=e.every,g=e.some,m=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,w=u.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.4.3";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var i=0,u=n.length;i<u;i++)if(t.call(e,n[i],i,n)===r)return}else for(var a in n)if(j.has(n,a)&&t.call(e,n[a],a,n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,i,u){e[e.length]=t.call(r,n,i,u)}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var i=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),i?n.reduce(t,r):n.reduce(t);if(A(n,function(n,u,a){i?r=t.call(e,r,n,u,a):(r=n,i=!0)}),!i)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var i=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),i?n.reduceRight(t,r):n.reduceRight(t);var u=n.length;if(u!==+u){var a=j.keys(n);u=a.length}if(A(n,function(o,c,l){c=a?a[--u]:--u,i?r=t.call(e,r,n[c],c,l):(r=n[c],i=!0)}),!i)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return E(n,function(n,i,u){if(t.call(r,n,i,u))return e=n,!0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:y&&n.filter===y?n.filter(t,r):(A(n,function(n,i,u){t.call(r,n,i,u)&&(e[e.length]=n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,i){return!t.call(r,n,e,i)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var i=!0;return null==n?i:d&&n.every===d?n.every(t,e):(A(n,function(n,u,a){if(!(i=i&&t.call(e,n,u,a)))return r}),!!i)};var E=j.some=j.any=function(n,t,e){t||(t=j.identity);var i=!1;return null==n?i:g&&n.some===g?n.some(t,e):(A(n,function(n,u,a){if(i||(i=t.call(e,n,u,a)))return r}),!!i)};j.contains=j.include=function(n,t){return null!=n&&(m&&n.indexOf===m?-1!=n.indexOf(t):E(n,function(n){return n===t}))}
26,j.invoke=function(n,t){var r=o.call(arguments,2);return j.map(n,function(n){return(j.isFunction(t)?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t){return j.isEmpty(t)?[]:j.filter(n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-Infinity;var e={computed:-Infinity,value:-Infinity};return A(n,function(n,i,u){var a=t?t.call(r,n,i,u):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return Infinity;var e={computed:Infinity,value:Infinity};return A(n,function(n,i,u){var a=t?t.call(r,n,i,u):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return j.isFunction(n)?n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=F(t);return j.pluck(j.map(n,function(n,t,i){return{value:n,index:t,criteria:e.call(r,n,t,i)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index<t.index?-1:1}),"value")};var I=function(n,t,r,e){var i={},u=F(t||j.identity);return A(n,function(t,a){var o=u.call(r,t,a,n);e(i,o,t)}),i};j.groupBy=function(n,t,r){return I(n,t,r,function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)})},j.countBy=function(n,t,r){return I(n,t,r,function(n,t){j.has(n,t)||(n[t]=0),n[t]++})},j.sortedIndex=function(n,t,r,e){for(var i=(r=null==r?j.identity:F(r)).call(e,t),u=0,a=n.length;u<a;){var o=u+a>>>1;r.call(e,n[o])<i?u=o+1:a=o}return u},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){if(null!=n)return null==t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){if(null!=n)return null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var k=function(n,t,r){return A(n,function(n){j.isArray(n)?t?a.apply(r,n):k(n,t,r):r.push(n)}),r};j.flatten=function(n,t){return k(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var i=r?j.map(n,r,e):n,u=[],a=[];return A(i,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),u.push(n[e]))}),u},j.union=function(){return j.uniq(c.apply(e,arguments))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=o.call(arguments),t=j.max(j.pluck(n,"length")),r=new Array(t),e=0;e<t;e++)r[e]=j.pluck(n,""+e);return r},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,i=n.length;e<i;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,i=n.length;if(r){if("number"!=typeof r)return n[e=j.sortedIndex(n,t)]===t?e:-1;e=r<0?Math.max(0,i+r):r}if(m&&n.indexOf===m)return n.indexOf(t,r);for(;e<i;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var i=e?r:n.length;i--;)if(n[i]===t)return i;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),i=0,u=new Array(e);i<e;)u[i++]=n,n+=r;return u};var R=function(){};j.bind=function(n,t){var r,e;if(n.bind===w&&w)return w.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var i=new R;R.prototype=null;var u=n.apply(i,r.concat(o.call(arguments)));return Object(u)===u?u:i}}
26,j.bindAll=function(n){var t=o.call(arguments,1);return 0==t.length&&(t=j.functions(n)),A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t){var r,e,i,u,a=0,o=function(){a=new Date,i=null,u=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,l<=0?(clearTimeout(i),i=null,a=c,u=n.apply(r,e)):i||(i=setTimeout(o,l)),u}},j.debounce=function(n,t,r){var e,i;return function(){var u=this,a=arguments,o=function(){e=null,r||(i=n.apply(u,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(i=n.apply(u,a)),i}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return n<=0?t():function(){if(--n<1)return t.apply(this,arguments)}},j.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&(t[t.length]=r);return t},j.values=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push(n[r]);return t},j.pairs=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push([r,n[r]]);return t},j.invert=function(n){var t={};for(var r in n)j.has(n,r)&&(t[n[r]]=r);return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var i in n)j.contains(r,i)||(t[i]=n[i]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var i=l.call(n);if(i!=l.call(t))return!1;switch(i){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var u=r.length;u--;)if(r[u]==n)return e[u]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==i){if(o=(a=n.length)==t.length)for(;a--&&(o=S(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(j.isFunction(c)&&c instanceof c&&j.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(j.has(n,s)&&(a++,!(o=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(o){for(s in t)if(j.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return void 0===n},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(n),i=0;i<n;i++)e[i]=t.call(r,i);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+(0|Math.random()*(t-n+1))};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};T.unescape=j.invert(T.escape);var M={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(M[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return null;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=""+ ++N;return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){r=j.defaults({},r,j.templateSettings);var e=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,u="__p+='";n.replace(e,function(t,r,e,a,o){return u+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(u+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(u+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),a&&(u+="';\n"+a+"\n__p+='"),i=o+t.length,t}),u+="';\n",r.variable||(u="with(obj||{}){\n"+u+"}\n"),u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{var a=new Function(r.variable||"obj","_",u)}catch(c){throw c.source=u,c}if(t)return a(t,j);var o=function(n){return a.call(this,n,j)};return o.source="function("+(r.variable||"obj")+"){\n"+u+"}",o},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); 27!function(e,n){"use strict";var r=n.prototype.trim,t=n.prototype.trimRight,u=n.prototype.trimLeft,l=function(e){return 1*e||0},i=function(e,n){if(n<1)return"";for(var r="";n>0;)1&n&&(r+=e),n>>=1,e+=e;return r},o=[].slice,a=function(e){return null==e?"\\s":e.source?e.source:"["+h.escapeRegExp(e)+"]"},c={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},s={};for(var f in c)s[c[f]]=f;s["'"]="#39";var p=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var r=i,t=function(){return t.cache.hasOwnProperty(arguments[0])||
27(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};return t.format=function(t,u){var l,i,o,a,c,s,f,h=1,g=t.length,d="",m=[];for(i=0;i<g;i++)if("string"===(d=e(t[i])))m.push(t[i]);else if("array"===d){if((a=t[i])[2])for(l=u[h],o=0;o<a[2].length;o++){if(!l.hasOwnProperty(a[2][o]))throw new Error(p('[_.sprintf] property "%s" does not exist',a[2][o]));l=l[a[2][o]]}else l=a[1]?u[a[1]]:u[h++];if(/[^s]/.test(a[8])&&"number"!=e(l))throw new Error(p("[_.sprintf] expecting number but found %s",e(l)));switch(a[8]){case"b":l=l.toString(2);break;case"c":l=n.fromCharCode(l);break;case"d":l=parseInt(l,10);break;case"e":l=a[7]?l.toExponential(a[7]):l.toExponential();break;case"f":l=a[7]?parseFloat(l).toFixed(a[7]):parseFloat(l);break;case"o":l=l.toString(8);break;case"s":l=(l=n(l))&&a[7]?l.substring(0,a[7]):l;break;case"u":l=Math.abs(l);break;case"x":l=l.toString(16);break;case"X":l=l.toString(16).toUpperCase()}l=/[def]/.test(a[8])&&a[3]&&l>=0?"+"+l:l,s=a[4]?"0"==a[4]?"0":a[4].charAt(1):" ",f=a[6]-n(l).length,c=a[6]?r(s,f):"",m.push(a[5]?l+c:c+l)}return m.join("")},t.cache={},t.parse=function(e){for(var n=e,r=[],t=[],u=0;n;){if(null!==(r=/^[^\x25]+/.exec(n)))t.push(r[0]);else if(null!==(r=/^\x25{2}/.exec(n)))t.push("%");else{if(null===(r=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)))throw new Error("[_.sprintf] huh?");if(r[2]){u|=1;var l=[],i=r[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(i)))throw new Error("[_.sprintf] huh?");for(l.push(o[1]);""!==(i=i.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(i)))l.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(i)))throw new Error("[_.sprintf] huh?");l.push(o[1])}r[2]=l}else u|=2;if(3===u)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");t.push(r)}n=n.substring(r[0].length)}return t},t}(),h={VERSION:"2.3.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":n(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return(e=null==e?"":n(e)).charAt(0).toUpperCase()+e.slice(1)},chop:function(e,r){return null==e?[]:(e=n(e),(r=~~r)>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])},clean:function(e){return h.strip(e).replace(/\s+/g," ")},count:function(e,r){if(null==e||null==r)return 0;e=n(e);for(var t=0,u=0,l=(r=n(r)).length;-1!==(u=e.indexOf(r,u));)t++,u+=l;return t},chars:function(e){return null==e?[]:n(e).split("")},swapCase:function(e){return null==e?"":n(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":n(e).replace(/[&<>"']/g,function(e){return"&"+s[e]+";"})},unescapeHTML:function(e){return null==e?"":n(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in c?c[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?n.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?n.fromCharCode(~~t[1]):e})},escapeRegExp:function(e){return null==e?"":n(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,n,r,t){var u=h.chars(e);return u.splice(~~n,~~r,t),u.join("")},insert:function(e,n,r){return h.splice(e,n,0,r)},include:function(e,r){return""===r||null!=e&&-1!==n(e).indexOf(r)},join:function(){var e=o.call(arguments),n=e.shift();return null==n&&(n=""),e.join(n)},lines:function(e){return null==e?[]:n(e).split("\n")},reverse:function(e){return h.chars(e).reverse().join("")},startsWith:function(e,r){return""===r||null!=e&&null!=r&&(e=n(e),r=n(r),e.length>=r.length&&e.slice(0,r.length)===r)},endsWith:function(e,r){return""===r||null!=e&&null!=r&&(e=n(e),r=n(r),e.length>=r.length&&e.slice(e.length-r.length)===r)},succ:function(e){return null==e?"":(e=n(e)).slice(0,-1)+n.fromCharCode(e.charCodeAt(e.length-1)+1)},titleize:function(e){return null==e?"":n(e).replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})},camelize:function(e){return h.trim(e).replace(/[-_\s]+(.)?/g,function(e,n){return n.toUpperCase()})},underscored:function(e){return h.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return h.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return h.titleize(n(e).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(e){return h.capitalize(h.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,t){return null==e?"":!t&&r?r.call(e):(t=a(t),n(e).replace(new RegExp("^"+t+"+|"+t+"+$","g"),""))},ltrim:function(e,r){return null==e?"":!r&&u?u.call(e):(r=a(r),n(e).replace(new RegExp("^"+r+"+"),""))},rtrim:function(e,r){return null==e?"":!r&&t?t.call(e):(r=a(r),n(e).replace(new RegExp(r+"+$"),""))},truncate:function(e,r,t){return null==e?"":(t=t||"...",r=~~r,(e=n(e)).length>r?e.slice(0,r)+t:e)},prune:function(e,r,t){if(null==e)return"";if(e=n(e),r=~~r,t=null!=t?n(t):"...",e.length<=r)return e;var u=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},l=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,u);return((l=l.slice(l.length-2).match(/\w\w/)?l.replace(/\s*\S+$/,""):h.rtrim(l.slice(0,l.length-1)))+t).length>e.length?e:e.slice(0,l.length)+t},words:function(e,n){return h.isBlank(e)?[]:h.trim(e,n).split(n||/\s+/)},pad:function(e,r,t,u){e=null==e?"":n(e),r=~~r;var l=0;switch(t?t.length>1&&(t=t.charAt(0)):t=" ",u){case"right":return l=r-e.length,e+i(t,l);case"both":return l=r-e.length,i(t,Math.ceil(l/2))+e+i(t,Math.floor(l/2));default:return l=r-e.length,i(t,l)+e}},lpad:function(e,n,r){return h.pad(e,n,r)},rpad:function(e,n,r){return h.pad(e,n,r,"right")},lrpad:function(e,n,r){return h.pad(e,n,r,"both")},sprintf:p,vsprintf:function(e,n){return n.unshift(e),p.apply(null,n)},toNumber:function(e,n){return e?(e=h.trim(e)).match(/^-?\d+(?:\.\d+)?$/)?l(l(e).toFixed(~~n)):NaN:0},numberFormat:function(e,n,r,t){if(isNaN(e)||null==e)return"";t="string"==typeof t?t:",";var u=(e=e.toFixed(~~n)).split("."),l=u[0],i=u[1]?(r||".")+u[1]:"";return l.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+t)+i},strRight:function(e,r){if(null==e)return"";e=n(e);var t=(r=null!=r?n(r):r)?e.indexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strRightBack:function(e,r){if(null==e)return"";e=n(e);var t=(r=null!=r?n(r):r)?e.lastIndexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strLeft:function(e,r){if(null==e)return"";e=n(e);var t=(r=null!=r?n(r):r)?e.indexOf(r):-1;return~t?e.slice(0,t):e},strLeftBack:function(e,n){if(null==e)return"";n=null!=n?""+n:n;var r=(e+="").lastIndexOf(n);return~r?e.slice(0,r):e},toSentence:function(e,n,r,t){n=n||", ",r=r||" and ";var u=e.slice(),l=u.pop();return e.length>2&&t&&(r=h.rtrim(n)+r),u.length?u.join(n)+r+l:l},toSentenceSerial:function(){var e=o.call(arguments);return e[3]=!0,h.toSentence.apply(h,e)},slugify:function(e){if(null==e)return"";var r="\u0105\xe0\xe1\xe4\xe2\xe3\xe5\xe6\u0107\u0119\xe8\xe9\xeb\xea\xec\xed\xef\xee\u0142\u0144\xf2\xf3\xf6\xf4\xf5\xf8\xf9\xfa\xfc\xfb\xf1\xe7\u017c\u017a",t="aaaaaaaaceeeeeiiiil
27noooooouuuunczz",u=new RegExp(a(r),"g");return e=n(e).toLowerCase().replace(u,function(e){var n=r.indexOf(e);return t.charAt(n)||"-"}),h.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,n){return[n,e,n].join("")},quote:function(e){return h.surround(e,'"')},exports:function(){var e={};for(var n in this)this.hasOwnProperty(n)&&!n.match(/^(?:include|contains|reverse)$/)&&(e[n]=this[n]);return e},repeat:function(e,r,t){if(null==e)return"";if(r=~~r,null==t)return i(n(e),r);for(var u=[];r>0;u[--r]=e);return u.join(t)},levenshtein:function(e,r){if(null==e&&null==r)return 0;if(null==e)return n(r).length;if(null==r)return n(e).length;e=n(e),r=n(r);for(var t,u,l=[],i=0;i<=r.length;i++)for(var o=0;o<=e.length;o++)u=i&&o?e.charAt(o-1)===r.charAt(i-1)?t:Math.min(l[o],l[o-1],t)+1:i+o,t=l[o],l[o]=u;return l.pop()}};h.strip=h.trim,h.lstrip=h.ltrim,h.rstrip=h.rtrim,h.center=h.lrpad,h.rjust=h.lpad,h.ljust=h.rpad,h.contains=h.include,h.q=h.quote,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=h),exports._s=h),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return h}),e._=e._||{},e._.string=e._.str=h}(this,String); 28(function(){var t,e=this,i=e.Backbone,s=[],n=s.push,r=s.slice,a=s.splice;(t="undefined"!=typeof exports?exports:e.Backbone={}).VERSION="1.0.0";var h=e._;h||"undefined"==typeof require||(h=require("underscore")),t.$=e.jQuery||e.Zepto||e.ender||e.$,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var o=t.Events={on:function(t,e,i){return c(this,"on",t,[e,i])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:i,ctx:i||this}),this):this},once:function(t,e,i){if(!c(this,"once",t,[e,i])||!e)return this;var s=this,n=h.once(function(){s.off(t,n),e.apply(this,arguments)});return n._callback=e,this.on(t,n,i)},off:function(t,e,i){var s,n,r,a,o,u,l,d;if(!this._events||!c(this,"off",t,[e,i]))return this;if(!t&&!e&&!i)return this._events={},this;for(o=0,u=(a=t?[t]:h.keys(this._events)).length;o<u;
28o++)if(t=a[o],r=this._events[t]){if(this._events[t]=s=[],e||i)for(l=0,d=r.length;l<d;l++)n=r[l],(e&&e!==n.callback&&e!==n.callback._callback||i&&i!==n.context)&&s.push(n);s.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=r.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t],s=this._events.all;return i&&l(i,e),s&&l(s,arguments),this},stopListening:function(t,e,i){var s=this._listeners;if(!s)return this;var n=!e&&!i;for(var r in"object"==typeof e&&(i=this),t&&((s={})[t._listenerId]=t),s)s[r].off(e,i,this),n&&delete this._listeners[r];return this}},u=/\s+/,c=function(t,e,i,s){if(!i)return!0;if("object"==typeof i){for(var n in i)t[e].apply(t,[n,i[n]].concat(s));return!1}if(u.test(i)){for(var r=i.split(u),a=0,h=r.length;a<h;a++)t[e].apply(t,[r[a]].concat(s));return!1}return!0},l=function(t,e){var i,s=-1,n=t.length,r=e[0],a=e[1],h=e[2];switch(e.length){case 0:for(;++s<n;)(i=t[s]).callback.call(i.ctx);return;case 1:for(;++s<n;)(i=t[s]).callback.call(i.ctx,r);return;case 2:for(;++s<n;)(i=t[s]).callback.call(i.ctx,r,a);return;case 3:for(;++s<n;)(i=t[s]).callback.call(i.ctx,r,a,h);return;default:for(;++s<n;)(i=t[s]).callback.apply(i.ctx,e)}},d={listenTo:"on",listenToOnce:"once"};h.each(d,function(t,e){o[e]=function(e,i,s){return(this._listeners||(this._listeners={}))[e._listenerId||(e._listenerId=h.uniqueId("l"))]=e,"object"==typeof i&&(s=this),e[t](i,s,this),this}}),o.bind=o.on,o.unbind=o.off,h.extend(t,o);var f=t.Model=function(t,e){var i,s=t||{};e||(e={}),this.cid=h.uniqueId("c"),this.attributes={},h.extend(this,h.pick(e,p)),e.parse&&(s=this.parse(s,e)||{}),(i=h.result(this,"defaults"))&&(s=h.defaults({},s,i)),this.set(s,e),this.changed={},this.initialize.apply(this,arguments)},p=["url","urlRoot","collection"];h.extend(f.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return h.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return h.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,i){var s,n,r,a,o,u,c,l;if(null==t)return this;if("object"==typeof t?(n=t,i=e):(n={})[t]=e,i||(i={}),!this._validate(n,i))return!1;for(s in r=i.unset,o=i.silent,a=[],u=this._changing,this._changing=!0,u||(this._previousAttributes=h.clone(this.attributes),this.changed={}),l=this.attributes,c=this._previousAttributes,this.idAttribute in n&&(this.id=n[this.idAttribute]),n)e=n[s],h.isEqual(l[s],e)||a.push(s),h.isEqual(c[s],e)?delete this.changed[s]:this.changed[s]=e,r?delete l[s]:l[s]=e;if(!o){a.length&&(this._pending=!0);for(var d=0,f=a.length;d<f;d++)this.trigger("change:"+a[d],this,l[a[d]],i)}if(u)return this;if(!o)for(;this._pending;)this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,h.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,h.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!h.isEmpty(this.changed):h.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&h.clone(this.changed);var e,i=!1,s=this._changing?this._previousAttributes:this.attributes;for(var n in t)h.isEqual(s[n],e=t[n])||((i||(i={}))[n]=e);return i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(t){void 0===(t=t?h.clone(t):{}).parse&&(t.parse=!0);var e=this,i=t.success;return t.success=function(s){if(!e.set(e.parse(s,t),t))return!1;i&&i(e,s,t),e.trigger("sync",e,s,t)},R(this,t),this.sync("read",this,t)},save:function(t,e,i){var s,n,r,a=this.attributes;if(null==t||"object"==typeof t?(s=t,i=e):(s={})[t]=e,s&&(!i||!i.wait)&&!this.set(s,i))return!1;if(i=h.extend({validate:!0},i),!this._validate(s,i))return!1;s&&i.wait&&(this.attributes=h.extend({},a,s)),void 0===i.parse&&(i.parse=!0);var o=this,u=i.success;return i.success=function(t){o.attributes=a;var e=o.parse(t,i);if(i.wait&&(e=h.extend(s||{},e)),h.isObject(e)&&!o.set(e,i))return!1;u&&u(o,t,i),o.trigger("sync",o,t,i)},R(this,i),"patch"===(n=this.isNew()?"create":i.patch?"patch":"update")&&(i.attrs=s),r=this.sync(n,this,i),s&&i.wait&&(this.attributes=a),r},destroy:function(t){t=t?h.clone(t):{};var e=this,i=t.success,s=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(n){(t.wait||e.isNew())&&s(),i&&i(e,n,t),e.isNew()||e.trigger("sync",e,n,t)},this.isNew())return t.success(),!1;R(this,t);var n=this.sync("delete",this,t);return t.wait||s(),n},url:function(){var t=h.result(this,"urlRoot")||h.result(this.collection,"url")||U();
28return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},h.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=h.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return!i||(this.trigger("invalid",this,i,h.extend(e||{},{validationError:i})),!1)}});var g=["keys","values","pairs","invert","pick","omit"];h.each(g,function(t){f.prototype[t]=function(){var e=r.call(arguments);return e.unshift(this.attributes),h[t].apply(h,e)}});var v=t.Collection=function(t,e){e||(e={}),e.url&&(this.url=e.url),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,h.extend({silent:!0},e))},m={add:!0,remove:!0,merge:!0},y={add:!0,merge:!1,remove:!1};h.extend(v.prototype,o,{model:f,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return t.sync.apply(this,arguments)},add:function(t,e){return this.set(t,h.defaults(e||{},y))},remove:function(t,e){var i,s,n,r;for(e||(e={}),i=0,s=(t=h.isArray(t)?t.slice():[t]).length;i<s;i++)(r=this.get(t[i]))&&(delete this._byId[r.id],delete this._byId[r.cid],n=this.indexOf(r),this.models.splice(n,1),this.length--,e.silent||(e.index=n,r.trigger("remove",r,this,e)),this._removeReference(r));return this},set:function(t,e){var i,s,r,o,u;(e=h.defaults(e||{},m)).parse&&(t=this.parse(t,e)),h.isArray(t)||(t=t?[t]:[]);var c=e.at,l=this.comparator&&null==c&&!1!==e.sort,d=h.isString(this.comparator)?this.comparator:null,f=[],p=[],g={};for(i=0,s=t.length;i<s;i++)(r=this._prepareModel(t[i],e))&&((o=this.get(r))?(e.remove&&(g[o.cid]=!0),e.merge&&(o.set(r.attributes,e),l&&!u&&o.hasChanged(d)&&(u=!0))):e.add&&(f.push(r),r.on("all",this._onModelEvent,this),this._byId[r.cid]=r,null!=r.id&&(this._byId[r.id]=r)));if(e.remove){for(i=0,s=this.length;i<s;++i)g[(r=this.models[i]).cid]||p.push(r);p.length&&this.remove(p,e)}if(f.length&&(l&&(u=!0),this.length+=f.length,null!=c?a.apply(this.models,[c,0].concat(f)):n.apply(this.models,f)),u&&this.sort({silent:!0}),e.silent)return this;for(i=0,s=f.length;i<s;i++)(r=f[i]).trigger("add",r,this,e);return u&&this.trigger("sort",this,e),this},reset:function(t,e){e||(e={});for(var i=0,s=this.models.length;i<s;i++)this._removeReference(this.models[i]);return e.previousModels=this.models,this._reset(),this.add(t,h.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),this},push:function(t,e){return t=this._prepareModel(t,e),this.add(t,h.extend({at:this.length},e)),t},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return t=this._prepareModel(t,e),this.add(t,h.extend({at:0},e)),t},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){if(null!=t)return this._byId[null!=t.id?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){return h.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var i in t)if(t[i]!==e.get(i))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),h.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(h.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},sortedIndex:function(t,e,i){e||(e=this.comparator);var s=h.isFunction(e)?e:function(t){return t.get(e)};return h.sortedIndex(this.models,t,s,i)},pluck:function(t){return h.invoke(this.models,"get",t)},fetch:function(t){void 0===(t=t?h.clone(t):{}).parse&&(t.parse=!0);var e=t.success,i=this;return t.success=function(s){var n=t.reset?"reset":"set";i[n](s,t),e&&e(i,s,t),i.trigger("sync",i,s,t)},R(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?h.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var i=this,s=e.success;return e.success=function(n){e.wait&&i.add(t,e),s&&s(t,n,e)},t.save(null,e),t},parse:function(t){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof f)return t.collection||(t.collection=this),t;e||(e={}),e.collection=this;var i=new this.model(t,e);return i._validate(t,e)?i:(this.trigger("invalid",this,t,e),!1)},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)}
28,_onModelEvent:function(t,e,i,s){("add"!==t&&"remove"!==t||i===this)&&("destroy"===t&&this.remove(e,s),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(_,function(t){v.prototype[t]=function(){var e=r.call(arguments);return e.unshift(this.models),h[t].apply(h,e)}});var b=["groupBy","countBy","sortBy"];h.each(b,function(t){v.prototype[t]=function(e,i){var s=h.isFunction(e)?e:function(t){return t.get(e)};return h[t](this.models,s,i)}});var w=t.View=function(t){this.cid=h.uniqueId("view"),this._configure(t||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},x=/^(\S+)\s*(.*)$/,E=["model","collection","el","id","attributes","className","tagName","events"];h.extend(w.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,i){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],!1!==i&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=h.result(this,"events")))return this;for(var e in this.undelegateEvents(),t){var i=t[e];if(h.isFunction(i)||(i=this[t[e]]),i){var s=e.match(x),n=s[1],r=s[2];i=h.bind(i,this),n+=".delegateEvents"+this.cid,""===r?this.$el.on(n,i):this.$el.on(n,r,i)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(t){this.options&&(t=h.extend({},h.result(this,"options"),t)),h.extend(this,h.pick(t,E)),this.options=t},_ensureElement:function(){if(this.el)this.setElement(h.result(this,"el"),!1);else{var e=h.extend({},h.result(this,"attributes"));this.id&&(e.id=h.result(this,"id")),this.className&&(e["class"]=h.result(this,"className"));var i=t.$("<"+h.result(this,"tagName")+">").attr(e);this.setElement(i,!1)}}}),t.sync=function(e,i,s){var n=k[e];h.defaults(s||(s={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var r={type:n,dataType:"json"};if(s.url||(r.url=h.result(i,"url")||U()),null!=s.data||!i||"create"!==e&&"update"!==e&&"patch"!==e||(r.contentType="application/json",r.data=JSON.stringify(s.attrs||i.toJSON(s))),s.emulateJSON&&(r.contentType="application/x-www-form-urlencoded",r.data=r.data?{model:r.data}:{}),s.emulateHTTP&&("PUT"===n||"DELETE"===n||"PATCH"===n)){r.type="POST",s.emulateJSON&&(r.data._method=n);var a=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",n),a)return a.apply(this,arguments)}}"GET"===r.type||s.emulateJSON||(r.processData=!1),"PATCH"!==r.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(r.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var o=s.xhr=t.ajax(h.extend(r,s));return i.trigger("request",i,o,s),o};var k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var S=t.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},$=/\((.*?)\)/g,T=/(\(\?)?:\w+/g,H=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(S.prototype,o,{initialize:function(){},route:function(e,i,s){h.isRegExp(e)||(e=this._routeToRegExp(e)),h.isFunction(i)&&(s=i,i=""),s||(s=this[i]);var n=this;return t.history.route(e,function(r){var a=n._extractParameters(e,r);s&&s.apply(n,a),n.trigger.apply(n,["route:"+i].concat(a)),n.trigger("route",i,a),t.history.trigger("route",n,i,a)}),this},navigate:function(e,i){return t.history.navigate(e,i),this},_bindRoutes:function(){if(this.routes){this.routes=h.result(this,"routes");for(var t,e=h.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(A,"\\$&").replace($,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/]+)"}).replace(H,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return h.map(i,function(t){return t?decodeURIComponent(t):null})}});var I=t.History=function(){this.handlers=[],h.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},N=/^[#\/]|\s+$/g,P=/^\/+|\/+$/g,O=/msie [\w.]+/,C=/\/$/;I.started=!1,h.extend(I.prototype,o,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var i=this.root.replace(C,"");t.indexOf(i)||(t=t.substr(i.length))}else t=this.getHash();return t.replace(N,"")},start:function(e){if(I.started)throw new Error("Backbone.history has already been started");I.started=!0,this.options=h.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var i=this.getFragment(),s=document.documentMode,n=O.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(P,"/"),n&&this._wantsHashChange&&(this.iframe=t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(i)),this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!n?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=i;var r=this.location,a=r.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!a?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&a&&r.hash&&(this.fragment=this.getHash().replace(N,""),this.history.replaceState({},document.title,this.root+this.fragment+r.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),I.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(t){var e=this.fragment=this.getFragment(t);return h.any(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})},navigate:function(t,e){if(!I.started)return!1;if(e&&!0!==e||(e={trigger:e}),t=this.getFragment(t||""),this.fragment!==t){this.fragment=t;var i=this.root+t;if(this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}e.trigger&&this.loadUrl(t)}}
28,_updateHash:function(t,e,i){if(i){var s=t.href.replace(/(javascript:|#).*$/,"");t.replace(s+"#"+e)}else t.hash="#"+e}}),t.history=new I;var j=function(t,e){var i,s=this;i=t&&h.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},h.extend(i,s,e);var n=function(){this.constructor=i};return n.prototype=s.prototype,i.prototype=new n,t&&h.extend(i.prototype,t),i.__super__=s.prototype,i};f.extend=v.extend=S.extend=w.extend=I.extend=j;var U=function(){throw new Error('A "url" property or function must be specified')},R=function(t,e){var i=e.error;e.error=function(s){i&&i(t,s,e),t.trigger("error",t,s,e)}}}).call(this); 29!function(){var e,t=!0;try{"undefined"!=typeof window.localStorage&&(window.localStorage.setItem("testLocalStorage","success"),window.localStorage.removeItem("testLocalStorage"))}catch(n){t=!1}"undefined"!=typeof window.localStorage&&"undefined"!=typeof window.sessionStorage&&t||(e=function(e){function t(e,t,n){var o,r;n?((o=new Date).setTime(o.getTime()+24*n*60*60*1e3),r="; expires="+o.toGMTString()):r="",document.cookie=e+"="+t+r+"; path=/"}function n(e){var t,n,o=e+"=",r=document.cookie.split(";");for(t=0;t<r.length;t++){for(n=r[t];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(o))return n.substring(o.length,n.length)}return null}function o(n){n=JSON.stringify(n),"session"===e?window.name=n:t("localStorage",n,365)}function r(){"session"===e?window.name="":t("localStorage","",365)}function i(){var t="session"===e?window.name:n("localStorage");return t?JSON.parse(t):{}}var s=i();return{length:0,clear:function(){s={},this.length=0,r()},getItem:function(e){return s[e]===undefined?null:s[e]},key:function(e){var t=0;for(var n in s){if(t===e)return n;t++}return null},removeItem:function(e){delete s[e],this.length--,o(s)},setItem:function(e,t){s[e]=t+"",this.length++,o(s)}}},t?("undefined"==typeof window.localStorage&&(window.localStorage=new e("local")),"undefined"==typeof window.sessionStorage&&(window.sessionStorage=new e("session"))):(window.privateLocalStorage=new e("local"),window.privateSessionStorage=new e("session")))}(),function(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function t(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}var n=this._,o=this.Backbone;o.LocalStorage=window.Store=function(e){this.name=e;var t=this.localStorage().getItem(this.name)||"";this.records=t&&t.split(",")||[]},n.extend(o.LocalStorage.prototype,{save:function(){this.localStorage().setItem(this.name,this.records.join(","))},safeGet:function(e){var t=this.localStorage().getItem(e);return t||"{}"},create:function(e){return e.id||(e.id=t(),e.set(e.idAttribute,e.id)),this.localStorage().setItem(this.name+"-"+e.id,JSON.stringify(e)),this.records.push(e.id.toString()),this.save(),e.toJSON()},update:function(e){return this.localStorage().setItem(this.name+"-"+e.id,JSON.stringify(e)),n.include(this.records,e.id.toString())||this.records.push(e.id.toString()),this.save(),e.toJSON()},find:function(e){if(obj=JSON.parse(this.safeGet(this.name+"-"+e.id)),!n.isEmpty(obj))return JSON.parse(this.safeGet(this.name+"-"+e.id))},findAll:function(){return n(this.records).chain().map(function(e){var t=JSON.parse(this.safeGet(this.name+"-"+e));return!n.isEmpty(t)&&t},this).compact().value()},destroy:function(e){return this.localStorage().removeItem(this.name+"-"+e.id),this.records=n.reject(this.records,function(t){return t==e.id.toString()}),this.save(),e},localStorage:function(){return window.privateLocalStorage?window.privateLocalStorage:localStorage}}),o.LocalStorage.sync=window.Store.sync=o.localSync=function(e,t,n,o){var r,i=t.localStorage||t.collection.localStorage,s=(o="Record not found",$.Deferred&&$.Deferred());"function"==typeof n&&(n={success:n,error:o});try{switch(e){case"read":r=t.id!=undefined?i.find(t):i.findAll();break;case"create":r=i.create(t);break;case"update":r=i.update(t);break;case"delete":r=i.destroy(t)}}catch(a){o=a}return r?(n.success(r),s&&s.resolve()):(n.error("Record not found"),s&&s.reject()),s&&s.promise()},o.SessionStorage=window.SessionStore=function(e){this.name=e;var t=this.sessionStorage().getItem(this.name)||"";this.records=t&&t.split(",")||[]},n.extend(o.SessionStorage.prototype,{save:function(){this.sessionStorage().setItem(this.name,this.records.join(","))},safeGet:function(e){var t=this.sessionStorage().getItem(e);return t||"{}"},create:function(e){return e.id||(e.id=t(),e.set(e.idAttribute,e.id)),this.sessionStorage().setItem(this.name+"-"+e.id,JSON.stringify(e)),this.records.push(e.id.toString()),this.save(),e.toJSON()},update:function(e){return this.sessionStorage().setItem(this.name+"-"+e.id,JSON.stringify(e)),n.include(this.records,e.id.toString())||this.records.push(e.id.toString()),this.save(),e.toJSON()},find:function(e){return JSON.parse(this.safeGet(this.name+"-"+e.id))},findAll:function(){return n(this.records).chain().map(function(e){var t=JSON.parse(this.safeGet(this.name+"-"+e));return!n.isEmpty(t)&&t}
29,this).compact().value()},destroy:function(e){return this.sessionStorage().removeItem(this.name+"-"+e.id),this.records=n.reject(this.records,function(t){return t==e.id.toString()}),this.save(),e},sessionStorage:function(){return window.privateLocalStorage?window.privateSessionStorage:sessionStorage}}),o.SessionStorage.sync=o.sessionSync=function(e,t,n,o){var r,i=t.sessionStorage||t.collection.sessionStorage,s=(o="Record not found",$.Deferred&&$.Deferred());"function"==typeof n&&(n={success:n,error:o});try{switch(e){case"read":r=t.id!=undefined?i.find(t):i.findAll();break;case"create":r=i.create(t);break;case"update":r=i.update(t);break;case"delete":r=i.destroy(t)}}catch(a){o=a}return r?(n.success(r),s&&s.resolve()):(n.error(o),s&&s.reject()),s&&s.promise()},o.ajaxSync=o.sync,o.getSyncMethod=function(e){if(e.inBrowserStorageEnabled&&e.inBrowserStorageEnabled()){if(e.localStorage||e.collection&&e.collection.localStorage)return o.LocalStorage.sync;if(e.sessionStorage||e.collection&&e.collection.sessionStorage)return o.SessionStorage.sync}return o.ajaxSync},o.sync=function(e,t,n,r){return o.getSyncMethod(t).apply(this,[e,t,n,r])}}(); 30!function(t,e,i){var n=t.L,o={version:"0.7.3"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++)for(e in o=s[i]||{})o.hasOwnProperty(e)&&(t[e]=o[e]);return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){for(n in o=Array.prototype.slice.call(arguments,3),t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;for(var s in n.constructor=e,e.prototype=n,this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1
30),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(n=0,a=(t=o.Util.splitWords(t)).length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(u=(l=h+"_idx")+"_len",(c=d[l]=d[l]||{})[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p=this[s],_=i&&i!==this&&o.stamp(i);for(n=0,a=(t=o.Util.splitWords(t)).length;a>n;n++)if(c=(u=(r=t[n])+"_idx")+"_len",d=p[u],e){if(h=_&&d?d[_]:p[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(h.splice(l,1)[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[_],p[c]--)}}else delete p[r],delete p[u],delete p[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(n=0,a=(i=u[t].slice()).length;a>n;n++)i[n].action.call(i[n].context,l);for(h in r=u[t+"_idx"])if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints&&!t.PointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled&&t.navigator.maxTouchPoints||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&function(){var t="ontouchstart";if(m||t in g)return!0;var i=e.createElement("div"),n=!1;return!!i.setAttribute&&(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n)}();o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(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},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},distanceTo:function(t){var e=(t=o.point(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=o.point(t)).x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}
30,toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(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 o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t))instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.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 o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i=(e?",0":"")+")";return"translate"+(e?"3d":"")+"("+t.x+"px,"+t.y+"px"+i}
30,getScaleString:function(t,e){return o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t)))+(" scale("+t+") ")},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){return!!t&&(t=o.latLng(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=o.LatLng.MAX_MARGIN)},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return i=(i+(e=e||180))%(e-(t=t||-180))+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return(t=null!==e?e:o.latLngBounds(t))instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((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 o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(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 o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;
30return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return!!t&&(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=6378137;return this.projection.project(t).multiplyBy(e)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=(t instanceof o.Point?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(a));return this.setView(r,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;
30var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,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){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.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(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do{s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n)}while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(o.latLng(t))._round()._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(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=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(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._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-
30pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){for(var e=0,i=(t=t?o.Util.isArray(t)?t:[t]:[]).length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}
30,_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_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(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=1e-7,d=15,p=.1;Math.abs(p)>c&&--d>0;)e=h*Math.sin(u),u+=p=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator.R_MAJOR,e=.5/(Math.PI*t);return new o.Transformation(e,.5,-e,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){(e=o.setOptions(this,e)).detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--), 31e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return this._map.options.crs.getSize(this._map.getZoom()).divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.setAttribute("alt","Map tile"),t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;
31for(var s in i.width=i.height=e.detectRetina&&o.Browser.retina?2*n:n,e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},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,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){for(var t in this._map&&(this._reset({hard:!0}),this._update()),this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i,n=this._getIconUrl(t);
31if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=e&&"IMG"===e.tagName?this._createImg(n,e):this._createImg(n),this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);!(i=o.point("shadow"===e&&n.shadowAnchor||n.iconAnchor))&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return(i=i||e.createElement("img")).src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s=e.getElementsByTagName("script"),a=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=s.length;i>t;t++)if((n=s[t].src).match(a))return((o=n.split(a)[0])?o+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation?"leaflet-zoom-animated":"leaflet-zoom-hide",n=t.icon.createIcon(this._icon),s=!1;n!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(n.title=t.title),t.alt&&(n.alt=t.alt)),o.DomUtil.addClass(n,i),t.keyboard&&(n.tabIndex="0"),this._icon=n,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(n,"mouseover",this._bringToFront,this).on(n,"mouseout",this._resetZIndex,this);var a=t.icon.createShadow(this._shadow),r=!1;a!==this._shadow&&(this._removeShadow(),r=!0),a&&o.DomUtil.addClass(a,i),this._shadow=a,t.opacity<1&&this._updateOpacity();var h=this._map._panes;s&&h.markerPane.appendChild(this._icon),a&&r&&h.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(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.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return i.innerHTML=!1!==n.html?n.html:"",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},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={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&
31(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&((t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n)).href="#close",t.innerHTML="×",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t):this._popup=new o.Popup(e,this).setContent(t),this}
31,setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){var e,i;if(this._layers={},t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},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),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return 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 o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=((o.Browser.mobile?1280:2e3)/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,e))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane).multiplyBy(-1)._subtract(e.multiplyBy(t)._roun
31d()),n=i.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(i,n)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){ 32return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||((t=this._stroke=this._createElement("stroke")).endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;
32t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=!!e.createElement("canvas").getContext,o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||((i=this._pathRoot=e.createElement("canvas")).style.position="absolute",(t=this._canvasCtx=i.getContext("2d")).lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=new(typeof Uint8Array!=i+""?Uint8Array:Array)(n);o[0]=o[n-1]=1,this._simplifyDPStep(t,o,e,0,n-1);var s,a=[];for(s=0;n>s;s++)o[s]&&a.push(t[s]);return a},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)(r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0))>h&&(s=a,h=r);h>
32i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&((s=((t.x-a)*h+(t.y-r)*l)/u)>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)this._parts=[n];else{this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)(i=h.clipSegment(n[t],n[t+1],r,t))&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))}},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,s=(l=t.length)-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||((c=p._getEdgeIntersection(h,r,u,e))._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&((c=p._getEdgeIntersection(h,r,u,e))._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)(n=this._holes[e]=this._convertLatLngs(this._holes[e]))[0].equals(n[n.length-1])&&n.pop();(t=this._latlngs).length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){var t,e,i,n;if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes)for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];
32if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){return o.Polyline.prototype._getPathPartStr.call(this,t)+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=o.latLngBounds(t)).getSouthWest
32(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l=this.options.weight/2;for(o.Browser.touch&&(l+=10),i=0,a=this._parts.length;a>i;i++)for(n=0,s=(r=(h=this._parts[i]).length)-1;r>n;s=n++)if((e||0!==n)&&l>=o.LineUtil.pointToSegmentDistance(t,h[s],h[n]))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(a=0,r=(l=(e=this._parts[s]).length)-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){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)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])}
32,coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)(i=o.GeoJSON.latLngsToCoords(this._holes[t])).push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(!(e=i.arguments[0])||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(o.DomEvent.stopPropagation(t),o.Draggable._disabled||(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),this._moving)))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY).subtract(this._startPoint);
32(n.x||n.y)&&(o.Browser.touch&&Math.abs(n.x)+Math.abs(n.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(n),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))}},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){for(var t in o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.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,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],s[a]="function"==typeof n?n.bind(h):n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MO
32VE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n=t["_leaflet_"+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,n,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,n,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){ 33var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(this._moved&&this._zooming){var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)}else this._zooming=!1},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,
33!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!(!t.shiftKey||1!==t.which&&1!==t.button)&&(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(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._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?
33n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition();return t._controlCorners[e].removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){for(var e in this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},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):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}
33,_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180)*(t.getNorthEast().lng-t.getSouthWest().lng)/180,n=this._map.getSize(),o=this.options,s=0;n.x>0&&(s=i*(o.maxWidth/n.x)),this._updateScales(o,s)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){for(var n in o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?((i=e.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");return a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}
33),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(!(n=a[o.DomUtil.TRANSFORM].match(this._transformRe)))return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if((e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&!0!==n)&&(n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e),this},panBy:function(t,e){if(e=e||{},!(t=o.point(t).round()).x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}
33,_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return!(!0!==i.animate&&!this.getSize().contains(o))&&(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0)},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a})},this)},_onZoomTransitionEnd:function(){this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)(n=s[e]).complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=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: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document); 34L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:20,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._currentShownBounds=null},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom);var n=t,r=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=r;)n=n.__parent;
34return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){return this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),t._icon&&(L.FeatureGroup.prototype.removeLayer.call(this,t),t.setOpacity(1)),this):this:(this._arraySplice(this._needsClustering,t),this)},addLayers:function(t){var e,i,n;if(!this._map)return this._needsClustering=this._needsClustering.concat(t),this;for(e=0,i=t.length;e<i;e++)if(n=t[e],!this.hasLayer(n)&&(this._addLayer(n,this._maxZoom),n.__parent&&2===n.__parent.getChildCount())){var r=n.__parent.getAllChildMarkers(),s=r[0]===n?r[1]:r[0];L.FeatureGroup.prototype.removeLayer.call(this,s)}for(e in this._layers)(n=this._layers[e])instanceof L.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon();return this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},removeLayers:function(t){var e,i,n;if(!this._map){for(e=0,i=t.length;e<i;e++)this._arraySplice(this._needsClustering,t[e]);return this}for(e=0,i=t.length;e<i;e++)(n=t[e]).__parent&&(this._removeLayer(n,!0,!0),n._icon&&(L.FeatureGroup.prototype.removeLayer.call(this,n),n.setOpacity(1)));for(e in this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this._layers)(n=this._layers[e])instanceof L.MarkerCluster&&n._updateIcon();return this},clearLayers:function(){for(var t in this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._layers)L.FeatureGroup.prototype.removeLayer.call(this,this._layers[t]);return this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;if(this._topClusterLevel)t.extend(this._topClusterLevel._bounds);else for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i])},hasLayer:function(t){if(t._noHas)return!1;if(this._needsClustering.length>0)for(var e=this._needsClustering,i=e.length-1;i>=0;i--)if(e[i]===t)return!0;return!(!t.__parent||t.__parent._group!==this)},zoomToShowLayer:function(t,e){var i=function(){if((t._icon||t.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon)e();else if(t.__parent._icon){var n=function(){this.off("spiderfied",n,this),e()};this.on("spiderfied",n,this),t.__parent.spiderfy()}};t._icon?e():t.__parent._zoom<this._map.getZoom()?(this._map.on("moveend",i,this),t._icon||this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),this._map.setVie
34w(t.getLatLng(),t.__parent._zoom+1),t.__parent.zoomToBounds())},onAdd:function(t){this._map=t,this._gridClusters||this._generateInitialClusters();for(var e=0,i=this._needsClustering.length;e<i;e++){var n=this._needsClustering[e];n.__parent||this._addLayer(n,this._maxZoom)}this._needsClustering=[],this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)},onRemove:function(t){for(var e in t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),this._layers)L.FeatureGroup.prototype.removeLayer.call(this,this._layers[e]);this._map=null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return void t.splice(i,1)},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._map;if(e)for(var o=this._maxZoom;o>=0&&r[o].removeObject(t,s.project(t.getLatLng(),o));o--);var a,l=t.__parent,_=l._markers;for(this._arraySplice(_,t);l&&(l._childCount--,!(l._zoom<0));)e&&l._childCount<=1?(a=l._markers[0]===t?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,s.project(l._cLatLng,l._zoom)),r[l._zoom].addObject(a,s.project(a.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(a),a.__parent=l.__parent,l._icon&&(L.FeatureGroup.prototype.removeLayer.call(this,l),i||L.FeatureGroup.prototype.addLayer.call(this,a))):(l._recalculateBounds(),i&&l._icon||l._updateIcon()),l=l.__parent;delete t.__parent},_propagateEvent:function(t){t.target instanceof L.MarkerCluster&&(t.type="cluster"+t.type),L.FeatureGroup.prototype._propagateEvent.call(this,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=null,e=this._map,i=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick;(i||r)&&this.on("clusterclick",function(t){e.getMaxZoom()===e.getZoom()?i&&t.layer.spiderfy():r&&t.layer.zoomToBounds()},this),n&&(this.on("clustermouseover",function(i){this._inZoomAnimation||(t&&e.removeLayer(t),i.layer.getChildCount()>2&&i.layer!==this._spiderfied&&(t=new L.Polygon(i.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(t)))},this),this.on("clustermouseout",function(){t&&(e.removeLayer(t),t=null)},this),e.on("zoomend",function(){t&&(e.removeLayer(t),t=null)},this),e.on("layerremove",function(i){t&&i.layer===this&&(e.removeLayer(t),t=null)},this))},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",null,this),e&&(this.off("clustermouseover",null,this),this.off("clustermouseout",null,this),n.off("zoomend",null,this),n.off("layerremove",null,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius;this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var i=t;i>=0;i--)this._gridClusters[i]=new L.DistanceGrid(e),this._gridUnclustered[i]=new L.DistanceGrid(e);this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(t,e){var i,n,r=this._gridClusters,s=this._gridUnclustered;for(this.options.singleMarkerMode&&(t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}}));e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=r[e].getNearObject(i);if(o)return o._addChild(t),void(t.__parent=o);if(o=s[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var l=new L.MarkerCluster(this,e,o,t);r[e].addObject(l,this._map.project(l._cLatLng,e)),o.__parent=l,t.__parent=l;var _=l;for(n=e-1;n>a._zoom;n--)_=new L.MarkerCluster(this,n,_),r[n].addObject(_,this._map.project(o.getLatLng(),n));for(a._addChild(_),n=e;n>=0&&s[n].removeObject(o,this._map.project(o.getLatLng(),n));n--);return}s[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel}
34,_mergeSplitClusters:function(){this._zoom<this._map._zoom?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,this._map._zoom)):this._zoom>this._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var t=this._map.getBounds(),e=t._southWest,i=t._northEast,n=L.Browser.mobile?0:Math.abs(e.lat-i.lat),r=L.Browser.mobile?0:Math.abs(e.lng-i.lng);return new L.LatLngBounds(new L.LatLng(e.lat-n,e.lng-r,!0),new L.LatLng(i.lat+n,i.lng+r,!0))},_animationAddLayerNonAnimated:function(t,e){if(e===t)L.FeatureGroup.prototype.addLayer.call(this,t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();L.FeatureGroup.prototype.removeLayer.call(this,i[0]),L.FeatureGroup.prototype.removeLayer.call(this,i[1])}else e._updateIcon()}}),L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_animationZoomIn:function(t,e){var i,n,r,s=this,o=this._getExpandedVisibleBounds();for(n in this._topClusterLevel._recursively(o,t,0,function(n){var r,a=n._latlng,l=n._markers;for(n._isSingleParent()&&t+1===e?(L.FeatureGroup.prototype.removeLayer.call(s,n),n._recursivelyAddChildrenToMap(null,e,o)):(n.setOpacity(0),n._recursivelyAddChildrenToMap(a,e,o)),i=l.length-1;i>=0;i--)r=l[i],o.contains(r._latlng)||L.FeatureGroup.prototype.removeLayer.call(s,r)}),this._forceLayout(),s._topClusterLevel._recursivelyBecomeVisible(o,e),s._layers)(r=s._layers[n])instanceof L.MarkerCluster||!r._icon||r.setOpacity(1);s._topClusterLevel._recursively(o,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),setTimeout(function(){s._topClusterLevel._recursively(o,t,0,function(t){L.FeatureGroup.prototype.removeLayer.call(s,t),t.setOpacity(1)}),s._animationEnd()},200)},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),setTimeout(function(){if(1===t._childCount){var s=t._markers[0];s.setLatLng(s.getLatLng()),s.setOpacity(1)}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});r._animationEnd()},200)},_animationAddLayer:function(t,e){var i=this;L.FeatureGroup.prototype.addLayer.call(this,t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.setOpacity(0),setTimeout(function(){L.FeatureGroup.prototype.removeLayer.call(i,t),t.setOpacity(1),i._animationEnd()},200)):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}}),L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._expandBounds(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_expandBounds:function(t){var e,i=t._wLatLng||t._latlng;t instanceof L.MarkerCluster?(this._bounds.extend(t._bounds),e=t._childCount):(this._bounds.extend(i),e=1),this._cLatLng||(this._cLatLng=t._cLatLng||i);var n=this._childCount+e;this._wLatLng?(this._wLatLng.lat=(i.lat*e+this._wLatLng.lat*this._childCount)/n,this._wLatLng.lng=(i.lng*e+this._wLatLng.lng*this._childCount)/n):this._latlng=this._wLatLng=new L.LatLng(i.lat,i.lng)},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._noHas=!0,L.FeatureGroup.prototype.addLayer.call(this._group,this),delete this._noHas}
34,_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,0,i-1,function(t){var i,n,r=t._markers;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.setOpacity(0))},function(t){var i,n,r=t._childClusters;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.setOpacity(1),n._recursivelyRemoveChildrenFromMap(t,e)):n.setOpacity(0),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.setOpacity(1)})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var s=n._markers[r];i.contains(s._latlng)&&(t&&(s._backupLatlng=s.getLatLng(),s.setLatLng(t),s.setOpacity(0)),s._noHas=!0,L.FeatureGroup.prototype.addLayer.call(n._group,s),delete s._noHas)}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,r;this._recursively(t,-1,e-1,function(t){for(r=t._markers.length-1;r>=0;r--)n=t._markers[r],i&&i.contains(n._latlng)||(L.FeatureGroup.prototype.removeLayer.call(t._group,n),n.setOpacity(1))},function(t){for(r=t._childClusters.length-1;r>=0;r--)n=t._childClusters[r],i&&i.contains(n._latlng)||(L.FeatureGroup.prototype.hasLayer&&!L.FeatureGroup.prototype.hasLayer.call(t._group,n)||L.FeatureGroup.prototype.removeLayer.call(t._group,n),n.setOpacity(1))})},_recursively:function(t,e,i,n,r){var s,o,a=this._childClusters,l=this._zoom;if(e>l)for(s=a.length-1;s>=0;s--)o=a[s],t.intersects(o._bounds)&&o._recursively(t,e,i,n,r);else if(n&&n(this),r&&this._zoom===i&&r(this),i>l)for(s=a.length-1;s>=0;s--)o=a[s],t.intersects(o._bounds)&&o._recursively(t,e,i,n,r)},_recalculateBounds:function(){var t,e=this._markers,i=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,t=e.length-1;t>=0;t--)this._expandBounds(e[t]);for(t=i.length-1;t>=0;t--)this._expandBounds(i[t])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,r=this._getCoord(e.x),s=this._getCoord(e.y),o=this._grid,a=o[s]=o[s]||{},l=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete a[r],!0},eachObject:function(t,e){var i,n,r,s,o,a,l=this._grid;for(i in l)for(n in o=l[i])for(r=0,s=(a=o[n]).length;r<s;r++)t.call(e,a[r])&&(r--,s--)},getNearObject:function(t){var e,i,n,r,s,o,a,l,_=this._getCoord(t.x),h=this._getCoord(t.y),u=this._objectPoint,d=this._sqCellSize,p=null;for(e=h-1;e<=h+1;e++)if(r=this._grid[e])for(i=_-1;i<=_+1;i++)if(s=r[i])for(n=0,o=s.length;n<o;n++)a=s[n],(l=this._sqDist(u[L.Util.stamp(a)],t))<d&&(d=l,p=a);return p},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,r,s=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],(r=this.getDistant(n,t))>0&&(a.push(n),r>s&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t]},getConvexHull:function(t){var e,i=!1,n=!1,r=null,s=null;for(e=t.length-1;e>=0;e--){var o=t[e];(!1===i||o.lat>i)&&(r=o,i=o.lat),(!1===n||o.lat<n)&&(s=o,n=o.lat)}return[].concat(this.buildConvexHull([s,r],t),this.buildConvexHull([r,s],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i,n=this.getAllChildMarkers(),r=[],s=[];for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),r.push(e);for(i=(t=L.QuickHull.getConvexHull(r)).length-1;i>=0;i--)s.push(t[i][0]);return s}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,o=[];for(o.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*s,o[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return o},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,r=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,s=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,o=0,a=[];for(a.length=t,i=t-1;i>=0;i--)o+=r/n+5e-4*i,a[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round(),n+=this._2PI*s/o;return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],L.FeatureGroup.prototype.removeLayer.call(i,t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerCluster.include(L.DomUtil.TRANSITION?{SVG_ANIMATION:document.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1,_animationSpiderfy:function(t,e){var i,n,r,s,o=this,a=this._group,l=a._map,_=l.latLngToLayerPoint(this._latlng);for(i=t.length-1;i>=0;i--)(n=t[i]).setZIndexOffset(1e6),n.setOpacity(0),n._noHas=!0,L.FeatureGroup.prototype.addLayer.call(a,n),delete n._noHas,n._setPos(_);a._forceLayout(),a._animationStart();var h=L.Path.SVG?0:.3,u=L.Path.SVG_NS;for(i=t.length-1;i>=0;i--)if(s=l.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setOpacity(1),r=new L.Polyline([o._latlng,s],{weight:1.5,color:"#222",opacity:h}),l.addLayer(r),n._spiderLeg=r,L.Path.SVG&&this.SVG_ANIMATION){var d=r._path.getTotalLength();r._path.setAttribute("stroke-dasharray",d+","+d);var p=document.createElementNS(u,"animate");p.setAttribute("attributeName","stroke-dashoffset"),p.setAttribute("begin","indefinite"),p.setAttribute("from",d),p.setAttribute("to",0),p.setAttribute("dur",.25),r._path.appendChild(p),p.beginElement(),(p=document.createElementNS(u,"animate")).setAttribute("attributeName","stroke-opacity"),p.setAttribute("attributeName","stroke-opacity"),p.setAttribute("begin","indefinite"),p.setAttribute("from",0),p.setAttribute("to",.5),p.setAttribute("dur",.25),r._path.appendChild(p),p.beginElement()}if(o.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),i=t.length-1;i>=0;i--)(n=t[i]._spiderLeg).options.opacity=.5,n._path.setAttribute("stroke-opacity",.5);setTimeout(function(){a._animationEnd(),a.fire("spiderfied")},200)},_animationUnspiderfy:function(t){var e,i,n,r=this._group,s=r._map,o=t?s._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):s.latLngToLayerPoint(this._latlng),a=this.getAllChildMarkers(),l=L.Path.SVG&&this.SVG_ANIMATION;for(r._animationStart(),this.setOpacity(1),i=a.length-1;i>=0;i--)(e=a[i])._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,e._setPos(o),e.setOpacity(0),l&&((n=e._spiderLeg._path.childNodes[0]).setAttribute("to",n.getAttribute("from")),n.setAttribute("from",0),n.beginElement(),(n=e._spiderLeg._path.childNodes[1]).setAttribute("from",.5),n.setAttribute("to",0),n.setAttribute("stroke-opacity",0),n.beginElement(),e._spiderLeg._path.setAttribute("stroke-opacity",0)
34));setTimeout(function(){var t=0;for(i=a.length-1;i>=0;i--)(e=a[i])._spiderLeg&&t++;for(i=a.length-1;i>=0;i--)(e=a[i])._spiderLeg&&(e.setOpacity(1),e.setZIndexOffset(0),t>1&&L.FeatureGroup.prototype.removeLayer.call(r,e),s.removeLayer(e._spiderLeg),delete e._spiderLeg);r._animationEnd()},200)}}:{_animationSpiderfy:function(t,e){var i,n,r,s,o=this._group,a=o._map;for(i=t.length-1;i>=0;i--)s=a.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset(1e6),L.FeatureGroup.prototype.addLayer.call(o,n),r=new L.Polyline([this._latlng,s],{weight:1.5,color:"#222"}),a.addLayer(r),n._spiderLeg=r;this.setOpacity(.3),o.fire("spiderfied")},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation?this._map.on("zoomstart",this._unspiderfyZoomStart,this):this._map.on("zoomend",this._unspiderfyWrapper,this),L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(L.FeatureGroup.prototype.removeLayer.call(this,t),t.setOpacity(1),t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}); 35"undefined"!=typeof L&&(L.CanvasLayer=L.Class.extend({includes:[L.Mixin.Events,L.Mixin.TileLoader],options:{minZoom:0,maxZoom:28,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:L.Browser.mobile,updateWhenIdle:L.Browser.mobile,tileLoader:!1},initialize:function(t){t=t||{},this.render=this.render.bind(this),L.Util.setOptions(this,t),this._canvas=document.createElement("canvas"),this._canvas.style.position="absolute",this._canvas.style.top=0,this._canvas.style.left=0,this._canvas.style.zIndex=t.zIndex||0,this._canvas.style.cursor="crosshair",this._ctx=this._canvas.getContext("2d");var e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)};this.requestAnimationFrame=e},onAdd:function(t){this._map=t,t._panes.staticPane||(t._panes.staticPane=t._createPane("leaflet-tile-pane",t._container)),this._staticPane=t._panes.staticPane,this._staticPane.appendChild(this._canvas),t.on({viewreset:this._reset},this),t.on("move",this._render,this),t.on("resize",this._reset,this),this.options.tileLoader&&this._initTileLoader(),this._reset()},getCanvas:function(){return this._canvas},getAttribution:function(){return this.options.attribution},draw:function(){return this._reset()},onRemove:function(t){this._staticPane.removeChild(this._canvas),t.off({viewreset:this._reset,move:this._render,resize:this._reset},this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){this._canvas.style.zIndex=t},bringToFront:function(){return this},bringToBack:function(){return this},_reset:function(){var t=this._map.getSize();this._canvas.width=t.x,this._canvas.height=t.y,this.onResize(),this._render()},_updateOpacity:function(){},_render:function(){this.requestAnimationFrame.call(window,this.render)},redraw:function(){this._render()},onResize:function(){},render:function(){throw new Error("render function should be implemented")}})); 36!function(){function t(t,e,i){L.biginteger_used=1,null!=t&&("number"==typeof t&&void 0===e?this.fromInt(t):"number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function e(){return new t(null)}function i(t,e,i,n,o,r){for(;0<=--r;){var s=e*this[t++]+i[n]+o;o=Math.floor(s/67108864),i[n++]=67108863&s}return o}function n(t,e,i,n,o,r){var s=32767&e;for(e>>=15;0<=--r;){var l=32767&this[t],p=this[t++]>>15,u=e*l+p*s;o=((l=s*l+((32767&u)<<15)+i[n]+(1073741823&o))>>>30)+(u>>>15)+e*p+(o>>>30),i[n++]=1073741823&l}return o}function o(t,e,i,n,o,r){var s=16383&e;
36for(e>>=14;0<=--r;){var l=16383&this[t],p=this[t++]>>14,u=e*l+p*s;o=((l=s*l+((16383&u)<<14)+i[n]+o)>>28)+(u>>14)+e*p,i[n++]=268435455&l}return o}function r(t,e){var i=N[t.charCodeAt(e)];return null==i?-1:i}function s(t){var i=e();return i.fromInt(t),i}function l(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=t>>1&&(i+=1),i}function p(t){this.m=t}function u(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function h(t,e){return t&e}function a(t,e){return t|e}function f(t,e){return t^e}function d(t,e){return t&~e}function P(){}function m(t){return t}function y(i){this.r2=e(),this.q3=e(),t.ONE.dlShiftTo(2*i.t,this.r2),this.mu=this.r2.divide(i),this.m=i}var c,v,C,I,x,_,E,L={},g=!1;if("undefined"!=typeof module&&module.exports?(module.exports=L,g=!0):"undefined"!=typeof document?window.ClipperLib=L:self.ClipperLib=L,g)T="chrome",c="Netscape";else{var T=navigator.userAgent.toString().toLowerCase();c=navigator.appName}v=-1!=T.indexOf("chrome")&&-1==T.indexOf("chromium")?1:0,g=-1!=T.indexOf("chromium")?1:0,C=-1!=T.indexOf("safari")&&-1==T.indexOf("chrome")&&-1==T.indexOf("chromium")?1:0,I=-1!=T.indexOf("firefox")?1:0,T.indexOf("firefox/17"),T.indexOf("firefox/15"),T.indexOf("firefox/3"),x=-1!=T.indexOf("opera")?1:0,T.indexOf("msie 10"),T.indexOf("msie 9"),_=-1!=T.indexOf("msie 8")?1:0,E=-1!=T.indexOf("msie 7")?1:0,T=-1!=T.indexOf("msie ")?1:0,L.biginteger_used=null,"Microsoft Internet Explorer"==c?(t.prototype.am=n,c=30):"Netscape"!=c?(t.prototype.am=i,c=26):(t.prototype.am=o,c=28),t.prototype.DB=c,t.prototype.DM=(1<<c)-1,t.prototype.DV=1<<c,t.prototype.FV=Math.pow(2,52),t.prototype.F1=52-c,t.prototype.F2=2*c-52;var X,N=[];for(c=48,X=0;9>=X;++X)N[c++]=X;for(c=97,X=10;36>X;++X)N[c++]=X;for(c=65,X=10;36>X;++X)N[c++]=X;p.prototype.convert=function(t){return 0>t.s||0<=t.compareTo(this.m)?t.mod(this.m):t},p.prototype.revert=function(t){return t},p.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},p.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},u.prototype.convert=function(i){var n=e();return i.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),0>i.s&&0<n.compareTo(t.ZERO)&&this.m.subTo(n,n),n},u.prototype.revert=function(t){var i=e();return t.copyTo(i),this.reduce(i),i},u.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i,n=(i=32767&t[e])*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},u.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},u.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=0>t?-1:0,0<t?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,i){var n;if(16==i)n=4;else if(8==i)n=3;else if(256==i)n=8;else if(2==i)n=1;else if(32==i)n=5;else{if(4!=i)return void this.fromRadix(e,i);n=2}this.s=this.t=0;for(var o=e.length,s=!1,l=0;0<=--o;){var p=8==n?255&e[o]:r(e,o);0>p?"-"==e.charAt(o)&&(s=!0):(s=!1,0==l?this[this.t++]=p:l+n>this.DB?(this[this.t-1]|=(p&(1<<this.DB-l)-1)<<l,this[this.t++]=p>>this.DB-l):this[this.t-1]|=p<<l,(l+=n)>=this.DB&&(l-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,0<l&&(this[this.t-1]|=(1<<this.DB-l)-1<<l)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;0<=i;--i)e[i+t]=this[i];for(i=t-1;0<=i;--i)e[i]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){var i,n=t%this.DB,o=this.DB-n,r=(1<<o)-1,s=Math.floor(t/this.DB),l=this.s<<n&this.DM;for(i=this.t-1;0<=i;--i)e[i+s+1]=this[i]>>o|l,l=(this[i]&r)<<n;for(i=s-1;0<=i;--i)e[i]=0;e[s]=l,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var n=t%this.DB,o=this.DB-n,r=(1<<n)-1;e[0]=this[i]>>n;for(var s=i+1;s<this.t;++s)e[s-i-1]|=(this[s]&r)<<o,e[s-i]=this[s]>>n;0<n&&(e[this.t-i-1]|=(this.s&r)<<o),e.t=this.t-i,e.clamp()}},t.prototype.subTo=function(t,e){for(var i=0,n=0,o=Math.min(t.t,this.t);i<o;)n+=this[i]-t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n-=t[i],e[i++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=0>n?-1:0,-1>n?e[i++]=this.DV+n:0<n&&(e[i++]=n),e.t=i,e.clamp()},t.prototype.multiplyTo=function(e,i){var n=this.abs(),o=e.abs(),r=n.t;for(i.t=r+o.t;0<=--r;)i[r]=0;for(r=0;r<o.t;++r)i[r+n.t]=n.am(0,o[r],i,r,0,n.t);i.s=0,i.clamp(),this.s!=e.s&&t.ZERO.subTo(i,i)},t.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;0<=--i;)t[i]=0;for(i=0;i<e.t-1;++i){var n=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,n,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(i,n,o){var r=i.abs();if(!(0>=r.t)){var s=this.abs();if(s.t<r.t)null!=n&&n.fromInt(0),null!=o&&this.copyTo(o);else{null==o&&(o=e());var p=e(),u=this.s;i=i.s;var h=this.DB-l(r[r.t-1]);if(0<h?(r.lShiftTo(h,p),s.lShiftTo(h,o)):(r.copyTo(p),s.copyTo(o)),0!=(s=p[(r=p.t)-1])){var a=s*(1<<this.F1)+(1<r?p[r-2]>>this.F2:0),f=this.FV/a,d=(a=(1<<this.F1)/a,1<<this.F2),P=o.t,m=P-r,y=null==n?e():n;for(p.dlShiftTo(m,y),0<=o.compareTo(y)&&(o[o.t++]=1,o.subTo(y,o)),t.ONE.dlShiftTo(r,y),y.subTo(p,p);p.t<r;)p[p.t++]=0;for(;0<=--m;){var c=o[--P]==s?this.DM:Math.floor(o[P]*f+(o[P-1]+d)*a);if((o[P]+=p.am(0,c,o,m,0,r))<c)for(p.dlShiftTo(m,y),o.subTo(y,o);o[P]<--c;)o.subTo(y,o)}null!=n&&(o.drShiftTo(r,n),u!=i&&t.ZERO.subTo(n,n)),o.t=r,o.clamp(),0<h&&o.rShiftTo(h,o),0>u&&t.ZERO.subTo(o,o)}}}},t.prototype.invDigit=function(){if(1>this.t)return 0;var t,e=this[0];return 0==(1&e)?0:0<(t=(t=(t=(t=(t=3&e)*(2-(15&e)*t)&15)*(2-(255&e)*t)&25
365)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)?this.DV-t:-t},t.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},t.prototype.exp=function(i,n){if(4294967295<i||1>i)return t.ONE;var o=e(),r=e(),s=n.convert(this),p=l(i)-1;for(s.copyTo(o);0<=--p;)if(n.sqrTo(o,r),0<(i&1<<p))n.mulTo(r,s,o);else{var u=o;o=r,r=u}return n.revert(o)},t.prototype.toString=function(t){if(0>this.s)return"-"+this.negate().toString(t);if(16==t)t=4;else if(8==t)t=3;else if(2==t)t=1;else if(32==t)t=5;else{if(4!=t)return this.toRadix(t);t=2}var e,i=(1<<t)-1,n=!1,o="",r=this.t,s=this.DB-r*this.DB%t;if(0<r--)for(s<this.DB&&0<(e=this[r]>>s)&&(n=!0,o="0123456789abcdefghijklmnopqrstuvwxyz".charAt(e));0<=r;)s<t?(e=(this[r]&(1<<s)-1)<<t-s,e|=this[--r]>>(s+=this.DB-t)):(e=this[r]>>(s-=t)&i,0>=s&&(s+=this.DB,--r)),0<e&&(n=!0),n&&(o+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(e));return n?o:"0"},t.prototype.negate=function(){var i=e();return t.ZERO.subTo(this,i),i},t.prototype.abs=function(){return 0>this.s?this.negate():this},t.prototype.compareTo=function(t){if(0!=(e=this.s-t.s))return e;var e,i=this.t;if(0!=(e=i-t.t))return 0>this.s?-e:e;for(;0<=--i;)if(0!=(e=this[i]-t[i]))return e;return 0},t.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(i){var n=e();return this.abs().divRemTo(i,null,n),0>this.s&&0<n.compareTo(t.ZERO)&&i.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var i;return i=256>t||e.isEven()?new p(e):new u(e),this.exp(t,i)},t.ZERO=s(0),t.ONE=s(1),P.prototype.convert=m,P.prototype.revert=m,P.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},P.prototype.sqrTo=function(t,e){t.squareTo(e)},y.prototype.convert=function(t){if(0>t.s||t.t>2*this.m.t)return t.mod(this.m);if(0>t.compareTo(this.m))return t;var i=e();return t.copyTo(i),this.reduce(i),i},y.prototype.revert=function(t){return t},y.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>t.compareTo(this.r2);)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},y.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},y.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var Y=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],O=67108864/Y[Y.length-1];t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||2>t||36<t)return"0";var i=this.chunkSize(t),n=s(i=Math.pow(t,i)),o=e(),r=e(),l="";for(this.divRemTo(n,o,r);0<o.signum();)l=(i+r.intValue()).toString(t).substr(1)+l,o.divRemTo(n,o,r);return r.intValue().toString(t)+l},t.prototype.fromRadix=function(e,i){this.fromInt(0),null==i&&(i=10);for(var n=this.chunkSize(i),o=Math.pow(i,n),s=!1,l=0,p=0,u=0;u<e.length;++u){var h=r(e,u);0>h?"-"==e.charAt(u)&&0==this.signum()&&(s=!0):(p=i*p+h,++l>=n&&(this.dMultiply(o),this.dAddOffset(p,0),p=l=0))}0<l&&(this.dMultiply(Math.pow(i,l)),this.dAddOffset(p,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,i,n){if("number"==typeof i)if(2>e)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(i);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var o=7&e;(n=[]).length=1+(e>>3),i.nextBytes(n),n[0]=0<o?n[0]&(1<<o)-1:0,this.fromString(n,256)}}
vendor: 4,394 bytes, line 36
36,t.prototype.bitwiseTo=function(t,e,i){var n,o,r=Math.min(t.t,this.t);for(n=0;n<r;++n)i[n]=e(this[n],t[n]);if(t.t<this.t){for(o=t.s&this.DM,n=r;n<this.t;++n)i[n]=e(this[n],o);i.t=this.t}else{for(o=this.s&this.DM,n=r;n<t.t;++n)i[n]=e(o,t[n]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},t.prototype.changeBit=function(e,i){var n=t.ONE.shiftLeft(e);return this.bitwiseTo(n,i,n),n},t.prototype.addTo=function(t,e){for(var i=0,n=0,o=Math.min(t.t,this.t);i<o;)n+=this[i]+t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n+=t[i],e[i++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=0>n?-1:0,0<n?e[i++]=n:-1>n&&(e[i++]=this.DV+n),e.t=i,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,i){var n,o=Math.min(this.t+t.t,e);for(i.s=0,i.t=o;0<o;)i[--o]=0;for(n=i.t-this.t;o<n;++o)i[o+this.t]=this.am(0,t[o],i,o,0,this.t);for(n=Math.min(t.t,e);o<n;++o)this.am(0,t[o],i,o,0,e-o);i.clamp()},t.prototype.multiplyUpperTo=function(t,e,i){--e;var n=i.t=this.t+t.t-e;for(i.s=0;0<=--n;)i[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)i[this.t+n-e]=this.am(e-n,t[n],i,0,0,this.t+n-e);i.clamp(),i.drShiftTo(1,i)},t.prototype.modInt=function(t){if(0>=t)return 0;var e=this.DV%t,i=0>this.s?t-1:0;if(0<this.t)if(0==e)i=this[0]%t;else for(var n=this.t-1;0<=n;--n)i=(e*i+this[n])%t;return i},t.prototype.millerRabin=function(i){var n=this.subtract(t.ONE),o=n.getLowestSetBit();if(0>=o)return!1;var r=n.shiftRight(o);(i=i+1>>1)>Y.length&&(i=Y.length);for(var s=e(),l=0;l<i;++l){s.fromInt(Y[Math.floor(Math.random()*Y.length)]);var p=s.modPow(r,this);if(0!=p.compareTo(t.ONE)&&0!=p.compareTo(n)){for(var u=1;u++<o&&0!=p.compareTo(n);)if(0==(p=p.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=p.compareTo(n))return!1}}return!0},t.prototype.clone=function(){var t=e();return this.copyTo(t),t},t.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this[0]?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,n=this.DB-t*this.DB%8,o=0;if(0<t--)for(n<this.DB&&(i=this[t]>>n)!=(this.s&this.DM)>>n&&(e[o++]=i|this.s<<this.DB-n);0<=t;)8>n?(i=(this[t]&(1<<n)-1)<<8-n,i|=this[--t]>>(n+=this.DB-8)):(i=this[t]>>(n-=8)&255,0>=n&&(n+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==o&&(128&this.s)!=(128&i)&&++o,(0<o||i!=this.s)&&(e[o++]=i);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return 0>this.compareTo(t)?this:t},t.prototype.max=function(t){return 0<this.compareTo(t)?this:t},t.prototype.and=function(t){var i=e();return this.bitwiseTo(t,h,i),i},t.prototype.or=function(t){var i=e();return this.bitwiseTo(t,a,i),i},t.prototype.xor=function(t){var i=e();return this.bitwiseTo(t,f,i),i},t.prototype.andNot=function(t){var i=e();return this.bitwiseTo(t,d,i),i},t.prototype.not=function(){for(var t=e(),i=0;i<this.t;++i)t[i]=this.DM&~this[i];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var i=e();return 0>t?this.rShiftTo(-t,i):this.lShiftTo(t,i),i},t.prototype.shiftRight=function(t){var i=e();return 0>t?this.lShiftTo(-t,i):this.rShiftTo(t,i),i},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t]){var e=t*this.DB;if(0==(t=this[t]))t=-1;else{var i=0;0==(65535&t)&&(t>>=16,i+=16),0==(255&t)&&(t>>=8,i+=8),0==(15&t)&&(t>>=4,i+=4),0==(3&t)&&(t>>=2,i+=2),0==(1&t)&&++i,t=i}return e+t}return 0>this.s?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i){for(var n=this[i]^e,o=0;0!=n;)n&=n-1,++o;t+=o}return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,a)},t.prototype.clearBit=function(t){return this.changeBit(t,d)}
36,t.prototype.flipBit=function(t){return this.changeBit(t,f)},t.prototype.add=function(t){var i=e();return this.addTo(t,i),i},t.prototype.subtract=function(t){var i=e();return this.subTo(t,i),i},t.prototype.multiply=function(t){var i=e();return this.multiplyTo(t,i),i},t.prototype.divide=function(t){var i=e();return this.divRemTo(t,i,null),i},t.prototype.remainder=function(t){var i=e();return this.divRemTo(t,null,i),i},t.prototype.divideAndRemainder=function(t){var i=e(),n=e();return this.divRemTo(t,i,n),[i,n]},t.prototype.modPow=function(t,i){var n,o,r=t.bitLength(),h=s(1);if(0>=r)return h;n=18>r?1:48>r?3:144>r?4:768>r?5:6,o=8>r?new p(i):i.isEven()?new y(i):new u(i);var a=[],f=3,d=n-1,P=(1<<n)-1;if(a[1]=o.convert(this),1<n)for(r=e(),o.sqrTo(a[1],r);f<=P;)a[f]=e(),o.mulTo(r,a[f-2],a[f]),f+=2;var m,c=t.t-1,v=!0,C=e();for(r=l(t[c])-1;0<=c;){for(r>=d?m=t[c]>>r-d&P:(m=(t[c]&(1<<r+1)-1)<<d-r,0<c&&(m|=t[c-1]>>this.DB+r-d)),f=n;0==(1&m);)m>>=1,--f;if(0>(r-=f)&&(r+=this.DB,--c),v)a[m].copyTo(h),v=!1;else{for(;1<f;)o.sqrTo(h,C),o.sqrTo(C,h),f-=2;0<f?o.sqrTo(h,C):(f=h,h=C,C=f),o.mulTo(C,a[m],h)}for(;0<=c&&0==(t[c]&1<<r);)o.sqrTo(h,C),f=h,h=C,C=f,0>--r&&(r=this.DB-1,--c)}return o.revert(h)},t.prototype.modInverse=function(e){var i=e.isEven();if(this.isEven()&&i||0==e.signum())return t.ZERO;for(var n=e.clone(),o=this.clone(),r=s(1),l=s(0),p=s(0),u=s(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),i?(r.isEven()&&l.isEven()||(r.addTo(this,r),l.subTo(e,l)),r.rShiftTo(1,r)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);for(;o.isEven();)o.rShiftTo(1,o),i?(p.isEven()&&u.isEven()||(p.addTo(this,p),u.subTo(e,u)),p.rShiftTo(1,p)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);0<=n.compareTo(o)?(n.subTo(o,n),i&&r.subTo(p,r),l.subTo(u,l)):(o.subTo(n,o),i&&p.subTo(r,p),u.subTo(l,u))}return 0!=o.compareTo(t.ONE)?t.ZERO:0<=u.compareTo(e)?u.subtract(e):0>u.signum()?(u.addTo(e,u),0>u.signum()?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new P)},t.prototype.gcd=function(t){var e=0>this.s?this.negate():this.clone();if(t=0>t.s?t.negate():t.clone(),0>e.compareTo(t)){var i=e;e=t;t=i}i=e.getLowestSetBit();var n=t.getLowestSetBit();if(0>n)return e;for(i<n&&(n=i),0<n&&(e.rShiftTo(n,e),t.rShiftTo(n,t));0<e.signum();)0<(i=e.getLowestSetBit())&&e.rShiftTo(i,e),0<(i=t.getLowestSetBit())&&t.rShiftTo(i,t),0<=e.compareTo(t)?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return 0<n&&t.lShiftTo(n,t),t},t.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=Y[Y.length-1]){for(e=0;e<Y.length;++e)if(i[0]==Y[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<Y.length;){for(var n=Y[e],o=e+1;o<Y.length&&n<O;)n*=Y[o++];for(n=i.modInt(n);e<o;)if(0==n%Y[e++])return!1}return i.millerRabin(t)},t.prototype.square=function(){var t=e();return this.squareTo(t),t};var S=t;if(S.prototype.IsNegative=function(){return-1==this.compareTo(S.ZERO)},S.op_Equality=function(t,e){return 0==t.compareTo(e)},S.op_Inequality=function(t,e){return 0!=t.compareTo(e)},S.op_GreaterThan=function(t,e){return 0<t.compareTo(e)},S.op_LessThan=function(t,e){return 0>t.compareTo(e)},S.op_Addition=function(t,e){return new S(t).add(new S(e))},S.op_Subtraction=function(t,e){return new S(t).subtract(new S(e))},S.Int128Mul=function(t,e){return new S(t).multiply(new S(e))},S.op_Division=function(t,e){return t.divide(e)},S.prototype.ToDouble=function(){return parseFloat(this.toString())},void 0===A)var A=function(t,e){var i;if("undefined"==typeof Object.getOwnPropertyNames)for(i in e.prototype)"undefined"!=typeof t.prototype[i]&&t.prototype[i]!=Object.prototype[i]||(t.prototype[i]=e.prototype[i]);else for(var n=Object.getOwnPropertyNames(e.prototype),o=0;o<n.length;o++)void 0===Object.getOwnPropertyDescriptor(t.prototype,n[o])&&Object.defineProperty(t.prototype,n[o],Object.getOwnPropertyDescriptor(e.prototype,n[o]));for(i in e)"undefined"==typeof t[i]&&(t[i]=e[i]);t.$baseCtor=e};L.Path=function(){return[]},L.Paths=function(){return[]},L.DoublePoint=function(){var t=arguments;this.Y=this.X=0,1==t.length?(this.X=t[0].X,this.Y=t[0].Y):2==t.length&&(this.X=t[0],this.Y=t[1])}
36,L.DoublePoint0=function(){this.Y=this.X=0},L.DoublePoint1=function(t){this.X=t.X,this.Y=t.Y},L.DoublePoint2=function(t,e){this.X=t,this.Y=e},L.PolyNode=function(){this.m_Parent=null,this.m_polygon=new L.Path,this.m_endtype=this.m_jointype=this.m_Index=0,this.m_Childs=[],this.IsOpen=!1},L.PolyNode.prototype.IsHoleNode=function(){for(var t=!0,e=this.m_Parent;null!==e;)t=!t,e=e.m_Parent;return t},L.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length},L.PolyNode.prototype.Contour=function(){return this.m_polygon},L.PolyNode.prototype.AddChild=function(t){var e=this.m_Childs.length;this.m_Childs.push(t),t.m_Parent=this,t.m_Index=e},L.PolyNode.prototype.GetNext=function(){return 0<this.m_Childs.length?this.m_Childs[0]:this.GetNextSiblingUp()},L.PolyNode.prototype.GetNextSiblingUp=function(){return null===this.m_Parent?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]},L.PolyNode.prototype.Childs=function(){return this.m_Childs},L.PolyNode.prototype.Parent=function(){return this.m_Parent},L.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()},L.PolyTree=function(){this.m_AllPolys=[],L.PolyNode.call(this)},L.PolyTree.prototype.Clear=function(){for(var t=0,e=this.m_AllPolys.length;t<e;t++)this.m_AllPolys[t]=null;this.m_AllPolys.length=0,this.m_Childs.length=0},L.PolyTree.prototype.GetFirst=function(){return 0<this.m_Childs.length?this.m_Childs[0]:null},L.PolyTree.prototype.Total=function(){return this.m_AllPolys.length},A(L.PolyTree,L.PolyNode),L.Math_Abs_Int64=L.Math_Abs_Int32=L.Math_Abs_Double=function(t){return Math.abs(t)},L.Math_Max_Int32_Int32=function(t,e){return Math.max(t,e)},L.Cast_Int32=T||x||C?function(t){return 0|t}:function(t){return~~t},L.Cast_Int64=v?function(t){return-2147483648>t||2147483647<t?0>t?Math.ceil(t):Math.floor(t):~~t}:I&&"function"==typeof Number.toInteger?function(t){return Number.toInteger(t)}:E||_?function(t){return parseInt(t,10)}:T?function(t){return-2147483648>t||2147483647<t?0>t?Math.ceil(t):Math.floor(t):0|t}:function(t){return 0>t?Math.ceil(t):Math.floor(t)},L.Clear=function(t){t.length=0},L.PI=3.141592653589793,L.PI2=6.283185307179586,L.IntPoint=function(){var t,e=(t=arguments).length;this.Y=this.X=0,2==e?(this.X=t[0],this.Y=t[1]):1==e?t[0]instanceof L.DoublePoint?(t=t[0],this.X=L.Clipper.Round(t.X),this.Y=L.Clipper.Round(t.Y)):(t=t[0],this.X=t.X,this.Y=t.Y):this.Y=this.X=0},L.IntPoint.op_Equality=function(t,e){return t.X==e.X&&t.Y==e.Y},L.IntPoint.op_Inequality=function(t,e){return t.X!=e.X||t.Y!=e.Y},L.IntPoint0=function(){this.Y=this.X=0},L.IntPoint1=function(t){this.X=t.X,this.Y=t.Y},L.IntPoint1dp=function(t){this.X=L.Clipper.Round(t.X),this.Y=L.Clipper.Round(t.Y)},L.IntPoint2=function(t,e){this.X=t,this.Y=e},L.IntRect=function(){var t=arguments,e=t.length;4==e?(this.left=t[0],this.top=t[1],this.right=t[2],this.bottom=t[3]):1==e?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):this.bottom=this.right=this.top=this.left=0},L.IntRect0=function(){this.bottom=this.right=this.top=this.left=0},L.IntRect1=function(t){this.left=t.left,this.top=t.top,this.right=t.right,this.bottom=t.bottom},L.IntRect4=function(t,e,i,n){this.left=t,this.top=e,this.right=i,this.bottom=n},L.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3},L.PolyType={ptSubject:0,ptClip:1},L.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3},L.JoinType={jtSquare:0,jtRound:1,jtMiter:2},L.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4},L.EdgeSide={esLeft:0,esRight:1},L.Direction={dRightToLeft:0,dLeftToRight:1},L.TEdge=function(){this.Bot=new L.IntPoint,this.Curr=new L.IntPoint,this.Top=new L.IntPoint,this.Delta=new L.IntPoint,this.Dx=0,this.PolyTyp=L.PolyType.ptSubject,this.Side=L.EdgeSide.esLeft,this.OutIdx=this.WindCnt2=this.WindCnt=this.WindDelta=0,this.PrevInSEL=this.NextInSEL=this.PrevInAEL=this.NextInAEL=this.NextInLML=this.Prev=this.Next=null},L.IntersectNode=function(){this.Edge2=this.Edge1=null,this.Pt=new L.IntPoint},L.MyIntersectNodeSort=function(){},L.MyIntersectNodeSort.Compare=function(t,e){return e.Pt.Y-t.Pt.Y},L.LocalMinima=function(){this.Y=0,this.Next=this.RightBound=this.LeftBound=null},L.Scanbeam=function(){this.Y=0,this.Next=null},L.OutRec=function(){this.Idx=0,this.IsOpen=this.IsHole=!1,this.PolyNode=this.BottomPt=this.Pts=this.FirstLeft=null},L.OutPt=function(){this.Idx=0,this.Pt=new L.IntPoint,this.Prev=this.Next=null},L.Join=function(){this.OutPt2=this.OutPt1=null,this.OffPt=new L.IntPoint},L.ClipperBase=function(){this.m_CurrentLM=this.m_MinimaList=null,this.m_edges=[],this.PreserveCollinear=this.m_HasOpenPaths=this.m_UseFullRange=!1,this.m_CurrentLM=this.m_MinimaList=null,this.m_HasOpenPaths=this.m_UseFullRange=!1},L.ClipperBase.horizontal=-9007199254740992,L.ClipperBase.Skip=-2,L.ClipperBase.Unassigned=-1,L.ClipperBase.tolerance=1e-20,L.ClipperBase.loRange=47453132,L.ClipperBase.hiRange=0xfffffffffffff,L.ClipperBase.near_zero=function(t){return t>-L.ClipperBase.tolerance&&t<L.ClipperBase.tolerance},L.ClipperBase.IsHorizontal=function(t){return 0===t.Delta.Y},L.ClipperBase.prototype.PointIsVertex=function(t,e){var i=e;do{if(L.IntPoint.op_Equality(i.Pt,t))return!0;
vendor: 5,041 bytes, line 36
36i=i.Next}while(i!=e);return!1},L.ClipperBase.prototype.PointOnLineSegment=function(t,e,i,n){return n?t.X==e.X&&t.Y==e.Y||t.X==i.X&&t.Y==i.Y||t.X>e.X==t.X<i.X&&t.Y>e.Y==t.Y<i.Y&&S.op_Equality(S.Int128Mul(t.X-e.X,i.Y-e.Y),S.Int128Mul(i.X-e.X,t.Y-e.Y)):t.X==e.X&&t.Y==e.Y||t.X==i.X&&t.Y==i.Y||t.X>e.X==t.X<i.X&&t.Y>e.Y==t.Y<i.Y&&(t.X-e.X)*(i.Y-e.Y)==(i.X-e.X)*(t.Y-e.Y)},L.ClipperBase.prototype.PointOnPolygon=function(t,e,i){for(var n=e;;){if(this.PointOnLineSegment(t,n.Pt,n.Next.Pt,i))return!0;if((n=n.Next)==e)break}return!1},L.ClipperBase.prototype.SlopesEqual=L.ClipperBase.SlopesEqual=function(){var t,e,i,n=arguments,o=n.length;return 3==o?(o=n[0],t=n[1],(n=n[2])?S.op_Equality(S.Int128Mul(o.Delta.Y,t.Delta.X),S.Int128Mul(o.Delta.X,t.Delta.Y)):L.Cast_Int64(o.Delta.Y*t.Delta.X)==L.Cast_Int64(o.Delta.X*t.Delta.Y)):4==o?(o=n[0],t=n[1],e=n[2],(n=n[3])?S.op_Equality(S.Int128Mul(o.Y-t.Y,t.X-e.X),S.Int128Mul(o.X-t.X,t.Y-e.Y)):0==L.Cast_Int64((o.Y-t.Y)*(t.X-e.X))-L.Cast_Int64((o.X-t.X)*(t.Y-e.Y))):(o=n[0],t=n[1],e=n[2],i=n[3],(n=n[4])?S.op_Equality(S.Int128Mul(o.Y-t.Y,e.X-i.X),S.Int128Mul(o.X-t.X,e.Y-i.Y)):0==L.Cast_Int64((o.Y-t.Y)*(e.X-i.X))-L.Cast_Int64((o.X-t.X)*(e.Y-i.Y)))},L.ClipperBase.SlopesEqual3=function(t,e,i){return i?S.op_Equality(S.Int128Mul(t.Delta.Y,e.Delta.X),S.Int128Mul(t.Delta.X,e.Delta.Y)):L.Cast_Int64(t.Delta.Y*e.Delta.X)==L.Cast_Int64(t.Delta.X*e.Delta.Y)},L.ClipperBase.SlopesEqual4=function(t,e,i,n){return n?S.op_Equality(S.Int128Mul(t.Y-e.Y,e.X-i.X),S.Int128Mul(t.X-e.X,e.Y-i.Y)):0==L.Cast_Int64((t.Y-e.Y)*(e.X-i.X))-L.Cast_Int64((t.X-e.X)*(e.Y-i.Y))},L.ClipperBase.SlopesEqual5=function(t,e,i,n,o){return o?S.op_Equality(S.Int128Mul(t.Y-e.Y,i.X-n.X),S.Int128Mul(t.X-e.X,i.Y-n.Y)):0==L.Cast_Int64((t.Y-e.Y)*(i.X-n.X))-L.Cast_Int64((t.X-e.X)*(i.Y-n.Y))},L.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var t=0,e=this.m_edges.length;t<e;++t){for(var i=0,n=this.m_edges[t].length;i<n;++i)this.m_edges[t][i]=null;L.Clear(this.m_edges[t])}L.Clear(this.m_edges),this.m_HasOpenPaths=this.m_UseFullRange=!1},L.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;null!==this.m_MinimaList;){var t=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=t}this.m_CurrentLM=null},L.ClipperBase.prototype.RangeTest=function(t,e){e.Value?(t.X>L.ClipperBase.hiRange||t.Y>L.ClipperBase.hiRange||-t.X>L.ClipperBase.hiRange||-t.Y>L.ClipperBase.hiRange)&&L.Error("Coordinate outside allowed range in RangeTest()."):(t.X>L.ClipperBase.loRange||t.Y>L.ClipperBase.loRange||-t.X>L.ClipperBase.loRange||-t.Y>L.ClipperBase.loRange)&&(e.Value=!0,this.RangeTest(t,e))},L.ClipperBase.prototype.InitEdge=function(t,e,i,n){t.Next=e,t.Prev=i,t.Curr.X=n.X,t.Curr.Y=n.Y,t.OutIdx=-1},L.ClipperBase.prototype.InitEdge2=function(t,e){t.Curr.Y>=t.Next.Curr.Y?(t.Bot.X=t.Curr.X,t.Bot.Y=t.Curr.Y,t.Top.X=t.Next.Curr.X,t.Top.Y=t.Next.Curr.Y):(t.Top.X=t.Curr.X,t.Top.Y=t.Curr.Y,t.Bot.X=t.Next.Curr.X,t.Bot.Y=t.Next.Curr.Y),this.SetDx(t),t.PolyTyp=e},L.ClipperBase.prototype.FindNextLocMin=function(t){for(var e;;){for(;L.IntPoint.op_Inequality(t.Bot,t.Prev.Bot)||L.IntPoint.op_Equality(t.Curr,t.Top);)t=t.Next;if(t.Dx!=L.ClipperBase.horizontal&&t.Prev.Dx!=L.ClipperBase.horizontal)break;for(;t.Prev.Dx==L.ClipperBase.horizontal;)t=t.Prev;for(e=t;t.Dx==L.ClipperBase.horizontal;)t=t.Next;if(t.Top.Y!=t.Prev.Bot.Y){e.Prev.Bot.X<t.Bot.X&&(t=e);break}}return t},L.ClipperBase.prototype.ProcessBound=function(t,e){var i,n=t,o=t;if(t.Dx==L.ClipperBase.horizontal&&(i=e?t.Prev.Bot.X:t.Next.Bot.X,t.Bot.X!=i&&this.ReverseHorizontal(t)),o.OutIdx!=L.ClipperBase.Skip)if(e){for(;o.Top.Y==o.Next.Bot.Y&&o.Next.OutIdx!=L.ClipperBase.Skip;)o=o.Next;if(o.Dx==L.ClipperBase.horizontal&&o.Next.OutIdx!=L.ClipperBase.Skip){for(i=o;i.Prev.Dx==L.ClipperBase.horizontal;)i=i.Prev;i.Prev.Top.X==o.Next.Top.X?e||(o=i.Prev):i.Prev.Top.X>o.Next.Top.X&&(o=i.Prev)}for(;t!=o;)t.NextInLML=t.Next,t.Dx==L.ClipperBase.horizontal&&t!=n&&t.Bot.X!=t.Prev.Top.X&&this.ReverseHorizontal(t),t=t.Next;t.Dx==L.ClipperBase.horizontal&&t!=n&&t.Bot.X!=t.Prev.Top.X&&this.ReverseHorizontal(t),o=o.Next}else{for(;o.Top.Y==o.Prev.Bot.Y&&o.Prev.OutIdx!=L.ClipperBase.Skip;)o=o.Prev;if(o.Dx==L.ClipperBase.horizontal&&o.Prev.OutIdx!=L.ClipperBase.Skip){for(i=o;i.Next.Dx==L.ClipperBase.horizontal;)i=i.Next;i.Next.Top.X==o.Prev.Top.X?e||(o=i.Next):i.Next.Top.X>o.Prev.Top.X&&(o=i.Next)}for(;t!=o;)t.NextInLML=t.Prev,t.Dx==L.ClipperBase.horizontal&&t!=n&&t.Bot.X!=t.Next.Top.X&&this.ReverseHorizontal(t),t=t.Prev;t.Dx==L.ClipperBase.horizontal&&t!=n&&t.Bot.X!=t.Next.Top.X&&this.ReverseHorizontal(t),o=o.Prev}if(o.OutIdx==L.ClipperBase.Skip){if(t=o,e){for(;t.Top.Y==t.Next.Bot.Y;)t=t.Next;for(;t!=o&&t.Dx==L.ClipperBase.horizontal;)t=t.Prev}else{for(;t.Top.Y==t.Prev.Bot.Y;)t=t.Prev;for(;t!=o&&t.Dx==L.ClipperBase.horizontal;)t=t.Next}t==o?o=e?t.Next:t.Prev:(t=e?o.Next:o.Prev,(n=new L.LocalMinima).Next=null,n.Y=t.Bot.Y,n.LeftBound=null,n.RightBound=t,n.RightBound.WindDelta=0,o=this.ProcessBound(n.RightBound,e),this.InsertLocalMinima(n))}return o}
36,L.ClipperBase.prototype.AddPath=function(t,e,i){i||e!=L.PolyType.ptClip||L.Error("AddPath: Open paths must be subject.");var n=t.length-1;if(i)for(;0<n&&L.IntPoint.op_Equality(t[n],t[0]);)--n;for(;0<n&&L.IntPoint.op_Equality(t[n],t[n-1]);)--n;if(i&&2>n||!i&&1>n)return!1;for(var o=[],r=0;r<=n;r++)o.push(new L.TEdge);var s=!0;for(o[1].Curr.X=t[1].X,o[1].Curr.Y=t[1].Y,function(){var e={Value:this.m_UseFullRange},i=this.RangeTest(t[0],e);return this.m_UseFullRange=e.Value,i}.call(this),function(){var e={Value:this.m_UseFullRange},i=this.RangeTest(t[n],e);return this.m_UseFullRange=e.Value,i}.call(this),this.InitEdge(o[0],o[1],o[n],t[0]),this.InitEdge(o[n],o[0],o[n-1],t[n]),r=n-1;1<=r;--r)(function(){var e={Value:this.m_UseFullRange},i=this.RangeTest(t[r],e);return this.m_UseFullRange=e.Value,i}).call(this),this.InitEdge(o[r],o[r+1],o[r-1],t[r]);for(var l=o[0],p=l,u=l;;)if(L.IntPoint.op_Equality(p.Curr,p.Next.Curr)){if(p==p.Next)break;p==l&&(l=p.Next),u=p=this.RemoveEdge(p)}else{if(p.Prev==p.Next)break;if(i&&L.ClipperBase.SlopesEqual(p.Prev.Curr,p.Curr,p.Next.Curr,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(p.Prev.Curr,p.Curr,p.Next.Curr))){p==l&&(l=p.Next),u=p=(p=this.RemoveEdge(p)).Prev;continue}if((p=p.Next)==u)break}if(!i&&p==p.Next||i&&p.Prev==p.Next)return!1;i||(this.m_HasOpenPaths=!0,l.Prev.OutIdx=L.ClipperBase.Skip),p=l;do{this.InitEdge2(p,e),p=p.Next,s&&p.Curr.Y!=l.Curr.Y&&(s=!1)}while(p!=l);if(s){if(i)return!1;for(p.Prev.OutIdx=L.ClipperBase.Skip,p.Prev.Bot.X<p.Prev.Top.X&&this.ReverseHorizontal(p.Prev),(e=new L.LocalMinima).Next=null,e.Y=p.Bot.Y,e.LeftBound=null,e.RightBound=p,e.RightBound.Side=L.EdgeSide.esRight,e.RightBound.WindDelta=0;p.Next.OutIdx!=L.ClipperBase.Skip;)p.NextInLML=p.Next,p.Bot.X!=p.Prev.Top.X&&this.ReverseHorizontal(p),p=p.Next;return this.InsertLocalMinima(e),this.m_edges.push(o),!0}for(this.m_edges.push(o),s=null;(p=this.FindNextLocMin(p))!=s;)null==s&&(s=p),(e=new L.LocalMinima).Next=null,e.Y=p.Bot.Y,p.Dx<p.Prev.Dx?(e.LeftBound=p.Prev,e.RightBound=p,o=!1):(e.LeftBound=p,e.RightBound=p.Prev,o=!0),e.LeftBound.Side=L.EdgeSide.esLeft,e.RightBound.Side=L.EdgeSide.esRight,e.LeftBound.WindDelta=i?e.LeftBound.Next==e.RightBound?-1:1:0,e.RightBound.WindDelta=-e.LeftBound.WindDelta,p=this.ProcessBound(e.LeftBound,o),l=this.ProcessBound(e.RightBound,!o),e.LeftBound.OutIdx==L.ClipperBase.Skip?e.LeftBound=null:e.RightBound.OutIdx==L.ClipperBase.Skip&&(e.RightBound=null),this.InsertLocalMinima(e),o||(p=l);return!0},L.ClipperBase.prototype.AddPaths=function(t,e,i){for(var n=!1,o=0,r=t.length;o<r;++o)this.AddPath(t[o],e,i)&&(n=!0);return n},L.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(t,e,i){return!(L.IntPoint.op_Equality(t,i)||L.IntPoint.op_Equality(t,e)||L.IntPoint.op_Equality(i,e))&&(t.X!=i.X?e.X>t.X==e.X<i.X:e.Y>t.Y==e.Y<i.Y)}, 37L.ClipperBase.prototype.RemoveEdge=function(t){t.Prev.Next=t.Next,t.Next.Prev=t.Prev;var e=t.Next;return t.Prev=null,e},L.ClipperBase.prototype.SetDx=function(t){t.Delta.X=t.Top.X-t.Bot.X,t.Delta.Y=t.Top.Y-t.Bot.Y,t.Dx=0===t.Delta.Y?L.ClipperBase.horizontal:t.Delta.X/t.Delta.Y},L.ClipperBase.prototype.InsertLocalMinima=function(t){if(null===this.m_MinimaList)this.m_MinimaList=t;else if(t.Y>=this.m_MinimaList.Y)t.Next=this.m_MinimaList,this.m_MinimaList=t;else{for(var e=this.m_MinimaList;null!==e.Next&&t.Y<e.Next.Y;)e=e.Next;t.Next=e.Next,e.Next=t}},L.ClipperBase.prototype.PopLocalMinima=function(){null!==this.m_CurrentLM&&(this.m_CurrentLM=this.m_CurrentLM.Next)},L.ClipperBase.prototype.ReverseHorizontal=function(t){var e=t.Top.X;t.Top.X=t.Bot.X,t.Bot.X=e},L.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,null!=this.m_CurrentLM)for(var t=this.m_MinimaList;null!=t;){var e=t.LeftBound;null!=e&&(e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.Side=L.EdgeSide.esLeft,e.OutIdx=L.ClipperBase.Unassigned),null!=(e=t.RightBound)&&(e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.Side=L.EdgeSide.esRight,e.OutIdx=L.ClipperBase.Unassigned),t=t.Next}},L.Clipper=function(t){void 0===t&&(t=0),this.m_PolyOuts=null,this.m_ClipType=L.ClipType.ctIntersection,this.m_IntersectNodeComparer=this.m_IntersectList=this.m_SortedEdges=this.m_ActiveEdges=this.m_Scanbeam=null,this.m_ExecuteLocked=!1,this.m_SubjFillType=this.m_ClipFillType=L.PolyFillType.pftEvenOdd,this.m_GhostJoins=this.m_Joins=null,this.Str
37ictlySimple=this.ReverseSolution=this.m_UsingPolyTree=!1,L.ClipperBase.call(this),this.m_SortedEdges=this.m_ActiveEdges=this.m_Scanbeam=null,this.m_IntersectList=[],this.m_IntersectNodeComparer=L.MyIntersectNodeSort.Compare,this.m_UsingPolyTree=this.m_ExecuteLocked=!1,this.m_PolyOuts=[],this.m_Joins=[],this.m_GhostJoins=[],this.ReverseSolution=0!=(1&t),this.StrictlySimple=0!=(2&t),this.PreserveCollinear=0!=(4&t)},L.Clipper.ioReverseSolution=1,L.Clipper.ioStrictlySimple=2,L.Clipper.ioPreserveCollinear=4,L.Clipper.prototype.Clear=function(){0!==this.m_edges.length&&(this.DisposeAllPolyPts(),L.ClipperBase.prototype.Clear.call(this))},L.Clipper.prototype.DisposeScanbeamList=function(){for(;null!==this.m_Scanbeam;){var t=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=t}},L.Clipper.prototype.Reset=function(){L.ClipperBase.prototype.Reset.call(this),this.m_SortedEdges=this.m_ActiveEdges=this.m_Scanbeam=null;for(var t=this.m_MinimaList;null!==t;)this.InsertScanbeam(t.Y),t=t.Next},L.Clipper.prototype.InsertScanbeam=function(t){if(null===this.m_Scanbeam)this.m_Scanbeam=new L.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=t;else if(t>this.m_Scanbeam.Y){var e=new L.Scanbeam;e.Y=t,e.Next=this.m_Scanbeam,this.m_Scanbeam=e}else{for(var i=this.m_Scanbeam;null!==i.Next&&t<=i.Next.Y;)i=i.Next;t!=i.Y&&((e=new L.Scanbeam).Y=t,e.Next=i.Next,i.Next=e)}},L.Clipper.prototype.Execute=function(){var t=(o=arguments).length,e=o[1]instanceof L.PolyTree;if(4==t&&!e){if(t=o[0],n=o[1],e=o[2],o=o[3],this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&L.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,L.Clear(n),this.m_SubjFillType=e,this.m_ClipFillType=
37o,this.m_ClipType=t,this.m_UsingPolyTree=!1;try{var i=this.ExecuteInternal();i&&this.BuildResult(n)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return i}if(4==t&&e){t=o[0];var n=o[1],o=(e=o[2],o[3]);if(this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=e,this.m_ClipFillType=o,this.m_ClipType=t,this.m_UsingPolyTree=!0;try{(i=this.ExecuteInternal())&&this.BuildResult2(n)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return i}if(2==t&&!e||2==t&&e)return t=o[0],n=o[1],this.Execute(t,n,L.PolyFillType.pftEvenOdd,L.PolyFillType.pftEvenOdd)},L.Clipper.prototype.FixHoleLinkage=function(t){if(null!==t.FirstLeft&&(t.IsHole==t.FirstLeft.IsHole||null===t.FirstLeft.Pts)){for(var e=t.FirstLeft;null!==e&&(e.IsHole==t.IsHole||null===e.Pts);)e=e.FirstLeft;t.FirstLeft=e}},L.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),null===this.m_CurrentLM)return!1;var t=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(t),L.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),null===this.m_Scanbeam)break;var e=this.PopScanbeam();if(!this.ProcessIntersections(t,e))return!1;this.ProcessEdgesAtTopOfScanbeam(e),t=e}while(null!==this.m_Scanbeam||null!==this.m_CurrentLM);t=0;for(var i=this.m_PolyOuts.length;t<i;t++){var n=this.m_PolyOuts[t];null===n.Pts||n.IsOpen||(n.IsHole^this.ReverseSolution)==0<this.Area(n)&&this.ReversePolyPtLinks(n.Pts)}for(this.JoinCommonEdges(),t=0,i=this.m_PolyOuts.length;t<i;t++)null===(n=this.m_PolyOuts[t]).Pts||n.IsOpen||this.FixupOutPolygon(n);return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{L.Clear(this.m_Joins),L.Clear(this.m_GhostJoins)}},L.Clipper.prototype.PopScanbeam=function(){var t=this.m_Scanbeam.Y;return this.m_Scanbeam=this.m_Scanbeam.Next,t},L.Clipper.prototype.DisposeAllPolyPts=function(){for(var t=0,e=this.m_PolyOuts.length;t<e;++t)this.DisposeOutRec(t);L.Clear(this.m_PolyOuts)},L.Clipper.prototype.DisposeOutRec=function(t){var e=this.m_PolyOuts[t];null!==e.Pts&&this.DisposeOutPts(e.Pts),this.m_PolyOuts[t]=null},L.Clipper.prototype.DisposeOutPts=function(t){if(null!==t)for(t.Prev.Next=null;null!==t;)t=t.Next},L.Clipper.prototype.AddJoin=function(t,e,i){var n=new L.Join;n.OutPt1=t,n.OutPt2=e,n.OffPt.X=i.X,n.OffPt.Y=i.Y,this.m_Joins.push(n)},L.Clipper.prototype.AddGhostJoin=function(t,e){var i=new L.Join;i.OutPt1=t,i.OffPt.X=e.X,i.OffPt.Y=e.Y,this.m_GhostJoins.push(i)},L.Clipper.prototype.InsertLocalMinimaIntoAEL=function(t){for(;null!==this.m_CurrentLM&&this.m_CurrentLM.Y==t;){var e=this.m_CurrentLM.LeftBound,i=this.m_CurrentLM.RightBound;this.PopLocalMinima();var n=null;if(null===e?(this.InsertEdgeIntoAEL(i,null),this.SetWindingCount(i),this.IsContributing(i)&&(n=this.AddOutPt(i,i.Bot))):(null==i?(this.InsertEdgeIntoAEL(e,null),this.SetWindingCount(e),this.IsContributing(e)&&(n=this.AddOutPt(e,e.Bot))):(this.InsertEdgeIntoAEL(e,null),this.InsertEdgeIntoAEL(i,e),this.SetWindingCount(e),i.WindCnt=e.WindCnt,i.WindCnt2=e.WindCnt2,this.IsContributing(e)&&(n=this.AddLocalMinPoly(e,i,e.Bot))),this.InsertScanbeam(e.Top.Y)),null!=i&&(L.ClipperBase.IsHorizontal(i)?this.AddEdgeToSEL(i):this.InsertScanbeam(i.Top.Y)),null!=e&&null!=i){if(null!==n&&L.ClipperBase.IsHorizontal(i)&&0<this.m_GhostJoins.length&&0!==i.WindDelta)for(var o=0,r=this.m_GhostJoins.length;o<r;o++){var s=this.m_GhostJoins[o];this.HorzSegmentsOverlap(s.OutPt1.Pt,s.OffPt,i.Bot,i.Top)&&this.AddJoin(s.OutPt1,n,s.OffPt)}if(0<=e.OutIdx&&null!==e.PrevInAEL&&e.PrevInAEL.Curr.X==e.Bot.X&&0<=e.PrevInAEL.OutIdx&&L.ClipperBase.SlopesEqual(e.PrevInAEL,e,this.m_UseFullRange)&&0!==e.WindDelta&&0!==e.PrevInAEL.WindDelta&&(o=this.AddOutPt(e.PrevInAEL,e.Bot),this.AddJoin(n,o,e.Top)),e.NextInAEL!=i&&(0<=i.OutIdx&&0<=i.PrevInAEL.OutIdx&&L.ClipperBase.SlopesEqual(i.PrevInAEL,i,this.m_UseFullRange)&&0!==i.WindDelta&&0!==i.PrevInAEL.WindDelta&&(o=this.AddOutPt(i.PrevInAEL,i.Bot),this.AddJoin(n,o,i.Top)),null!==(n=e.NextInAEL)))for(;n!=i;)this.IntersectEdges(i,n,e.Curr,!1),n=n.NextInAEL}}},L.Clipper.prototype.InsertEdgeIntoAEL=function(t,e){if(null===this.m_ActiveEdges)t.PrevInAEL=null,t.NextInAEL=null,this.m_ActiveEdges=t;else if(null===e&&this.E2InsertsBeforeE1(this.m_ActiveEdges,t))t.PrevInAEL=null,t.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges=this.m_ActiveEdges.PrevInAEL=t;else{for(null===e&&(e=this.m_ActiveEdges);null!==e.NextInAEL&&!this.E2InsertsBeforeE1(e.NextInAEL,t);)e=e.NextInAEL;t.NextInAEL=e.NextInAEL,null!==e.NextInAEL&&(e.NextInAEL.PrevInAEL=t),t.PrevInAEL=e,e.NextInAEL=t}},L.Clipper.prototype.E2InsertsBeforeE1=function(t,e){return e.Curr.X==t.Curr.X?e.Top.Y>t.Top.Y?e.Top.X<L.Clipper.TopX(t,e.Top.Y):t.Top.X>L.Clipper.TopX(e,t.Top.Y):e.Curr.X<t.Curr.X}
37,L.Clipper.prototype.IsEvenOddFillType=function(t){return t.PolyTyp==L.PolyType.ptSubject?this.m_SubjFillType==L.PolyFillType.pftEvenOdd:this.m_ClipFillType==L.PolyFillType.pftEvenOdd},L.Clipper.prototype.IsEvenOddAltFillType=function(t){return t.PolyTyp==L.PolyType.ptSubject?this.m_ClipFillType==L.PolyFillType.pftEvenOdd:this.m_SubjFillType==L.PolyFillType.pftEvenOdd},L.Clipper.prototype.IsContributing=function(t){var e,i;switch(t.PolyTyp==L.PolyType.ptSubject?(e=this.m_SubjFillType,i=this.m_ClipFillType):(e=this.m_ClipFillType,i=this.m_SubjFillType),e){case L.PolyFillType.pftEvenOdd:if(0===t.WindDelta&&1!=t.WindCnt)return!1;break;case L.PolyFillType.pftNonZero:if(1!=Math.abs(t.WindCnt))return!1;break;case L.PolyFillType.pftPositive:if(1!=t.WindCnt)return!1;break;default:if(-1!=t.WindCnt)return!1}switch(this.m_ClipType){case L.ClipType.ctIntersection:switch(i){case L.PolyFillType.pftEvenOdd:case L.PolyFillType.pftNonZero:return 0!==t.WindCnt2;case L.PolyFillType.pftPositive:return 0<t.WindCnt2;default:return 0>t.WindCnt2}case L.ClipType.ctUnion:switch(i){case L.PolyFillType.pftEvenOdd:case L.PolyFillType.pftNonZero:return 0===t.WindCnt2;case L.PolyFillType.pftPositive:return 0>=t.WindCnt2;default:return 0<=t.WindCnt2}case L.ClipType.ctDifference:if(t.PolyTyp==L.PolyType.ptSubject)switch(i){case L.PolyFillType.pftEvenOdd:case L.PolyFillType.pftNonZero:return 0===t.WindCnt2;case L.PolyFillType.pftPositive:return 0>=t.WindCnt2;default:return 0<=t.WindCnt2}else switch(i){case L.PolyFillType.pftEvenOdd:case L.PolyFillType.pftNonZero:return 0!==t.WindCnt2;case L.PolyFillType.pftPositive:return 0<t.WindCnt2;default:return 0>t.WindCnt2}case L.ClipType.ctXor:if(0===t.WindDelta)switch(i){case L.PolyFillType.pftEvenOdd:case L.PolyFillType.pftNonZero:return 0===t.WindCnt2;case L.PolyFillType.pftPositive:return 0>=t.WindCnt2;default:return 0<=t.WindCnt2}}return!0},L.Clipper.prototype.SetWindingCount=function(t){for(var e=t.PrevInAEL;null!==e&&(e.PolyTyp!=t.PolyTyp||0===e.WindDelta);)e=e.PrevInAEL;if(null===e)t.WindCnt=0===t.WindDelta?1:t.WindDelta,t.WindCnt2=0,e=this.m_ActiveEdges;else{if(0===t.WindDelta&&this.m_ClipType!=L.ClipType.ctUnion)t.WindCnt=1;else if(this.IsEvenOddFillType(t))if(0===t.WindDelta){for(var i=!0,n=e.PrevInAEL;null!==n;)n.PolyTyp==e.PolyTyp&&0!==n.WindDelta&&(i=!i),n=n.PrevInAEL;t.WindCnt=i?0:1}else t.WindCnt=t.WindDelta;else 0>e.WindCnt*e.WindDelta?1<Math.abs(e.WindCnt)?t.WindCnt=0>e.WindDelta*t.WindDelta?e.WindCnt:e.WindCnt+t.WindDelta:t.WindCnt=0===t.WindDelta?1:t.WindDelta:t.WindCnt=0===t.WindDelta?0>e.WindCnt?e.WindCnt-1:e.WindCnt+1:0>e.WindDelta*t.WindDelta?e.WindCnt:e.WindCnt+t.WindDelta;t.WindCnt2=e.WindCnt2,e=e.NextInAEL}if(this.IsEvenOddAltFillType(t))for(;e!=t;)0!==e.WindDelta&&(t.WindCnt2=0===t.WindCnt2?1:0),e=e.NextInAEL;else for(;e!=t;)t.WindCnt2+=e.WindDelta,e=e.NextInAEL},L.Clipper.prototype.AddEdgeToSEL=function(t){null===this.m_SortedEdges?(this.m_SortedEdges=t,t.PrevInSEL=null,t.NextInSEL=null):(t.NextInSEL=this.m_SortedEdges,t.PrevInSEL=null,this.m_SortedEdges=this.m_SortedEdges.PrevInSEL=t)},L.Clipper.prototype.CopyAELToSEL=function(){var t=this.m_ActiveEdges;for(this.m_SortedEdges=t;null!==t;)t.PrevInSEL=t.PrevInAEL,t=t.NextInSEL=t.NextInAEL},L.Clipper.prototype.SwapPositionsInAEL=function(t,e){if(t.NextInAEL!=t.PrevInAEL&&e.NextInAEL!=e.PrevInAEL){if(t.NextInAEL==e){var i=e.NextInAEL;null!==i&&(i.PrevInAEL=t);var n=t.PrevInAEL;null!==n&&(n.NextInAEL=e),e.PrevInAEL=n,e.NextInAEL=t,t.PrevInAEL=e,t.NextInAEL=i}else e.NextInAEL==t?(null!==(i=t.NextInAEL)&&(i.PrevInAEL=e),null!==(n=e.PrevInAEL)&&(n.NextInAEL=t),t.PrevInAEL=n,t.NextInAEL=e,e.PrevInAEL=t,e.NextInAEL=i):(i=t.NextInAEL,n=t.PrevInAEL,t.NextInAEL=e.NextInAEL,null!==t.NextInAEL&&(t.NextInAEL.PrevInAEL=t),t.PrevInAEL=e.PrevInAEL,null!==t.PrevInAEL&&(t.PrevInAEL.NextInAEL=t),e.NextInAEL=i,null!==e.NextInAEL&&(e.NextInAEL.PrevInAEL=e),e.PrevInAEL=n,null!==e.PrevInAEL&&(e.PrevInAEL.NextInAEL=e));null===t.PrevInAEL?this.m_ActiveEdges=t:null===e.PrevInAEL&&(this.m_ActiveEdges=e)}},L.Clipper.prototype.SwapPositionsInSEL=function(t,e){if(!(null===t.NextInSEL&&null===t.PrevInSEL||null===e.NextInSEL&&null===e.PrevInSEL)){if(t.NextInSEL==e){var i=e.NextInSEL;null!==i&&(i.PrevInSEL=t);var n=t.PrevInSEL;null!==n&&(n.NextInSEL=e),e.PrevInSEL=n,e.NextInSEL=t,t.PrevInSEL=e,t.NextInSEL=i}else e.NextInSEL==t?(null!==(i=t.NextInSEL)&&(i.PrevInSEL=e),null!==(n=e.PrevInSEL)&&(n.NextInSEL=t),t.PrevInSEL=n,t.NextInSEL=e,e.PrevInSEL=t,e.NextInSEL=i):(i=t.NextInSEL,n=t.PrevInSEL,t.NextInSEL=e.NextInSEL,null!==t.NextInSEL&&(t.NextInSEL.PrevInSEL=t),t.PrevInSEL=e.PrevInSEL,null!==t.PrevInSEL&&(t.PrevInSEL.NextInSEL=t),e.NextInSEL=i,null!==e.NextInSEL&&(e.NextInSEL.PrevInSEL=e),e.PrevInSEL=n,null!==e.PrevInSEL&&(e.PrevInSEL.NextInSEL=e));null===t.PrevInSEL?this.m_SortedEdges=t:null===e.PrevInSEL&&(this.m_SortedEdges=e)}}
37,L.Clipper.prototype.AddLocalMaxPoly=function(t,e,i){this.AddOutPt(t,i),0==e.WindDelta&&this.AddOutPt(e,i),t.OutIdx==e.OutIdx?(t.OutIdx=-1,e.OutIdx=-1):t.OutIdx<e.OutIdx?this.AppendPolygon(t,e):this.AppendPolygon(e,t)},L.Clipper.prototype.AddLocalMinPoly=function(t,e,i){var n,o;return L.ClipperBase.IsHorizontal(e)||t.Dx>e.Dx?(n=this.AddOutPt(t,i),e.OutIdx=t.OutIdx,t.Side=L.EdgeSide.esLeft,e.Side=L.EdgeSide.esRight,t=(o=t).PrevInAEL==e?e.PrevInAEL:o.PrevInAEL):(n=this.AddOutPt(e,i),t.OutIdx=e.OutIdx,t.Side=L.EdgeSide.esRight,e.Side=L.EdgeSide.esLeft,t=(o=e).PrevInAEL==t?t.PrevInAEL:o.PrevInAEL),null!==t&&0<=t.OutIdx&&L.Clipper.TopX(t,i.Y)==L.Clipper.TopX(o,i.Y)&&L.ClipperBase.SlopesEqual(o,t,this.m_UseFullRange)&&0!==o.WindDelta&&0!==t.WindDelta&&(i=this.AddOutPt(t,i),this.AddJoin(n,i,o.Top)),n},L.Clipper.prototype.CreateOutRec=function(){var t=new L.OutRec;return t.Idx=-1,t.IsHole=!1,t.IsOpen=!1,t.FirstLeft=null,t.Pts=null,t.BottomPt=null,t.PolyNode=null,this.m_PolyOuts.push(t),t.Idx=this.m_PolyOuts.length-1,t},L.Clipper.prototype.AddOutPt=function(t,e){var i=t.Side==L.EdgeSide.esLeft;if(0>t.OutIdx){(o=this.CreateOutRec()).IsOpen=0===t.WindDelta;var n=new L.OutPt;o.Pts=n,n.Idx=o.Idx,n.Pt.X=e.X,n.Pt.Y=e.Y,n.Next=n,n.Prev=n,o.IsOpen||this.SetHoleState(t,o),t.OutIdx=o.Idx}else{var o,r=(o=this.m_PolyOuts[t.OutIdx]).Pts;if(i&&L.IntPoint.op_Equality(e,r.Pt))return r;if(!i&&L.IntPoint.op_Equality(e,r.Prev.Pt))return r.Prev;(n=new L.OutPt).Idx=o.Idx,n.Pt.X=e.X,n.Pt.Y=e.Y,n.Next=r,n.Prev=r.Prev,n.Prev.Next=n,r.Prev=n,i&&(o.Pts=n)}return n},L.Clipper.prototype.SwapPoints=function(t,e){var i=new L.IntPoint(t.Value);t.Value.X=e.Value.X,t.Value.Y=e.Value.Y,e.Value.X=i.X,e.Value.Y=i.Y},L.Clipper.prototype.HorzSegmentsOverlap=function(t,e,i,n){return t.X>i.X==t.X<n.X||(e.X>i.X==e.X<n.X||(i.X>t.X==i.X<e.X||(n.X>t.X==n.X<e.X||(t.X==i.X&&e.X==n.X||t.X==n.X&&e.X==i.X))))},L.Clipper.prototype.InsertPolyPtBetween=function(t,e,i){var n=new L.OutPt;return n.Pt.X=i.X,n.Pt.Y=i.Y,e==t.Next?(t.Next=n,e.Prev=n,n.Next=e,n.Prev=t):(e.Next=n,t.Prev=n,n.Next=t,n.Prev=e),n},L.Clipper.prototype.SetHoleState=function(t,e){for(var i=!1,n=t.PrevInAEL;null!==n;)0<=n.OutIdx&&0!=n.WindDelta&&(i=!i,null===e.FirstLeft&&(e.FirstLeft=this.m_PolyOuts[n.OutIdx])),n=n.PrevInAEL;i&&(e.IsHole=!0)},L.Clipper.prototype.GetDx=function(t,e){return t.Y==e.Y?L.ClipperBase.horizontal:(e.X-t.X)/(e.Y-t.Y)},L.Clipper.prototype.FirstIsBottomPt=function(t,e){for(var i=t.Prev;L.IntPoint.op_Equality(i.Pt,t.Pt)&&i!=t;)i=i.Prev;var n=Math.abs(this.GetDx(t.Pt,i.Pt));for(i=t.Next;L.IntPoint.op_Equality(i.Pt,t.Pt)&&i!=t;)i=i.Next;var o=Math.abs(this.GetDx(t.Pt,i.Pt));for(i=e.Prev;L.IntPoint.op_Equality(i.Pt,e.Pt)&&i!=e;)i=i.Prev;var r=Math.abs(this.GetDx(e.Pt,i.Pt));for(i=e.Next;L.IntPoint.op_Equality(i.Pt,e.Pt)&&i!=e;)i=i.Next;return i=Math.abs(this.GetDx(e.Pt,i.Pt)),n>=r&&n>=i||o>=r&&o>=i},L.Clipper.prototype.GetBottomPt=function(t){for(var e=null,i=t.Next;i!=t;)i.Pt.Y>t.Pt.Y?(t=i,e=null):i.Pt.Y==t.Pt.Y&&i.Pt.X<=t.Pt.X&&(i.Pt.X<t.Pt.X?(e=null,t=i):i.Next!=t&&i.Prev!=t&&(e=i)),i=i.Next;if(null!==e)for(;e!=i;)for(this.FirstIsBottomPt(i,e)||(t=e),e=e.Next;L.IntPoint.op_Inequality(e.Pt,t.Pt);)e=e.Next;return t},L.Clipper.prototype.GetLowermostRec=function(t,e){null===t.BottomPt&&(t.BottomPt=this.GetBottomPt(t.Pts)),null===e.BottomPt&&(e.BottomPt=this.GetBottomPt(e.Pts));var i=t.BottomPt,n=e.BottomPt;return i.Pt.Y>n.Pt.Y?t:i.Pt.Y<n.Pt.Y?e:i.Pt.X<n.Pt.X?t:i.Pt.X>n.Pt.X?e:i.Next==i?e:n.Next==n?t:this.FirstIsBottomPt(i,n)?t:e},L.Clipper.prototype.Param1RightOfParam2=function(t,e){do{if((t=t.FirstLeft)==e)return!0}while(null!==t);return!1},L.Clipper.prototype.GetOutRec=function(t){for(t=this.m_PolyOuts[t];t!=this.m_PolyOuts[t.Idx];)t=this.m_PolyOuts[t.Idx];return t},L.Clipper.prototype.AppendPolygon=function(t,e){var i,n=this.m_PolyOuts[t.OutIdx],o=this.m_PolyOuts[e.OutIdx];i=this.Param1RightOfParam2(n,o)?o:this.Param1RightOfParam2(o,n)?n:this.GetLowermostRec(n,o);var r=n.Pts,s=r.Prev,l=o.Pts,p=l.Prev;for(t.Side==L.EdgeSide.esLeft?(e.Side==L.EdgeSide.esLeft?(this.ReversePolyPtLinks(l),l.Next=r,r.Prev=l,s.Next=p,p.Prev=s,n.Pts=p):(p.Next=r,r.Prev=p,l.Prev=s,s.Next=l,n.Pts=l),r=L.EdgeSide.esLeft):(e.Side==L.EdgeSide.esRight?(this.ReversePolyPtLinks(l),s.Next=p,p.Prev=s,l.Next=r,r.Prev=l):(s.Next=l,l.Prev=s,r.Prev=p,p.Next=r),r=L.EdgeSide.esRight),n.BottomPt=null,i==o&&(o.FirstLeft!=n&&(n.FirstLeft=o.FirstLeft),n.IsHole=o.IsHole),o.Pts=null,o.BottomPt=null,o.FirstLeft=n,i=t.OutIdx,s=e.OutIdx,t.OutIdx=-1,e.OutIdx=-1,l=this.m_ActiveEdges;null!==l;){if(l.OutIdx==s){l.OutIdx=i,l.Side=r;break}l=l.NextInAEL}o.Idx=n.Idx},L.Clipper.prototype.ReversePolyPtLinks=function(t){if(null!==t){var e,i;e=t;do{i=e.Next,e.Next=e.Prev,e=e.Prev=i}while(e!=t)}},L.Clipper.SwapSides=function(t,e){var i=t.Side;t.Side=e.Side,e.Side=i},L.Clipper.SwapPolyIndexes=function(t,e){var i=t.OutIdx;t.OutIdx=e.OutIdx,e.OutIdx=i}
37,L.Clipper.prototype.IntersectEdges=function(t,e,i,n){var o=!n&&null===t.NextInLML&&t.Top.X==i.X&&t.Top.Y==i.Y;n=!n&&null===e.NextInLML&&e.Top.X==i.X&&e.Top.Y==i.Y;var r=0<=t.OutIdx,s=0<=e.OutIdx;if(0===t.WindDelta||0===e.WindDelta)0===t.WindDelta&&0===e.WindDelta?(o||n)&&r&&s&&this.AddLocalMaxPoly(t,e,i):t.PolyTyp==e.PolyTyp&&t.WindDelta!=e.WindDelta&&this.m_ClipType==L.ClipType.ctUnion?0===t.WindDelta?s&&(this.AddOutPt(t,i),r&&(t.OutIdx=-1)):r&&(this.AddOutPt(e,i),s&&(e.OutIdx=-1)):t.PolyTyp!=e.PolyTyp&&(0!==t.WindDelta||1!=Math.abs(e.WindCnt)||this.m_ClipType==L.ClipType.ctUnion&&0!==e.WindCnt2?0!==e.WindDelta||1!=Math.abs(t.WindCnt)||this.m_ClipType==L.ClipType.ctUnion&&0!==t.WindCnt2||(this.AddOutPt(e,i),s&&(e.OutIdx=-1)):(this.AddOutPt(t,i),r&&(t.OutIdx=-1))),o&&(0>t.OutIdx?this.DeleteFromAEL(t):L.Error("Error intersecting polylines")),n&&(0>e.OutIdx?this.DeleteFromAEL(e):L.Error("Error intersecting polylines"));else{if(t.PolyTyp==e.PolyTyp)if(this.IsEvenOddFillType(t)){var l=t.WindCnt;t.WindCnt=e.WindCnt,e.WindCnt=l}else t.WindCnt=0===t.WindCnt+e.WindDelta?-t.WindCnt:t.WindCnt+e.WindDelta,e.WindCnt=0==e.WindCnt-t.WindDelta?-e.WindCnt:e.WindCnt-t.WindDelta;else this.IsEvenOddFillType(e)?t.WindCnt2=0===t.WindCnt2?1:0:t.WindCnt2+=e.WindDelta,this.IsEvenOddFillType(t)?e.WindCnt2=0===e.WindCnt2?1:0:e.WindCnt2-=t.WindDelta;var p,u,h;switch(t.PolyTyp==L.PolyType.ptSubject?(p=this.m_SubjFillType,h=this.m_ClipFillType):(p=this.m_ClipFillType,h=this.m_SubjFillType),e.PolyTyp==L.PolyType.ptSubject?(u=this.m_SubjFillType,l=this.m_ClipFillType):(u=this.m_ClipFillType,l=this.m_SubjFillType),p){case L.PolyFillType.pftPositive:p=t.WindCnt;break;case L.PolyFillType.pftNegative:p=-t.WindCnt;break;default:p=Math.abs(t.WindCnt)}switch(u){case L.PolyFillType.pftPositive:u=e.WindCnt;break;case L.PolyFillType.pftNegative:u=-e.WindCnt;break;default:u=Math.abs(e.WindCnt)}if(r&&s)o||n||0!==p&&1!=p||0!==u&&1!=u||t.PolyTyp!=e.PolyTyp&&this.m_ClipType!=L.ClipType.ctXor?this.AddLocalMaxPoly(t,e,i):(this.AddOutPt(t,i),this.AddOutPt(e,i),L.Clipper.SwapSides(t,e),L.Clipper.SwapPolyIndexes(t,e));else if(r)0!==u&&1!=u||(this.AddOutPt(t,i),L.Clipper.SwapSides(t,e),L.Clipper.SwapPolyIndexes(t,e));else if(s)0!==p&&1!=p||(this.AddOutPt(e,i),L.Clipper.SwapSides(t,e),L.Clipper.SwapPolyIndexes(t,e));else if(!(0!==p&&1!=p||0!==u&&1!=u||o||n)){switch(h){case L.PolyFillType.pftPositive:r=t.WindCnt2;break;case L.PolyFillType.pftNegative:r=-t.WindCnt2;break;default:r=Math.abs(t.WindCnt2)}switch(l){case L.PolyFillType.pftPositive:s=e.WindCnt2;break;case L.PolyFillType.pftNegative:s=-e.WindCnt2;break;default:s=Math.abs(e.WindCnt2)}if(t.PolyTyp!=e.PolyTyp)this.AddLocalMinPoly(t,e,i);else if(1==p&&1==u)switch(this.m_ClipType){case L.ClipType.ctIntersection:0<r&&0<s&&this.AddLocalMinPoly(t,e,i);break;case L.ClipType.ctUnion:0>=r&&0>=s&&this.AddLocalMinPoly(t,e,i);break;case L.ClipType.ctDifference:(t.PolyTyp==L.PolyType.ptClip&&0<r&&0<s||t.PolyTyp==L.PolyType.ptSubject&&0>=r&&0>=s)&&this.AddLocalMinPoly(t,e,i);break;case L.ClipType.ctXor:this.AddLocalMinPoly(t,e,i)}else L.Clipper.SwapSides(t,e)}o!=n&&(o&&0<=t.OutIdx||n&&0<=e.OutIdx)&&(L.Clipper.SwapSides(t,e),L.Clipper.SwapPolyIndexes(t,e)),o&&this.DeleteFromAEL(t),n&&this.DeleteFromAEL(e)}},L.Clipper.prototype.DeleteFromAEL=function(t){var e=t.PrevInAEL,i=t.NextInAEL;null===e&&null===i&&t!=this.m_ActiveEdges||(null!==e?e.NextInAEL=i:this.m_ActiveEdges=i,null!==i&&(i.PrevInAEL=e),t.NextInAEL=null,t.PrevInAEL=null)},L.Clipper.prototype.DeleteFromSEL=function(t){var e=t.PrevInSEL,i=t.NextInSEL;null===e&&null===i&&t!=this.m_SortedEdges||(null!==e?e.NextInSEL=i:this.m_SortedEdges=i,null!==i&&(i.PrevInSEL=e),t.NextInSEL=null,t.PrevInSEL=null)},L.Clipper.prototype.UpdateEdgeIntoAEL=function(t){null===t.Value.NextInLML&&L.Error("UpdateEdgeIntoAEL: invalid call");var e=t.Value.PrevInAEL,i=t.Value.NextInAEL;t.Value.NextInLML.OutIdx=t.Value.OutIdx,null!==e?e.NextInAEL=t.Value.NextInLML:this.m_ActiveEdges=t.Value.NextInLML,null!==i&&(i.PrevInAEL=t.Value.NextInLML),t.Value.NextInLML.Side=t.Value.Side,t.Value.NextInLML.WindDelta=t.Value.WindDelta,t.Value.NextInLML.WindCnt=t.Value.WindCnt,t.Value.NextInLML.WindCnt2=t.Value.WindCnt2,t.Value=t.Value.NextInLML,t.Value.Curr.X=t.Value.Bot.X,t.Value.Curr.Y=t.Value.Bot.Y,t.Value.PrevInAEL=e,t.Value.NextInAEL=i,L.ClipperBase.IsHorizontal(t.Value)||this.InsertScanbeam(t.Value.Top.Y)},L.Clipper.prototype.ProcessHorizontals=function(t){for(var e=this.m_SortedEdges;null!==e;)this.DeleteFromSEL(e),this.ProcessHorizontal(e,t),e=this.m_SortedEdges}
37,L.Clipper.prototype.GetHorzDirection=function(t,e,i,n){t.Bot.X<t.Top.X?(i.Value=t.Bot.X,n.Value=t.Top.X,e.Value=L.Direction.dLeftToRight):(i.Value=t.Top.X,n.Value=t.Bot.X,e.Value=L.Direction.dRightToLeft)},L.Clipper.prototype.PrepareHorzJoins=function(t,e){var i=this.m_PolyOuts[t.OutIdx].Pts;t.Side!=L.EdgeSide.esLeft&&(i=i.Prev),e&&(L.IntPoint.op_Equality(i.Pt,t.Top)?this.AddGhostJoin(i,t.Bot):this.AddGhostJoin(i,t.Top))},L.Clipper.prototype.ProcessHorizontal=function(t,e){var i,n,o;(function(){i={Value:i},n={Value:n},o={Value:o};var e=this.GetHorzDirection(t,i,n,o);return i=i.Value,n=n.Value,o=o.Value,e}).call(this);for(var r=t,s=null;null!==r.NextInLML&&L.ClipperBase.IsHorizontal(r.NextInLML);)r=r.NextInLML;for(null===r.NextInLML&&(s=this.GetMaximaPair(r));;){for(var l=t==r,p=this.GetNextInAEL(t,i);null!==p&&!(p.Curr.X==t.Top.X&&null!==t.NextInLML&&p.Dx<t.NextInLML.Dx);){var u=this.GetNextInAEL(p,i);if(i==L.Direction.dLeftToRight&&p.Curr.X<=o||i==L.Direction.dRightToLeft&&p.Curr.X>=n){if(0<=t.OutIdx&&0!=t.WindDelta&&this.PrepareHorzJoins(t,e),p==s&&l)return i==L.Direction.dLeftToRight?this.IntersectEdges(t,p,p.Top,!1):this.IntersectEdges(p,t,p.Top,!1),void(0<=s.OutIdx&&L.Error("ProcessHorizontal error"));if(i==L.Direction.dLeftToRight){var h=new L.IntPoint(p.Curr.X,t.Curr.Y);this.IntersectEdges(t,p,h,!0)}else h=new L.IntPoint(p.Curr.X,t.Curr.Y),this.IntersectEdges(p,t,h,!0);this.SwapPositionsInAEL(t,p)}else if(i==L.Direction.dLeftToRight&&p.Curr.X>=o||i==L.Direction.dRightToLeft&&p.Curr.X<=n)break;p=u}if(0<=t.OutIdx&&0!==t.WindDelta&&this.PrepareHorzJoins(t,e),null===t.NextInLML||!L.ClipperBase.IsHorizontal(t.NextInLML))break;(function(){t={Value:t};var e=this.UpdateEdgeIntoAEL(t);return t=t.Value,e}).call(this),0<=t.OutIdx&&this.AddOutPt(t,t.Bot),function(){i={Value:i},n={Value:n},o={Value:o};var e=this.GetHorzDirection(t,i,n,o);return i=i.Value,n=n.Value,o=o.Value,e}.call(this)}null!==t.NextInLML?0<=t.OutIdx?(r=this.AddOutPt(t,t.Top),function(){t={Value:t};var e=this.UpdateEdgeIntoAEL(t);return t=t.Value,e}.call(this),0!==t.WindDelta&&(s=t.PrevInAEL,u=t.NextInAEL,null!==s&&s.Curr.X==t.Bot.X&&s.Curr.Y==t.Bot.Y&&0!==s.WindDelta&&0<=s.OutIdx&&s.Curr.Y>s.Top.Y&&L.ClipperBase.SlopesEqual(t,s,this.m_UseFullRange)?(u=this.AddOutPt(s,t.Bot),this.AddJoin(r,u,t.Top)):null!==u&&u.Curr.X==t.Bot.X&&u.Curr.Y==t.Bot.Y&&0!==u.WindDelta&&0<=u.OutIdx&&u.Curr.Y>u.Top.Y&&L.ClipperBase.SlopesEqual(t,u,this.m_UseFullRange)&&(u=this.AddOutPt(u,t.Bot),this.AddJoin(r,u,t.Top)))):function(){t={Value:t};var e=this.UpdateEdgeIntoAEL(t);return t=t.Value,e}.call(this):null!==s?0<=s.OutIdx?(i==L.Direction.dLeftToRight?this.IntersectEdges(t,s,t.Top,!1):this.IntersectEdges(s,t,t.Top,!1),0<=s.OutIdx&&L.Error("ProcessHorizontal error")):(this.DeleteFromAEL(t),this.DeleteFromAEL(s)):(0<=t.OutIdx&&this.AddOutPt(t,t.Top),this.DeleteFromAEL(t))},L.Clipper.prototype.GetNextInAEL=function(t,e){return e==L.Direction.dLeftToRight?t.NextInAEL:t.PrevInAEL},L.Clipper.prototype.IsMinima=function(t){return null!==t&&t.Prev.NextInLML!=t&&t.Next.NextInLML!=t},L.Clipper.prototype.IsMaxima=function(t,e){return null!==t&&t.Top.Y==e&&null===t.NextInLML},L.Clipper.prototype.IsIntermediate=function(t,e){return t.Top.Y==e&&null!==t.NextInLML},L.Clipper.prototype.GetMaximaPair=function(t){var e=null;return L.IntPoint.op_Equality(t.Next.Top,t.Top)&&null===t.Next.NextInLML?e=t.Next:L.IntPoint.op_Equality(t.Prev.Top,t.Top)&&null===t.Prev.NextInLML&&(e=t.Prev),null===e||-2!=e.OutIdx&&(e.NextInAEL!=e.PrevInAEL||L.ClipperBase.IsHorizontal(e))?e:null},L.Clipper.prototype.ProcessIntersections=function(t,e){if(null==this.m_ActiveEdges)return!0;try{if(this.BuildIntersectList(t,e),0==this.m_IntersectList.length)return!0;if(1!=this.m_IntersectList.length&&!this.FixupIntersectionOrder())return!1;this.ProcessIntersectList()}catch(i){this.m_SortedEdges=null,this.m_IntersectList.length=0,L.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0},L.Clipper.prototype.BuildIntersectList=function(t,e){if(null!==this.m_ActiveEdges){var i=this.m_ActiveEdges;for(this.m_SortedEdges=i;null!==i;)i.PrevInSEL=i.PrevInAEL,i.NextInSEL=i.NextInAEL,i.Curr.X=L.Clipper.TopX(i,e),i=i.NextInAEL;for(var n=!0;n&&null!==this.m_SortedEdges;){for(n=!1,i=this.m_SortedEdges;null!==i.NextInSEL;){var o=i.NextInSEL,r=new L.IntPoint;i.Curr.X>o.Curr.X?(r={Value:r},n=this.IntersectPoint(i,o,r),r=r.Value,!n&&i.Curr.X>o.Curr.X+1&&L.Error("Intersection error"),r.Y>t&&(r.Y=t,Math.abs(i.Dx)>Math.abs(o.Dx)?r.X=L.Clipper.TopX(o,t):r.X=L.Clipper.TopX(i,t)),(n=new L.IntersectNode).Edge1=i,n.Edge2=o,n.Pt.X=r.X,n.Pt.Y=r.Y,this.m_IntersectList.push(n),this.SwapPositionsInSEL(i,o),n=!0):i=o}if(null===i.PrevInSEL)break;i.PrevInSEL.NextInSEL=null}this.m_SortedEdges=null}},L.Clipper.prototype.EdgesAdjacent=function(t){return t.Edge1.NextInSEL==t.Edge2||t.Edge1.PrevInSEL==t.Edge2},L.Clipper.IntersectNodeSort=function(t,e){return e.Pt.Y-t.Pt.Y},L.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var t=this.m_IntersectList.length,e=0;e<t;e++){if(!this.EdgesAdjacent(this.m_IntersectList[e])){for(var i=e+1;i<t&&!this.EdgesAdjacent(this.m_IntersectList[i]);)i++;
37if(i==t)return!1;var n=this.m_IntersectList[e];this.m_IntersectList[e]=this.m_IntersectList[i],this.m_IntersectList[i]=n}this.SwapPositionsInSEL(this.m_IntersectList[e].Edge1,this.m_IntersectList[e].Edge2)}return!0},L.Clipper.prototype.ProcessIntersectList=function(){for(var t=0,e=this.m_IntersectList.length;t<e;t++){var i=this.m_IntersectList[t];this.IntersectEdges(i.Edge1,i.Edge2,i.Pt,!0),this.SwapPositionsInAEL(i.Edge1,i.Edge2)}this.m_IntersectList.length=0},v=function(t){return 0>t?Math.ceil(t-.5):Math.round(t)},I=function(t){return 0>t?Math.ceil(t-.5):Math.floor(t+.5)},x=function(t){return 0>t?-Math.round(Math.abs(t)):Math.round(t)},_=function(t){return 0>t?-2147483648>(t-=.5)?Math.ceil(t):0|t:2147483647<(t+=.5)?Math.floor(t):0|t},L.Clipper.Round=T?v:g?x:C?_:I,L.Clipper.TopX=function(t,e){return e==t.Top.Y?t.Top.X:t.Bot.X+L.Clipper.Round(t.Dx*(e-t.Bot.Y))},L.Clipper.prototype.IntersectPoint=function(t,e,i){var n,o;if(i.Value=new L.IntPoint,L.ClipperBase.SlopesEqual(t,e,this.m_UseFullRange)||t.Dx==e.Dx)return e.Bot.Y>t.Bot.Y?(i.Value.X=e.Bot.X,i.Value.Y=e.Bot.Y):(i.Value.X=t.Bot.X,i.Value.Y=t.Bot.Y),!1;if(0===t.Delta.X)i.Value.X=t.Bot.X,L.ClipperBase.IsHorizontal(e)?i.Value.Y=e.Bot.Y:(o=e.Bot.Y-e.Bot.X/e.Dx,i.Value.Y=L.Clipper.Round(i.Value.X/e.Dx+o));else if(0===e.Delta.X)i.Value.X=e.Bot.X,L.ClipperBase.IsHorizontal(t)?i.Value.Y=t.Bot.Y:(n=t.Bot.Y-t.Bot.X/t.Dx,i.Value.Y=L.Clipper.Round(i.Value.X/t.Dx+n));else{n=t.Bot.X-t.Bot.Y*t.Dx;var r=((o=e.Bot.X-e.Bot.Y*e.Dx)-n)/(t.Dx-e.Dx);i.Value.Y=L.Clipper.Round(r),Math.abs(t.Dx)<Math.abs(e.Dx)?i.Value.X=L.Clipper.Round(t.Dx*r+n):i.Value.X=L.Clipper.Round(e.Dx*r+o)}if(i.Value.Y<t.Top.Y||i.Value.Y<e.Top.Y){if(t.Top.Y>e.Top.Y)return i.Value.Y=t.Top.Y,i.Value.X=L.Clipper.TopX(e,t.Top.Y),i.Value.X<t.Top.X;i.Value.Y=e.Top.Y,Math.abs(t.Dx)<Math.abs(e.Dx)?i.Value.X=L.Clipper.TopX(t,i.Value.Y):i.Value.X=L.Clipper.TopX(e,i.Value.Y)}return!0},L.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(t){for(var e=this.m_ActiveEdges;null!==e;){var i=this.IsMaxima(e,t);if(i&&(i=null===(i=this.GetMaximaPair(e))||!L.ClipperBase.IsHorizontal(i)),i){var n=e.PrevInAEL;this.DoMaxima(e),e=null===n?this.m_ActiveEdges:n.NextInAEL}else this.IsIntermediate(e,t)&&L.ClipperBase.IsHorizontal(e.NextInLML)?(function(){e={Value:e};var t=this.UpdateEdgeIntoAEL(e);return e=e.Value,t}.call(this),0<=e.OutIdx&&this.AddOutPt(e,e.Bot),this.AddEdgeToSEL(e)):(e.Curr.X=L.Clipper.TopX(e,t),e.Curr.Y=t),this.StrictlySimple&&(n=e.PrevInAEL,0<=e.OutIdx&&0!==e.WindDelta&&null!==n&&0<=n.OutIdx&&n.Curr.X==e.Curr.X&&0!==n.WindDelta&&(i=this.AddOutPt(n,e.Curr),n=this.AddOutPt(e,e.Curr),this.AddJoin(i,n,e.Curr))),e=e.NextInAEL}for(this.ProcessHorizontals(!0),e=this.m_ActiveEdges;null!==e;){if(this.IsIntermediate(e,t)){i=null,0<=e.OutIdx&&(i=this.AddOutPt(e,e.Top)),function(){e={Value:e};var t=this.UpdateEdgeIntoAEL(e);return e=e.Value,t}.call(this);n=e.PrevInAEL;var o=e.NextInAEL;null!==n&&n.Curr.X==e.Bot.X&&n.Curr.Y==e.Bot.Y&&null!==i&&0<=n.OutIdx&&n.Curr.Y>n.Top.Y&&L.ClipperBase.SlopesEqual(e,n,this.m_UseFullRange)&&0!==e.WindDelta&&0!==n.WindDelta?(n=this.AddOutPt(n,e.Bot),this.AddJoin(i,n,e.Top)):null!==o&&o.Curr.X==e.Bot.X&&o.Curr.Y==e.Bot.Y&&null!==i&&0<=o.OutIdx&&o.Curr.Y>o.Top.Y&&L.ClipperBase.SlopesEqual(e,o,this.m_UseFullRange)&&0!==e.WindDelta&&0!==o.WindDelta&&(n=this.AddOutPt(o,e.Bot),this.AddJoin(i,n,e.Top))}e=e.NextInAEL}},L.Clipper.prototype.DoMaxima=function(t){var e=this.GetMaximaPair(t);if(null===e)0<=t.OutIdx&&this.AddOutPt(t,t.Top),this.DeleteFromAEL(t);else{for(var i=t.NextInAEL;null!==i&&i!=e;)this.IntersectEdges(t,i,t.Top,!0),this.SwapPositionsInAEL(t,i),i=t.NextInAEL;-1==t.OutIdx&&-1==e.OutIdx?(this.DeleteFromAEL(t),this.DeleteFromAEL(e)):0<=t.OutIdx&&0<=e.OutIdx?this.IntersectEdges(t,e,t.Top,!1):0===t.WindDelta?(0<=t.OutIdx&&(this.AddOutPt(t,t.Top),t.OutIdx=-1),this.DeleteFromAEL(t),0<=e.OutIdx&&(this.AddOutPt(e,t.Top),e.OutIdx=-1),this.DeleteFromAEL(e)):L.Error("DoMaxima error")}},L.Clipper.ReversePaths=function(t){for(var e=0,i=t.length;e<i;e++)t[e].reverse()},L.Clipper.Orientation=function(t){return 0<=L.Clipper.Area(t)},L.Clipper.prototype.PointCount=function(t){if(null===t)return 0;var e=0,i=t;do{e++,i=i.Next}while(i!=t);return e},L.Clipper.prototype.BuildResult=function(t){L.Clear(t);for(var e=0,i=this.m_PolyOuts.length;e<i;e++){if(null!==(n=this.m_PolyOuts[e]).Pts){var n=n.Pts.Prev,o=this.PointCount(n);if(!(2>o)){for(var r=Array(o),s=0;s<o;s++)r[s]=n.Pt,n=n.Prev;t.push(r)}}}}
37,L.Clipper.prototype.BuildResult2=function(t){t.Clear();for(var e=0,i=this.m_PolyOuts.length;e<i;e++){var n=this.m_PolyOuts[e],o=this.PointCount(n.Pts);if(!(n.IsOpen&&2>o||!n.IsOpen&&3>o)){this.FixHoleLinkage(n);var r=new L.PolyNode;t.m_AllPolys.push(r),n.PolyNode=r,r.m_polygon.length=o;n=n.Pts.Prev;for(var s=0;s<o;s++)r.m_polygon[s]=n.Pt,n=n.Prev}}for(e=0,i=this.m_PolyOuts.length;e<i;e++)null!==(n=this.m_PolyOuts[e]).PolyNode&&(n.IsOpen?(n.PolyNode.IsOpen=!0,t.AddChild(n.PolyNode)):null!==n.FirstLeft&&null!=n.FirstLeft.PolyNode?n.FirstLeft.PolyNode.AddChild(n.PolyNode):t.AddChild(n.PolyNode))},L.Clipper.prototype.FixupOutPolygon=function(t){var e=null;t.BottomPt=null;for(var i=t.Pts;;){if(i.Prev==i||i.Prev==i.Next)return this.DisposeOutPts(i),void(t.Pts=null) 38;if(L.IntPoint.op_Equality(i.Pt,i.Next.Pt)||L.IntPoint.op_Equality(i.Pt,i.Prev.Pt)||L.ClipperBase.SlopesEqual(i.Prev.Pt,i.Pt,i.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(i.Prev.Pt,i.Pt,i.Next.Pt)))e=null,i.Prev.Next=i.Next,i=i.Next.Prev=i.Prev;else{if(i==e)break;null===e&&(e=i),i=i.Next}}t.Pts=i},L.Clipper.prototype.DupOutPt=function(t,e){var i=new L.OutPt;return i.Pt.X=t.Pt.X,i.Pt.Y=t.Pt.Y,i.Idx=t.Idx,e?(i.Next=t.Next,i.Prev=t,t.Next.Prev=i,t.Next=i):(i.Prev=t.Prev,i.Next=t,t.Prev.Next=i,t.Prev=i),i},L.Clipper.prototype.GetOverlap=function(t,e,i,n,o,r){return t<e?i<n?(o.Value=Math.max(t,i),r.Value=Math.min(e,n)):(o.Value=Math.max(t,n),r.Value=Math.min(e,i)):i<n?(o.Value=Math.max(e,i),r.Value=Math.min(t,n)):(o.Value=Math.max(e,n),r.Value=Math.min(t,i)),o.Value<r.Value},L.Clipper.prototype.JoinHorz=function(t,e,i,n,o,r){var s=t.Pt.X>e.Pt.X?L.Direction.dRightToLeft:L.Direction.dLeftToRight;if(s==(n=i.Pt.X>n.Pt.X?L.Direction.dRightToLeft:L.Direction.dLeftToRight))return!1;if(s==L.Direction.dLeftToRight){for(;t.Next.Pt.X<=o.X&&t.Next.Pt.X>=t.Pt.X&&t.Next.Pt.Y==o.Y;)t=t.Next;r&&t.Pt.X!=o.X&&(t=t.Next),e=this.DupOutPt(t,!r),L.IntPoint.op_Inequality(e.Pt,o)&&((t=e).Pt.X=o.X,t.Pt.Y=o.Y,e=this.DupOutPt(t,!r))}else{for(;t.Next.Pt.X>=o.X&&t.Next.Pt.X<=t.Pt.X&&t.Next.Pt.Y==o.Y;)t=t.Next;r||t.Pt.X==o.X||(t=t.Next),e=this.DupOutPt(t,r),L.IntPoint.op_Inequality(e.Pt,o)&&((t=e).Pt.X=o.X,t.Pt.Y=o.Y,e=this.DupOutPt(t,r))}if(n==L.Direction.dLeftToRight){for(;i.Next.Pt.X<=o.X&&i.Next.Pt.X>=i.Pt.X&&i.Next.Pt.Y==o.Y;)i=i.Next;r&&i.Pt.X!=o.X&&(i=i.Next),n=this.DupOutPt(i,!r),L.IntPoint.op_Inequality(n.Pt,o)&&((i=n).Pt.X=o.X,i.Pt.Y=o.Y,n=this.DupOutPt(i,!r))}else{for(;i.Next.Pt.X>=o.X&&i.Next.Pt.X<=i.Pt.X&&i.Next.Pt.Y==o.Y;)i=i.Next;r||i.Pt.X==o.X||(i=i.Next),n=this.DupOutPt(i,r),L.IntPoint.op_Inequality(n.Pt,o)&&((i=n).Pt.X=o.X,i.Pt.Y=o.Y,n=this.DupOutPt(i,r))}return s==L.Direction.dLeftToRight==r?(t.Prev=i,i.Next=t,e.Next=n,n.Prev=e):(t.Next=i,i.Prev=t,e.Prev=n,n.Next=e),!0},L.Clipper.prototype.JoinPoints=function(t,e,i){var n=t.OutPt1,o=new L.OutPt,r=t.OutPt2,s=new L.OutPt;if((s=t.OutPt1.Pt.Y==t.OffPt.Y)&&L.IntPoint.op_Equality(t.OffPt,t.OutPt1.Pt)&&L.IntPoint.op_Equality(t.OffPt,t.OutPt2.Pt)){for(o=t.OutPt1.Next;o!=n&&L.IntPoint.op_Equality(o.Pt,t.OffPt);)o=o.Next;for(o=o.Pt.Y>t.OffPt.Y,s=t.OutPt2.Next;s!=r&&L.IntPoint.op_Equality(s.Pt,t.OffPt);)s=s.Next;return o!=s.Pt.Y>t.OffPt.Y&&(o?(o=this.DupOutPt(n,!1),s=this.DupOutPt(r,!0),n.Prev=r,r.Next=n,o.Next=s,s.Prev=o):(o=this.DupOutPt(n,!0),s=this.DupOutPt(r,!1),n.Next=r,r.Prev=n,o.Prev=s,s.Next=o),t.OutPt1=n,t.OutPt2=o,!0)}if(s){for(o=n;n.Prev.Pt.Y==n.Pt.Y&&n.Prev!=o&&n.Prev!=r;)n=n.Prev;for(;o.Next.Pt.Y==o.Pt.Y&&o.Next!=n&&o.Next!=r;)o=o.Next;if(o.Next==n||o.Next==r)return!1;for(s=r;r.Prev.Pt.Y==r.Pt.Y&&r.Prev!=s&&r.Prev!=o;)r=r.Prev;for(;s.Next.Pt.Y==s.Pt.Y&&s.Next!=r&&s.Next!=n;)s=s.Next;return s.Next!=r&&s.Next!=n&&(l={Value:l},p={Value:p},e=this.GetOverlap(n.Pt.X,o.Pt.X,r.Pt.X,s.Pt.X,l,p),l=l.Value,p=p.Value,!!e&&(e=new L.IntPoint,n.Pt.X>=l&&n.Pt.X<=p?(e.X=n.Pt.X,e.Y=n.Pt.Y,i=n.Pt.X>o.Pt.X):r.Pt.X>=l&&r.Pt.X<=p?(e.X=r.Pt.X,e.Y=r.Pt.Y,i=r.Pt.X>s.Pt.X):o.Pt.X>=l&&o.Pt.X<=p?(e.X=o.Pt.X,e.Y=o.Pt.Y,i=o.Pt.X>n.Pt.X):(e.X=s.Pt.X,e.Y=s.Pt.Y,i=s.Pt.X>r.Pt.X),t.OutPt1=n,t.OutPt2=r,this.JoinHorz(n,o,r,s,e,i)));var l,p}
vendor: 4,322 bytes, line 38
38for(o=n.Next;L.IntPoint.op_Equality(o.Pt,n.Pt)&&o!=n;)o=o.Next;if(l=o.Pt.Y>n.Pt.Y||!L.ClipperBase.SlopesEqual(n.Pt,o.Pt,t.OffPt,this.m_UseFullRange)){for(o=n.Prev;L.IntPoint.op_Equality(o.Pt,n.Pt)&&o!=n;)o=o.Prev;if(o.Pt.Y>n.Pt.Y||!L.ClipperBase.SlopesEqual(n.Pt,o.Pt,t.OffPt,this.m_UseFullRange))return!1}for(s=r.Next;L.IntPoint.op_Equality(s.Pt,r.Pt)&&s!=r;)s=s.Next;if(p=s.Pt.Y>r.Pt.Y||!L.ClipperBase.SlopesEqual(r.Pt,s.Pt,t.OffPt,this.m_UseFullRange)){for(s=r.Prev;L.IntPoint.op_Equality(s.Pt,r.Pt)&&s!=r;)s=s.Prev;if(s.Pt.Y>r.Pt.Y||!L.ClipperBase.SlopesEqual(r.Pt,s.Pt,t.OffPt,this.m_UseFullRange))return!1}return o!=n&&s!=r&&o!=s&&(e!=i||l!=p)&&(l?(o=this.DupOutPt(n,!1),s=this.DupOutPt(r,!0),n.Prev=r,r.Next=n,o.Next=s,s.Prev=o):(o=this.DupOutPt(n,!0),s=this.DupOutPt(r,!1),n.Next=r,r.Prev=n,o.Prev=s,s.Next=o),t.OutPt1=n,t.OutPt2=o,!0)},L.Clipper.GetBounds=function(t){for(var e=0,i=t.length;e<i&&0==t[e].length;)e++;if(e==i)return new L.IntRect(0,0,0,0);var n=new L.IntRect;for(n.left=t[e][0].X,n.right=n.left,n.top=t[e][0].Y,n.bottom=n.top;e<i;e++)for(var o=0,r=t[e].length;o<r;o++)t[e][o].X<n.left?n.left=t[e][o].X:t[e][o].X>n.right&&(n.right=t[e][o].X),t[e][o].Y<n.top?n.top=t[e][o].Y:t[e][o].Y>n.bottom&&(n.bottom=t[e][o].Y);return n},L.Clipper.prototype.GetBounds2=function(t){var e=t,i=new L.IntRect;for(i.left=t.Pt.X,i.right=t.Pt.X,i.top=t.Pt.Y,i.bottom=t.Pt.Y,t=t.Next;t!=e;)t.Pt.X<i.left&&(i.left=t.Pt.X),t.Pt.X>i.right&&(i.right=t.Pt.X),t.Pt.Y<i.top&&(i.top=t.Pt.Y),t.Pt.Y>i.bottom&&(i.bottom=t.Pt.Y),t=t.Next;return i},L.Clipper.PointInPolygon=function(t,e){var i=0,n=e.length;if(3>n)return 0;for(var o=e[0],r=1;r<=n;++r){var s=r==n?e[0]:e[r];if(s.Y==t.Y&&(s.X==t.X||o.Y==t.Y&&s.X>t.X==o.X<t.X))return-1;if(o.Y<t.Y!=s.Y<t.Y)if(o.X>=t.X)if(s.X>t.X)i=1-i;else{var l=(o.X-t.X)*(s.Y-t.Y)-(s.X-t.X)*(o.Y-t.Y);if(0==l)return-1;0<l==s.Y>o.Y&&(i=1-i)}else if(s.X>t.X){if(0==(l=(o.X-t.X)*(s.Y-t.Y)-(s.X-t.X)*(o.Y-t.Y)))return-1;0<l==s.Y>o.Y&&(i=1-i)}o=s}return i},L.Clipper.prototype.PointInPolygon=function(t,e){for(var i=0,n=e;;){var o=e.Pt.X,r=e.Pt.Y,s=e.Next.Pt.X,l=e.Next.Pt.Y;if(l==t.Y&&(s==t.X||r==t.Y&&s>t.X==o<t.X))return-1;if(r<t.Y!=l<t.Y)if(o>=t.X)if(s>t.X)i=1-i;else{if(0==(o=(o-t.X)*(l-t.Y)-(s-t.X)*(r-t.Y)))return-1;0<o==l>r&&(i=1-i)}else if(s>t.X){if(0==(o=(o-t.X)*(l-t.Y)-(s-t.X)*(r-t.Y)))return-1;0<o==l>r&&(i=1-i)}if(n==(e=e.Next))break}return i},L.Clipper.prototype.Poly2ContainsPoly1=function(t,e){var i=t;do{var n=this.PointInPolygon(i.Pt,e);if(0<=n)return 0!=n;i=i.Next}while(i!=t);return!0},L.Clipper.prototype.FixupFirstLefts1=function(t,e){for(var i=0,n=this.m_PolyOuts.length;i<n;i++){var o=this.m_PolyOuts[i];null!==o.Pts&&o.FirstLeft==t&&this.Poly2ContainsPoly1(o.Pts,e.Pts)&&(o.FirstLeft=e)}},L.Clipper.prototype.FixupFirstLefts2=function(t,e){for(var i=0,n=this.m_PolyOuts,o=n.length,r=n[i];i<o;r=n[++i])r.FirstLeft==t&&(r.FirstLeft=e)},L.Clipper.ParseFirstLeft=function(t){for(;null!=t&&null==t.Pts;)t=t.FirstLeft;return t},L.Clipper.prototype.JoinCommonEdges=function(){for(var t=0,e=this.m_Joins.length;t<e;t++){var i,n=this.m_Joins[t],o=this.GetOutRec(n.OutPt1.Idx),r=this.GetOutRec(n.OutPt2.Idx);if(null!=o.Pts&&null!=r.Pts)if(i=o==r?o:this.Param1RightOfParam2(o,r)?r:this.Param1RightOfParam2(r,o)?o:this.GetLowermostRec(o,r),this.JoinPoints(n,o,r))if(o==r){if(o.Pts=n.OutPt1,o.BottomPt=null,(r=this.CreateOutRec()).Pts=n.OutPt2,this.UpdateOutPtIdxs(r),this.m_UsingPolyTree){i=0;for(var s=this.m_PolyOuts.length;i<s-1;i++){var l=this.m_PolyOuts[i];null!=l.Pts&&L.Clipper.ParseFirstLeft(l.FirstLeft)==o&&l.IsHole!=o.IsHole&&this.Poly2ContainsPoly1(l.Pts,n.OutPt2)&&(l.FirstLeft=r)}}this.Poly2ContainsPoly1(r.Pts,o.Pts)?(r.IsHole=!o.IsHole,r.FirstLeft=o,this.m_UsingPolyTree&&this.FixupFirstLefts2(r,o),(r.IsHole^this.ReverseSolution)==0<this.Area(r)&&this.ReversePolyPtLinks(r.Pts)):this.Poly2ContainsPoly1(o.Pts,r.Pts)?(r.IsHole=o.IsHole,o.IsHole=!r.IsHole,r.FirstLeft=o.FirstLeft,o.FirstLeft=r,this.m_UsingPolyTree&&this.FixupFirstLefts2(o,r),(o.IsHole^this.ReverseSolution)==0<this.Area(o)&&this.ReversePolyPtLinks(o.Pts)):(r.IsHole=o.IsHole,r.FirstLeft=o.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(o,r))}else r.Pts=null,r.BottomPt=null,r.Idx=o.Idx,o.IsHole=i.IsHole,i==r&&(o.FirstLeft=r.FirstLeft),r.FirstLeft=o,this.m_UsingPolyTree&&this.FixupFirstLefts2(r,o)}}
38,L.Clipper.prototype.UpdateOutPtIdxs=function(t){var e=t.Pts;do{e.Idx=t.Idx,e=e.Prev}while(e!=t.Pts)},L.Clipper.prototype.DoSimplePolygons=function(){for(var t=0;t<this.m_PolyOuts.length;){var e=this.m_PolyOuts[t++],i=e.Pts;if(null!==i)do{for(var n=i.Next;n!=e.Pts;){if(L.IntPoint.op_Equality(i.Pt,n.Pt)&&n.Next!=i&&n.Prev!=i){var o=i.Prev,r=n.Prev;i.Prev=r,r.Next=i,n.Prev=o,o.Next=n,e.Pts=i,(o=this.CreateOutRec()).Pts=n,this.UpdateOutPtIdxs(o),this.Poly2ContainsPoly1(o.Pts,e.Pts)?(o.IsHole=!e.IsHole,o.FirstLeft=e):this.Poly2ContainsPoly1(e.Pts,o.Pts)?(o.IsHole=e.IsHole,e.IsHole=!o.IsHole,o.FirstLeft=e.FirstLeft,e.FirstLeft=o):(o.IsHole=e.IsHole,o.FirstLeft=e.FirstLeft),n=i}n=n.Next}i=i.Next}while(i!=e.Pts)}},L.Clipper.Area=function(t){var e=t.length;if(3>e)return 0;for(var i=0,n=0,o=e-1;n<e;++n)i+=(t[o].X+t[n].X)*(t[o].Y-t[n].Y),o=n;return.5*-i},L.Clipper.prototype.Area=function(t){var e=t.Pts;if(null==e)return 0;var i=0;do{i+=(e.Prev.Pt.X+e.Pt.X)*(e.Prev.Pt.Y-e.Pt.Y),e=e.Next}while(e!=t.Pts);return.5*i},L.Clipper.SimplifyPolygon=function(t,e){var i=[],n=new L.Clipper(0);return n.StrictlySimple=!0,n.AddPath(t,L.PolyType.ptSubject,!0),n.Execute(L.ClipType.ctUnion,i,e,e),i},L.Clipper.SimplifyPolygons=function(t,e){void 0===e&&(e=L.PolyFillType.pftEvenOdd);var i=[],n=new L.Clipper(0);return n.StrictlySimple=!0,n.AddPaths(t,L.PolyType.ptSubject,!0),n.Execute(L.ClipType.ctUnion,i,e,e),i},L.Clipper.DistanceSqrd=function(t,e){var i=t.X-e.X,n=t.Y-e.Y;return i*i+n*n},L.Clipper.DistanceFromLineSqrd=function(t,e,i){var n=e.Y-i.Y;return i=i.X-e.X,e=n*e.X+i*e.Y,(e=n*t.X+i*t.Y-e)*e/(n*n+i*i)},L.Clipper.SlopesNearCollinear=function(t,e,i,n){return L.Clipper.DistanceFromLineSqrd(e,t,i)<n},L.Clipper.PointsAreClose=function(t,e,i){var n=t.X-e.X;return n*n+(t=t.Y-e.Y)*t<=i},L.Clipper.ExcludeOp=function(t){var e=t.Prev;return e.Next=t.Next,t.Next.Prev=e,e.Idx=0,e},L.Clipper.CleanPolygon=function(t,e){void 0===e&&(e=1.415);var i=t.length;if(0==i)return[];for(var n=Array(i),o=0;o<i;++o)n[o]=new L.OutPt;for(o=0;o<i;++o)n[o].Pt=t[o],n[o].Next=n[(o+1)%i],n[o].Next.Prev=n[o],n[o].Idx=0;for(o=e*e,n=n[0];0==n.Idx&&n.Next!=n.Prev;)L.Clipper.PointsAreClose(n.Pt,n.Prev.Pt,o)?(n=L.Clipper.ExcludeOp(n),i--):L.Clipper.PointsAreClose(n.Prev.Pt,n.Next.Pt,o)?(L.Clipper.ExcludeOp(n.Next),n=L.Clipper.ExcludeOp(n),i-=2):L.Clipper.SlopesNearCollinear(n.Prev.Pt,n.Pt,n.Next.Pt,o)?(n=L.Clipper.ExcludeOp(n),i--):(n.Idx=1,n=n.Next);3>i&&(i=0);var r=Array(i);for(o=0;o<i;++o)r[o]=new L.IntPoint(n.Pt),n=n.Next;return r},L.Clipper.CleanPolygons=function(t,e){for(var i=Array(t.length),n=0,o=t.length;n<o;n++)i[n]=L.Clipper.CleanPolygon(t[n],e);return i},L.Clipper.Minkowski=function(t,e,i,n){var o=n?1:0,r=t.length,s=e.length;if(n=[],i)for(i=0;i<s;i++){for(var l=Array(r),p=0,u=t.length,h=t[p];p<u;h=t[++p])l[p]=new L.IntPoint(e[i].X+h.X,e[i].Y+h.Y);n.push(l)}else for(i=0;i<s;i++){for(l=Array(r),p=0,u=t.length,h=t[p];p<u;h=t[++p])l[p]=new L.IntPoint(e[i].X-h.X,e[i].Y-h.Y);n.push(l)}for(t=[],i=0;i<s-1+o;i++)for(p=0;p<r;p++)(e=[]).push(n[i%s][p%r]),e.push(n[(i+1)%s][p%r]),e.push(n[(i+1)%s][(p+1)%r]),e.push(n[i%s][(p+1)%r]),L.Clipper.Orientation(e)||e.reverse(),t.push(e);return(o=new L.Clipper(0)).AddPaths(t,L.PolyType.ptSubject,!0),o.Execute(L.ClipType.ctUnion,n,L.PolyFillType.pftNonZero,L.PolyFillType.pftNonZero),n},L.Clipper.MinkowskiSum=function(){if(3==(o=(r=arguments).length)){var t=r[0],e=r[2];return L.Clipper.Minkowski(t,r[1],!0,e)}if(4==o){t=r[0];for(var i,n=r[1],o=r[2],r=(e=r[3],new L.Clipper),s=0,l=n.length;s<l;++s)i=L.Clipper.Minkowski(t,n[s],!0,e),r.AddPaths(i,L.PolyType.ptSubject,!0);return e&&r.AddPaths(n,L.PolyType.ptClip,!0),t=new L.Paths,r.Execute(L.ClipType.ctUnion,t,o,o),t}},L.Clipper.MinkowskiDiff=function(t,e,i){return L.Clipper.Minkowski(t,e,!1,i)},L.Clipper.PolyTreeToPaths=function(t){var e=[];return L.Clipper.AddPolyNodeToPaths(t,L.Clipper.NodeType.ntAny,e),e},L.Clipper.AddPolyNodeToPaths=function(t,e,i){var n=!0;switch(e){case L.Clipper.NodeType.ntOpen:return;case L.Clipper.NodeType.ntClosed:n=!t.IsOpen}0<t.m_polygon.length&&n&&i.push(t.m_polygon),n=0;for(var o=(t=t.Childs()).length,r=t[n];n<o;r=t[++n])L.Clipper.AddPolyNodeToPaths(r,e,i)},L.Clipper.OpenPathsFromPolyTree=function(t){for(var e=new L.Paths,i=0,n=t.ChildCount();i<n;i++)t.Childs()[i].IsOpen&&e.push(t.Childs()[i].m_polygon);return e},L.Clipper.ClosedPathsFromPolyTree=function(t){var e=new L.Paths;return L.Clipper.AddPolyNodeToPaths(t,L.Clipper.NodeType.ntClosed,e),e},A(L.Clipper,L.ClipperBase),L.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2},L.ClipperOffset=function(t,e){void 0===t&&(t=2),void 0===e&&(e=L.ClipperOffset.def_arc_tolerance),this.m_destPolys=new L.Paths,this.m_srcPoly=new L.Path,this.m_destPoly=new L.Path,this.m_normals=[],this.m_StepsPerRad=this.m_miterLim=this.m_cos=this.m_sin=this.m_sinA=this.m_delta=0,this.m_lowest=new L.IntPoint,this.m_polyNodes=new L.PolyNode,this.MiterLimit=t,this.ArcTolerance=e,this.m_lowest.X=-1},L.ClipperOffset.two_pi=6.28318530717959,L.ClipperOffset.def_arc_tolerance=.25,L.ClipperOffset.prototype.Clear=function(){L.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1},L.ClipperOffset.Round=L.Clipper.Round,L.ClipperOffset.prototype.AddPath=function(t,e,
38i){var n=t.length-1;if(!(0>n)){var o=new L.PolyNode;if(o.m_jointype=e,o.m_endtype=i,i==L.EndType.etClosedLine||i==L.EndType.etClosedPolygon)for(;0<n&&L.IntPoint.op_Equality(t[0],t[n]);)n--;o.m_polygon.push(t[0]);var r=0;e=0;for(var s=1;s<=n;s++)L.IntPoint.op_Inequality(o.m_polygon[r],t[s])&&(r++,o.m_polygon.push(t[s]),t[s].Y>o.m_polygon[e].Y||t[s].Y==o.m_polygon[e].Y&&t[s].X<o.m_polygon[e].X)&&(e=r);i==L.EndType.etClosedPolygon&&2>r||i!=L.EndType.etClosedPolygon&&0>r||(this.m_polyNodes.AddChild(o),i!=L.EndType.etClosedPolygon)||(0>this.m_lowest.X?this.m_lowest=new L.IntPoint(0,e):(t=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y],(o.m_polygon[e].Y>t.Y||o.m_polygon[e].Y==t.Y&&o.m_polygon[e].X<t.X)&&(this.m_lowest=new L.IntPoint(this.m_polyNodes.ChildCount()-1,e))))}},L.ClipperOffset.prototype.AddPaths=function(t,e,i){for(var n=0,o=t.length;n<o;n++)this.AddPath(t[n],e,i)},L.ClipperOffset.prototype.FixOrientations=function(){if(0<=this.m_lowest.X&&!L.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var t=0;t<this.m_polyNodes.ChildCount();t++){var e=this.m_polyNodes.Childs()[t];(e.m_endtype==L.EndType.etClosedPolygon||e.m_endtype==L.EndType.etClosedLine&&L.Clipper.Orientation(e.m_polygon))&&e.m_polygon.reverse()}else for(t=0;t<this.m_polyNodes.ChildCount();t++)(e=this.m_polyNodes.Childs()[t]).m_endtype!=L.EndType.etClosedLine||L.Clipper.Orientation(e.m_polygon)||e.m_polygon.reverse()},L.ClipperOffset.GetUnitNormal=function(t,e){var i=e.X-t.X,n=e.Y-t.Y;if(0==i&&0==n)return new L.DoublePoint(0,0);var o=1/Math.sqrt(i*i+n*n);return new L.DoublePoint(n*o,-i*o)},L.ClipperOffset.prototype.DoOffset=function(t){if(this.m_destPolys=[],this.m_delta=t,L.ClipperBase.near_zero(t))for(var e=0;e<this.m_polyNodes.ChildCount();e++){(n=this.m_polyNodes.Childs()[e]).m_endtype==L.EndType.etClosedPolygon&&this.m_destPolys.push(n.m_polygon)}else{this.m_miterLim=2<this.MiterLimit?2/(this.MiterLimit*this.MiterLimit):.5;e=0>=this.ArcTolerance?L.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(t)*L.ClipperOffset.def_arc_tolerance?Math.abs(t)*L.ClipperOffset.def_arc_tolerance:this.ArcTolerance;var i=3.14159265358979/Math.acos(1-e/Math.abs(t));for(this.m_sin=Math.sin(L.ClipperOffset.two_pi/i),this.m_cos=Math.cos(L.ClipperOffset.two_pi/i),this.m_StepsPerRad=i/L.ClipperOffset.two_pi,0>t&&(this.m_sin=-this.m_sin),e=0;e<this.m_polyNodes.ChildCount();e++){if(n=this.m_polyNodes.Childs()[e],this.m_srcPoly=n.m_polygon,!(0==(o=this.m_srcPoly.length)||0>=t&&(3>o||n.m_endtype!=L.EndType.etClosedPolygon))){if(this.m_destPoly=[],1==o)if(n.m_jointype==L.JoinType.jtRound)for(var n=1,o=0,r=1;r<=i;r++){this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[0].X+n*t),L.ClipperOffset.Round(this.m_srcPoly[0].Y+o*t)));var s=n;n=n*this.m_cos-this.m_sin*o,o=s*this.m_sin+o*this.m_cos}else for(o=n=-1,r=0;4>r;++r)this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[0].X+n*t),L.ClipperOffset.Round(this.m_srcPoly[0].Y+o*t))),0>n?n=1:0>o?o=1:n=-1;else{for(r=this.m_normals.length=0;r<o-1;r++)this.m_normals.push(L.ClipperOffset.GetUnitNormal(this.m_srcPoly[r],this.m_srcPoly[r+1]));if(n.m_endtype==L.EndType.etClosedLine||n.m_endtype==L.EndType.etClosedPolygon?this.m_normals.push(L.ClipperOffset.GetUnitNormal(this.m_srcPoly[o-1],this.m_srcPoly[0])):this.m_normals.push(new L.DoublePoint(this.m_normals[o-2])),n.m_endtype==L.EndType.etClosedPolygon)for(s=o-1,r=0;r<o;r++)s=this.OffsetPoint(r,s,n.m_jointype);else if(n.m_endtype==L.EndType.etClosedLine){for(s=o-1,r=0;r<o;r++)s=this.OffsetPoint(r,s,n.m_jointype);for(this.m_destPolys.push(this.m_destPoly),this.m_destPoly=[],s=this.m_normals[o-1],r=o-1;0<r;r--)this.m_normals[r]=new L.DoublePoint(-this.m_normals[r-1].X,-this.m_normals[r-1].Y);for(this.m_normals[0]=new L.DoublePoint(-s.X,-s.Y),s=0,r=o-1;0<=r;r--)s=this.OffsetPoint(r,s,n.m_jointype)}else{for(s=0,r=1;r<o-1;++r)s=this.OffsetPoint(r,s,n.m_jointype);for(n.m_endtype==L.EndType.etOpenButt?(r=o-1,s=new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[r].X+this.m_normals[r].X*t),L.ClipperOffset.Round(this.m_srcPoly[r].Y+this.m_normals[r].Y*t)),this.m_destPoly.push(s),s=new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[r].X-this.m_normals[r].X*t),L.ClipperOffset.Round(this.m_srcPoly[r].Y-this.m_normals[r].Y*t)),this.m_destPoly.push(s)):(r=o-1,s=o-2,this.m_sinA=0,this.m_normals[r]=new L.DoublePoint(-this.m_normals[r].X,-this.m_normals[r].Y),n.m_endtype==L.EndType.etOpenSquare?this.DoSquare(r,s):this.DoRound(r,s)),r=o-1;0<r;r--)this.m_normals[r]=new L.DoublePoint(-this.m_normals[r-1].X,-this.m_normals[r-1].Y);for(this.m_normals[0]=new L.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y),r=(s=o-1)-1;0<r;--r)s=this.OffsetPoint(r,s,n.m_jointype);n.m_endtype==L.EndType.etOpenButt?(s=new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*t),L.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*t)),this.m_destPoly.push(s),s=new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*t),L.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*t)),this.m_destPoly.push(s)):(this.m_sinA=0,n.m_endtype==L.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1))}}this.m_destPolys.push(this.m_destPoly)}}}},L.ClipperOffset.prototype.Execute=function(){var t=arguments;if(t[0]instanceof L.PolyTree)if(e=t[0],i=t[1],e.Clear(),this.FixOrientations(),this.DoOffset(i),(t=new L.Clipper(0)).AddPaths(this.m_destPolys,L.PolyType.ptSubject,!0),0<i)t.Execute(L.ClipType.ctUnion,e,L.PolyFillType.pftPositive,L.PolyFillType.pftPositive);else if(i=L.Clipper.GetBounds(this.m_destPolys),(n=new L.Path).push(new L.IntPoint(i.left-10,i.bottom+10)),n.push(new L.IntPoint(i.right+10,i.bottom+10)),n.push(new L.IntPoint(i.right+10,i.top-10)),n.push(new L.IntPoint(i.left-10,i.top-10)),t.AddPath(n,L.PolyType.ptSubject,!0),t.ReverseSolution=!0,t.Execute(L.ClipType.ctUnion,e,L.PolyFillType.pftNegative,L.PolyFillType.pftNegative),1==e.ChildCount()&&0<e.Childs()[0].ChildCount())for(t=e.Childs()[0],e.Childs()[0]=t.Childs()[0],i=1;i<t.ChildCount();i++)e.AddChild(t.Childs()[i]);else e.Clear();else{var e=t[0],i=t[1];if(L.Clear(e),this.FixOrientations(),this.DoOffset(i),(t=new L.Clipper(0)).AddPaths(this.m_destPolys,L.PolyType.ptSubject,!0),0<i)t.Execute(L.ClipType.ctUnion,e,L.PolyFillType.pftPositive,L.PolyFillType.pftPositive);else{i=L.Clipper.GetBounds(this.m_destPolys);var n=new L.Path;n.push(new L.IntPoint(i.left-10,i.bottom+10)),n.push(new L.IntPoint(i.right+10,i.bottom+10)),n.push(new L.IntPoint(i.right+10,i.top-10)),n.push(new L.IntPoint(i.left-10,i.top-10)),t.AddPath(n,L.PolyType.ptSubject,!0),t.ReverseSolution=!0,t.Execute(L.ClipType.ctUnion,e,L.PolyFillType.pftNegative,L.PolyFillType.pftNegative),0<e.length&&e.splice(0,1)}}}
38,L.ClipperOffset.prototype.OffsetPoint=function(t,e,i){if(this.m_sinA=this.m_normals[e].X*this.m_normals[t].Y-this.m_normals[t].X*this.m_normals[e].Y,5e-5>this.m_sinA&&-5e-5<this.m_sinA)return e;if(1<this.m_sinA?this.m_sinA=1:-1>this.m_sinA&&(this.m_sinA=-1),0>this.m_sinA*this.m_delta)this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[e].X*this.m_delta),L.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[e].Y*this.m_delta))),this.m_destPoly.push(new L.IntPoint(this.m_srcPoly[t])),this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[t].X*this.m_delta),L.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[t].Y*this.m_delta)));else switch(i){case L.JoinType.jtMiter:(i=this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y+1)>=this.m_miterLim?this.DoMiter(t,e,i):this.DoSquare(t,e);break;case L.JoinType.jtSquare:this.DoSquare(t,e);break;case L.JoinType.jtRound:this.DoRound(t,e)}return t},L.ClipperOffset.prototype.DoSquare=function(t,e){var i=Math.tan(Math.atan2(this.m_sinA,this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y)/4);this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_delta*(this.m_normals[e].X-this.m_normals[e].Y*i)),L.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_delta*(this.m_normals[e].Y+this.m_normals[e].X*i)))),this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_delta*(this.m_normals[t].X+this.m_normals[t].Y*i)),L.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_delta*(this.m_normals[t].Y-this.m_normals[t].X*i))))},L.ClipperOffset.prototype.DoMiter=function(t,e,i){i=this.m_delta/i,this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+(this.m_normals[e].X+this.m_normals[t].X)*i),L.ClipperOffset.Round(this.m_srcPoly[t].Y+(this.m_normals[e].Y+this.m_normals[t].Y)*i)))},L.ClipperOffset.prototype.DoRound=function(t,e){for(var i,n=Math.atan2(this.m_sinA,this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y),o=(n=L.Cast_Int32(L.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(n))),this.m_normals[e].X),r=this.m_normals[e].Y,s=0;s<n;++s)this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+o*this.m_delta),L.ClipperOffset.Round(this.m_srcPoly[t].Y+r*this.m_delta))),i=o,o=o*this.m_cos-this.m_sin*r,r=i*this.m_sin+r*this.m_cos;this.m_destPoly.push(new L.IntPoint(L.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[t].X*this.m_delta),L.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[t].Y*this.m_delta)))},L.Error=function(t){try{throw Error(t)}catch(e){alert(e.message)}},L.JS={},L.JS.AreaOfPolygon=function(t,e){return e||(e=1),L.Clipper.Area(t)/(e*e)},L.JS.AreaOfPolygons=function(t,e){e||(e=1);for(var i=0,n=0;n<t.length;n++)i+=L.Clipper.Area(t[n]);return i/(e*e)},L.JS.BoundsOfPath=function(t,e){return L.JS.BoundsOfPaths([t],e)},L.JS.BoundsOfPaths=function(t,e){e||(e=1);var i=L.Clipper.GetBounds(t);return i.left/=e,i.bottom/=e,i.right/=e,i.top/=e,i},L.JS.Clean=function(t,e){if(!(t instanceof Array))return[];var i=t[0]instanceof Array;if(t=L.JS.Clone(t),"number"!=typeof e||null===e)return L.Error("Delta is not a number in Clean()."),t;if(0===t.length||1==t.length&&0===t[0].length||0>e)return t;i||(t=[t]);for(var n,o,r,s,l,p,u,h=t.length,a=[],f=0;f<h;f++)if(0!==(n=(o=t[f]).length))if(3>n)r=o,a.push(r);else{for(r=o,s=e*e,l=o[0],u=p=1;u<n;u++)(o[u].X-l.X)*(o[u].X-l.X)+(o[u].Y-l.Y)*(o[u].Y-l.Y)<=s||(r[p]=o[u],l=o[u],p++);l=o[p-1],(o[0].X-l.X)*(o[0].X-l.X)+(o[0].Y-l.Y)*(o[0].Y-l.Y)<=s&&p--,p<n&&r.splice(p,n-p),r.length&&a.push(r)}return!i&&a.length?a=a[0]:i||0!==a.length?i&&0===a.length&&(a=[[]]):a=[],a},L.JS.Clone=function(t){if(!(t instanceof Array)||0===t.length)return[];if(1==t.length&&0===t[0].length)return[[]];var e=t[0]instanceof Array;e||(t=[t]);var i,n,o,r,s=t.length,l=Array(s);for(n=0;n<s;n++){for(i=t[n].length,r=Array(i),o=0;o<i;o++)r[o]={X:t[n][o].X,Y:t[n][o].Y};l[n]=r}return e||(l=l[0]),l},L.JS.Lighten=function(t,e){if(!(t instanceof Array))return[];if("number"!=typeof e||null===e)return L.Error("Tolerance is not a number in Lighten()."),L.JS.Clone(t);if(0===t.length||1==t.length&&0===t[0].length||0>e)return L.JS.Clone(t);t[0]instanceof Array||(t=[t]);var i,n,o,r,s,l,p,u,h,a,f,d,P,m,y,c=t.length,v=e*e,C=[];for(i=0;i<c;i++)if(0!=(l=(o=t[i]).length)){for(r=0;1e6>r;r++){for(s=[],o[(l=o.length)-1].X!=o[0].X||o[l-1].Y!=o[0].Y?(f=1,o.push({X:o[0].X,Y:o[0].Y}),l=o.length):f=0,a=[],n=0;n<l-2;n++)p=o[n],h=o[n+1],u=o[n+2],m=p.X,y=p.Y,p=u.X-m,d=u.Y-y,0===p&&0===d||(1<(P=((h.X-m)*p+(h.Y-y)*d)/(p*p+d*d))?(m=u.X,y=u.Y):0<P&&(m+=p*P,y+=d*P)),(u=(p=h.X-m)*p+(d=h.Y-y)*d)<=v&&(a[n+1]=1,n++);for(s.push({X:o[0].X,Y:o[0].Y}),n=1;n<l-1;n++)a[n]||s.push({X:o[n].X,Y:o[n].Y});if(s.push({X:o[l-1].X,Y:o[l-1].Y}),f&&o.pop(),!a.length)break;o=s}s[(l=s.length)-1].X==s[0].X&&s[l-1].Y==s[0].Y&&s.pop(),2<s.length&&C.push(s)}return!t[0]instanceof Array&&(C=C[0]),void 0===C&&(C=[[]]),C}
38,L.JS.PerimeterOfPath=function(t,e,i){if(void 0===t)return 0;var n,o,r=Math.sqrt,s=0,l=0,p=n=0;o=0;var u=t.length;if(2>u)return 0;for(e&&(t[u]=t[0],u++);--u;)l=(n=t[u]).X,n=n.Y,s+=r((l-(p=(o=t[u-1]).X))*(l-p)+(n-(o=o.Y))*(n-o));return e&&t.pop(),s/i},L.JS.PerimeterOfPaths=function(t,e,i){i||(i=1);for(var n=0,o=0;o<t.length;o++)n+=L.JS.PerimeterOfPath(t[o],e,i);return n},L.JS.ScaleDownPath=function(t,e){var i,n;for(e||(e=1),i=t.length;i--;)(n=t[i]).X/=e,n.Y/=e},L.JS.ScaleDownPaths=function(t,e){var i,n,o;for(e||(e=1),i=t.length;i--;)for(n=t[i].length;n--;)(o=t[i][n]).X/=e,o.Y/=e},L.JS.ScaleUpPath=function(t,e){var i,n,o=Math.round;for(e||(e=1),i=t.length;i--;)(n=t[i]).X=o(n.X*e),n.Y=o(n.Y*e)},L.JS.ScaleUpPaths=function(t,e){var i,n,o,r=Math.round;for(e||(e=1),i=t.length;i--;)for(n=t[i].length;n--;)(o=t[i][n]).X=r(o.X*e),o.Y=r(o.Y*e)},L.ExPolygons=function(){return[]},L.ExPolygon=function(){this.holes=this.outer=null},L.JS.AddOuterPolyNodeToExPolygons=function(t,e){var i=new L.ExPolygon;i.outer=t.Contour();var n,o,r,s,l,p=t.Childs(),u=p.length;for(i.holes=Array(u),o=0;o<u;o++)for(n=p[o],i.holes[o]=n.Contour(),r=0,l=(s=n.Childs()).length;r<l;r++)n=s[r],L.JS.AddOuterPolyNodeToExPolygons(n,e);e.push(i)},L.JS.ExPolygonsToPaths=function(t){var e,i,n,o,r=new L.Paths;for(e=0,n=t.length;e<n;e++)for(r.push(t[e].outer),i=0,o=t[e].holes.length;i<o;i++)r.push(t[e].holes[i]);return r},L.JS.PolyTreeToExPolygons=function(t){var e,i,n,o=new L.ExPolygons;for(e=0,n=(i=t.Childs()).length;e<n;e++)t=i[e],L.JS.AddOuterPolyNodeToExPolygons(t,o);return o}}(); 39var DEBUG=DEBUG||{};DEBUG.active=!0,DEBUG.trace=function(c){this.active&&console.log(c)},DEBUG.warning=function(c){this.active&&console.log(c)},DEBUG.alert=function(c){this.active&&alert(c)},DEBUG.TODO=function(c){this.active&&console.warn("TODO: "+c)},DEBUG.clear=function(){console.clear()}; 40var Delaunay=Delaunay||{}; 41Delaunay.Edge=function(p,t){this.p1=p,this.p2=t},Delaunay.Edge.prototype.equals=function(p){return this.p1==p.p2&&this.p2==p.p1||this.p1==p.p1&&this.p2==p.p2}; 42var Hull={parseVertices:function(p){var e=[];for(len=p.length,i=0;i<len;i++)e.push(new Delaunay.Point(p[i][0],p[i][1])),0==i&&(e[0].id=0);return Hull.concaveHull(e)},removeDuplicatesInPlace:function(p){var e,t,r,i;for(e=p.length-1;e>=0;e--)for(r=p[e],i=!1,t=e-1;!i&&t>=0;t--)r[1]==p[t][0]&&r[0]==p[t][1]&&(e!==t&&(p.splice(e,1),e--),i=!0);return p},findAlpha:function(p){var e=p.length,r=0;for(i=0;i<e;i++)t=p[i],r=r+Math.sqrt((t.p1.x-t.p2.x)*(t.p1.x-t.p2.x)+(t.p1.y-t.p2.y)*(t.p1.y-t.p2.y))+Math.sqrt((t.p2.x-t.p3.x)*(t.p2.x-t.p3.x)+(t.p2.y-t.p3.y)*(t.p2.y-t.p3.y))+Math.sqrt((t.p3.x-t.p1.x)*(t.p3.x-t.p1.x)+(t.p3.y-t.p1.y)*(t.p3.y-t.p1.y));return r/=3*e},concaveHull:function(p){var e,t,r,i=Delaunay.Triangulate(p),l=0,n=i.length,y=[];for(r=1e7*Hull.findAlpha(i),t=0;t<n;t++)e=i[t],Math.sqrt((e.p1.x-e.p2.x)*(e.p1.x-e.p2.x)+(e.p1.y-e.p2.y)*(e.p1.y-e.p2.y))<r&&(y[l]=new Array(e.p1.id,e.p2.id,e.p1.x,e.p1.y,e.p2.x,e.p2.y),l+=1),Math.sqrt((e.p2.x-e.p3.x)*(e.p2.x-e.p3.x)+(e.p2.y-e.p3.y)*(e.p2.y-e.p3.y))<r&&(y[l]=new Array(e.p2.id,e.p3.id,e.p2.x,e.p2.y,e.p3.x,e.p3.y),l+=1),Math.sqrt((e.p3.x-e.p1.x)*(e.p3.x-e.p1.x)+(e.p3.y-e.p1.y)*(e.p3.y-e.p1.y))<r&&(y[l]=new Array(e.p3.id,e.p1.id,e.p3.x,e.p3.y,e.p1.x,e.p1.y),l+=1);y.sort(function(p,e){return p[0]-e[0]||p[1]-e[1]});var a=[];for(t=0;t<y.length;t++)a[t]=new Array(y[t][2],y[t][3]),a[t+1]=new Array(y[t][4],y[t][5]);var x=Hull.merge(a),o=[];if(x[1]!=undefined){if(x[1].length>x[0].length)for(t=0;t<x[1].length;t++)o[t]=new Array(x[1][t].X,x[1][t].Y);else for(t=0;t<x[0].length;t++)o[t]=new Array(x[0][t].X,x[0][t].Y);return o}for(t=0;t<x[0].length;t++)o[t]=new Array(x[0][t].X,x[0][t].Y);return o},merge:function(p){var e=[[]];for(i=0;i<p.length;i++)e[0][i]=new Hull.element(p[i][0],p[i][1]);var t=new ClipperLib.Clipper,r=100;t.StrictlySimple=!0,ClipperLib.JS.ScaleUpPaths(e,r),t.AddPaths(e,ClipperLib.PolyType.ptSubject,!0),t.AddPaths(e,ClipperLib.PolyType.ptClip,!0);var l=new ClipperLib.Paths,n=(t.Execute(ClipperLib.ClipType.ctUnion,l,ClipperLib.PolyFillType.pftEvenOdd,ClipperLib.PolyFillType.pftEvenOdd),1*r);l=ClipperLib.Clipper.CleanPolygons(l,n);return ClipperLib.JS.ScaleDownPaths(l,r),l},element:function(p,e){this.X=p,this.Y=e}}; 43Delaunay.InCircle=function(y,x,a,r){var t,n,b,e,u,M,h,s,i=Number.MIN_VALUE;if(Math.abs(x.y-a.y)<i&&Math.abs(a.y-r.y)<i)return!1;Math.abs(a.y-x.y)<i?(n=-(r.x-a.x)/(r.y-a.y),e=.5*(a.x+r.x),M=.5*(a.y+r.y),s=n*((h=.5*(a.x+x.x))-e)+M):Math.abs(r.y-a.y)<i?(t=-(a.x-x.x)/(a.y-x.y),b=.5*(x.x+a.x),u=.5*(x.y+a.y),s=t*((h=.5*(r.x+a.x))-b)+u):(t=-(a.x-x.x)/(a.y-x.y),n=-(r.x-a.x)/(r.y-a.y),b=.5*(x.x+a.x),e=.5*(a.x+r.x),u=.5*(x.y+a.y),s=t*((h=(t*b-n*e+(M=.5*(a.y+r.y))-u)/(t-n))-b)+u);var c=a.x-h,f=a.y-s,l=c*c+f*f;return(c=y.x-h)*c+(f=y.y-s)*f<=l}; 44Delaunay.Point=function(t,i){this.id,this.x=t,this.y=i},Delaunay.Point.prototype.distance=function(t){return Math.sqrt((t.x-this.x)*(t.x-this.x)+(t.y-this.y)*(t.y-this.y))},Delaunay.Point.prototype.equals2d=function(t){return this.x==t.x&&this.y==t.y}; 45Delaunay.Triangle=function(i,t,s){this.p1=i,this.p2=t,this.p3=s,this.center,this.mid0,this.mid1,this.mid2},Delaunay.Triangle.prototype.getCenter=function(){return null==this.center&&(center=new Delaunay.Point(0,0)),center.x=(this.p1.x+this.p2.x+this.p3.x)/3,center.y=(this.p1.y+this.p2.y+this.p3.y)/3,center},Delaunay.Triangle.prototype.getSidesCenters=function(){null!=this.mid0&&null!=this.mid1&&null!=this.mid2||(mid0=new Delaunay.Point(0,0),mid1=new Delaunay.Point(0,0),mid2=new Delaunay.Point(0,0)),this.mid0.x=this.p1.x+(this.p2.x-this.p1.x)/2,this.mid0.y=this.p1.y+(this.p2.y-this.p1.y)/2,this.mid1.x=this.p2.x+(this.p3.x-this.p2.x)/2,this.mid1.y=this.p2.y+(this.p3.y-this.p2.y)/2,this.mid2.x=this.p3.x+(this.p1.x-this.p3.x)/2,this.mid2.y=this.p3.y+(this.p1.y-this.p3.y)/2}; 46Delaunay.Triangulate=function(e){var n,a,l=e.length;if(l<3)return[];var p=4*l,i=e[0].x,u=e[0].y,r=i,g=u;for(n=1;n<l;n++)e[n].id=n,e[n].x<i&&(i=e[n].x),e[n].x>r&&(r=e[n].x),e[n].y<u&&(u=e[n].y),e[n].y>g&&(g=e[n].y);var h=r-i,t=g-u,s=h>t?h:t,y=.5*(r+i),d=.5*(g+u);e.push(new Delaunay.Point(y-2*s,d-s,l+1)),e.push(new Delaunay.Point(y,d+2*s,l+2)),e.push(new Delaunay.Point(y+2*s,d-s,l+3));var c=[];for(e[l].id=l,e[l+1].id=l+1,e[l+2].id=l+2,c.push(new Delaunay.Triangle(e[l],e[l+1],e[l+2])),n=0;n<l;n++){var o=[];for(a=0;a<c.length;a++)Delaunay.InCircle(e[n],c[a].p1,c[a].p2,c[a].p3)&&(o.push(new Delaunay.Edge(c[a].p1,c[a].p2)),o.push(new Delaunay.Edge(c[a].p2,c[a].p3)),o.push(new Delaunay.Edge(c[a].p3,c[a].p1)),c.splice(a,1),a--);if(!(n>=l)){for(a=o.length-2;a>=0;a--)for(var D=o.length-1;D>=a+1;D--)o[a].equals(o[D])&&(o.splice(D,1),o.splice(a,1),D--);for(a=0;a<o.length;a++)c.length>=p&&DEBUG.warning("Exceeded maximum edges"),c.push(new Delaunay.Triangle(o[a].p1,o[a].p2,e[n]));o=[]}}for(n=c.length-1;n>=0;n--)(c[n].p1.id>=l||c[n].p2.id>=l||c[n].p3.id>=l)&&c.splice(n,1);return e.splice(e.length-1,1),e.splice(e.length-1,1),e.splice(e.length-1,1),c.concat()}; 47!function(t,e){L.drawVersion="0.2.4-dev",L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes.",text:"Save"},cancel:{title:"Cancel editing, discards all changes.",text:"Cancel"}},buttons:{edit:"Edit layers.",editDisabled:"No layers to edit.",remove:"Delete layers.",removeDisabled:"No layers to delete."}},handlers:{edit:{tooltip:{text:"Drag handles, or marker to edit feature.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove"}}}}},L.Draw={},L.Draw.Feature=L.Handler.extend({includes:L.Mixin.Events,initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e)},enable:function(){this._enabled||(this.fire("enabled",{handler:this.t
47ype}),this._map.fire("draw:drawstart",{layerType:this.type}),L.Handler.prototype.enable.call(this))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire("draw:drawstop",{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire("draw:created",{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&this.disable()}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,showLength:!0,zIndexOffset:2e3},initialize:function(t,e){this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this).on("mouseup",this._onMouseUp,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mousemove",this._onMouseMove,this).off("zoomend",this._onZoomEnd,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=this._poly.spliceLatLngs(e.getLatLngs().length-1,1)[0];this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){return this._markers.length>0&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?void this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),void this._vertexChanged(t,!0))},_finishShape:function(){var t=this._poly.newLatLngIntersects(this._poly.getLatLngs()[0],!0);return!this.options.allowIntersection&&t||!this._shapeIsValid()?void this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),void(this.options.repeatMode&&this.enable()))},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._updateGuide()},_onMouseMove:function(t){var e=t.layerPoint,i=t.latlng;this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){var e=t.originalEvent;this._mouseDownOrigin=L.point(e.clientX,e.clientY)},_onMouseUp:function(e){if(this._mouseDownOrigin){var i=L.point(e.originalEvent.clientX,e.originalEvent.clientY).distanceTo(this._mouseDownOrigin);Math.abs(i)<9*(t.devicePixelRatio||1)&&this.addVertex(e.latlng)}
vendor: 11,256 bytes, line 47
47this._mouseDownOrigin=null},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers.length;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,a,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),r=this.options.guidelineDistance,n=this.options.maxGuideLineLength,l=s>n?s-n:r;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));s>l;l+=this.options.guidelineDistance)i=l/s,o={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(a=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(a,o)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;i>e;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var i,o,a=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=a-(e?2:1),o=t.distanceTo(this._markers[i].getLatLng()),this._measurementRunningTotal+=o*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=this._measurementRunningTotal+e.distanceTo(i),L.GeometryUtil.readableDistance(t,this.options.metric)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?t=L.drawLocal.draw.handlers.polygon.tooltip.cont:(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area;return t?L.GeometryUtil.readableArea(t,this.options.metric):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexAdded:function(){if(!this.options.allowIntersection&&this.options.showArea){var t=this._poly.getLatLngs();this._area=L.GeometryUtil.geodesicArea(t)}},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent({text:this._endLabelText}),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){this._shape?this._shape.setRadius(this._startLatLng.distanceTo(t)):(this._shape=new L.Circle(this._startLatLng,this._startLatLng.distanceTo(t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,o=this.options.showRadius,a=this.options.metric;this._tooltip.updatePosition(i),this._isDrawing&&(this._drawShape(i),e=this._shape.getRadius().toFixed(1),this._tooltip.updateContent({text:this._endLabelText,subtext:o?"Radius: "+L.GeometryUtil.readableDistance(e,a):""}))}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:L.drawLocal.draw.handlers.marker.tooltip.start}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._marker&&(this._marker.off("click",this._onClick,this),this._map.off("click",this._onClick,this).removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=new L.Marker(e,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset}),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_fireCreatedEvent:function(){var t=new L.Marker(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e){this._poly=t,L.setOptions(this,e)},addHooks:function(){this._poly._map&&(this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){this._poly._map&&(this._poly._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,o,a,s,r=this._poly._latlngs;for(t=0,i=r.length;i>t;t++)(o=this._createMarker(r[t],t)).on("click",this._onMarkerClick,this),this._markers.push(o);for(t=0,e=i-1;i>t;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(a=this._markers[e],s=this._markers[t],this._createMiddleMarker(a,s),this._updatePrevNext(a,s))},_createMarker:function(t,e){var i=new L.Marker(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("drag",this._onMarkerDrag,this),i.on("dragend",this._fireEdit,this),this._markerGroup.addLayer(i),i},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._poly.splice
vendor: 5,635 bytes, line 47
47LatLngs(e,1),this._updateIndexes(e,-1),t.off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("click",this._onMarkerClick,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit")},_onMarkerDrag:function(t){var e=t.target;L.extend(e._origLatLng,e._latlng),e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly.redraw()},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._poly._latlngs.length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},_createMiddleMarker:function(t,e){var i,o,a,s=this._getMiddleLatLng(t,e),r=this._createMarker(s);r.setOpacity(.6),t._middleRight=e._middleLeft=r,o=function(){var o=e._index;r._index=o,r.off("click",i,this).on("click",this._onMarkerClick,this),s.lat=r.getLatLng().lat,s.lng=r.getLatLng().lng,this._poly.spliceLatLngs(o,0,s),this._markers.splice(o,0,r),r.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,r),this._updatePrevNext(r,e),this._poly.fire("editstart")},a=function(){r.off("dragstart",o,this),r.off("dragend",a,this),this._createMiddleMarker(t,r),this._createMiddleMarker(r,e)},i=function(){o.call(this),a.call(this),this._fireEdit()},r.on("click",i,this).on("dragstart",o,this).on("dragend",a,this),this._markerGroup.addLayer(r)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,o=i.project(t.getLatLng()),a=i.project(e.getLatLng());return i.unproject(o._add(a)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"})},initialize:function(t,e){this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){this._shape._map&&(this._map=this._shape._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup))},removeHooks:function(){if(this._shape._map){this._unbindMarker(this._moveMarker);for(var t=0,e=this._resizeMarkers.length;e>t;t++)this._unbindMarker(this._resizeMarkers[t]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var i=new L.Marker(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw()},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;i>e;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target._cornerIndex;this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)},_onMarkerDragEnd:function(t){var e,i=t.target;i===this._moveMarker&&(e=this._shape.getBounds().getCenter(),i.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape.getLatLngs(),o=this._shape.getBounds().getCenter(),a=[],s=0,r=i.length;r>s;s++)e=[i[s].lat-o.lat,i[s].lng-o.lng],a.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(a),this._repositionCornerMarkers()},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter())},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest
47()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;i>e;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;i>e;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_move:function(t){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e),this._shape.setLatLng(t)},_resize:function(t){var e=this._moveMarker.getLatLng().distanceTo(t);this._shape.setRadius(e)}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,o=t.length;o>i;i++)e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,o=t.length,a=0,s=L.LatLng.DEG_TO_RAD;if(o>2){for(var r=0;o>r;r++)e=t[r],a+=((i=t[(r+1)%o]).lng-e.lng)*s*(2+Math.sin(e.lat*s)+Math.sin(i.lat*s));a=6378137*a*6378137/2}return Math.abs(a)},readableArea:function(t,e){var i;return e?i=t>=1e4?(1e-4*t).toFixed(2)+" ha":t.toFixed(2)+" m²":i=(t*=.836127)>=3097600?(t/3097600).toFixed(2)+" mi²":t>=4840?(t/4840).toFixed(2)+" acres":Math.ceil(t)+" yd²",i},readableDistance:function(t,e){var i;return e?i=t>1e3?(t/1e3).toFixed(2)+" km":Math.ceil(t)+" m":i=(t*=1.09361)>1760?(t/1760).toFixed(2)+" miles":Math.ceil(t)+" yd",i}}),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,o){return this._checkCounterclockwise(t,i,o)!==this._checkCounterclockwise(e,i,o)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,o)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,o=this._originalPoints,a=o?o.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=a-1;t>=3;t--)if(e=o[t-1],i=o[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._originalPoints,o=i?i.length:0,a=i?i[o-1]:null,s=o-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(a,t,s,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._originalPoints,i=e?e.length:0;return i+=t||0,!this._originalPoints||3>=i},_lineSegmentsIntersectsRange:function(t,e,i,o){var a,s,r=this._originalPoints;o=o||0;for(var n=i;n>o;n--)if(a=r[n-1],s=r[n],L.LineUtil.segmentsIntersect(t,e,a,s))return!0;return!1}}),L.Polygon.include({intersects:function(){var t,e,i,o,a=this._originalPoints;return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=a.length,e=a[0],i=a[t-1],o=t-2,this._lineSegmentsIntersectsRange(i,e,o,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e,i;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(i=new L.DrawToolbar(this.options.draw),e=L.stamp(i),this._toolbars[e]=i,this._toolbars[e].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(i=new L.EditToolbar(this.options.edit),e=L.stamp(i),this._toolbars[e]=i,this._toolbars[e].on("enable",this._toolbarEnabled,this))}
47,onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),o=!1,a="leaflet-draw-toolbar-top";for(var s in this._toolbars)this._toolbars.hasOwnProperty(s)&&((e=this._toolbars[s].addToolbar(t))&&(o||(L.DomUtil.hasClass(e,a)||L.DomUtil.addClass(e.childNodes[0],a),o=!0),i.appendChild(e)));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=""+L.stamp(t.target);for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&i!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({includes:[L.Mixin.Events],initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),o=0,a=this._toolbarClass||"",s=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<s.length;e++)s[e].enabled&&this._initModeHandler(s[e].handler,this._toolbarContainer,o++,a,s[e].title);return o?(this._lastButtonIndex=--o,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i):void 0},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;i>e;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,i,o,a){var s=t.type;this._modes[s]={},this._modes[s].handler=t,this._modes[s].button=this._createButton({title:a,className:o+"-"+s,container:e,callback:this._modes[s].handler.enable,context:this._modes[s].handler}),this._modes[s].buttonIndex=i,this._modes[s].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container);return e.href="#",t.text&&(e.innerHTML=t.text),t.title&&(e.title=t.title),L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,"click",t.callback,t.context),e},_disposeButton:function(t,e){L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,"click",e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,o,a,s=this._actionsContainer,r=this.getActions(t),n=r.length;for(i=0,o=this._actionButtons.length;o>i;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];s.firstChild;)s.removeChild(s.firstChild);for(var l=0;n>l;l++)"enabled"in r[l]&&!r[l].enabled||(e=L.DomUtil.create("li","",s),a=this._createButton({title:r[l].title,text:r[l].text,container:e,callback:r[l].callback,context:r[l].context}),this._actionButtons.push({button:a,callback:r[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block"},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom")}}),L.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1},dispose:function(){ 48this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.Dom
vendor: 5,032 bytes, line 48
48Util.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(i.style.visibility="inherit",L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this}}),L.DrawToolbar=L.Toolbar.extend({options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker}]},getActions:function(t){return[{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({options:{edit:{selectedPathOptions:{color:"#fe57a1",opacity:.6,dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1}},remove:{},featureGroup:null},initialize:function(t){t.edit&&("undefined"==typeof t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit=L.extend({},this.options.edit,t.edit)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(){return[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}]},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},includes:L.Mixin.Events,initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),this._selectedPathOptions=e.selectedPathOptions,this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.t
48ype}),this._map.fire("draw:editstart",{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire("draw:editstop",{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire("draw:edited",{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:t instanceof L.Marker&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):t instanceof L.Marker&&t.setLatLng(this._uneditedLayerProps[e].latlng))},_toggleMarkerHighlight:function(t){if(t._icon){var e=t._icon;e.style.display="none",L.DomUtil.hasClass(e,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(e,"leaflet-edit-marker-selected"),this._offsetMarker(e,-4)):(L.Dom
48Util.addClass(e,"leaflet-edit-marker-selected"),this._offsetMarker(e,4)),e.style.display=""}},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,o=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=o+"px"},_enableLayerEdit:function(t){var e,i=t.layer||t.target||t,o=i instanceof L.Marker;(!o||i._icon)&&(this._backupLayer(i),this._selectedPathOptions&&(e=L.Util.extend({},this._selectedPathOptions),o?this._toggleMarkerHighlight(i):(i.options.previousOptions=L.Util.extend({dashArray:null},i.options),i instanceof L.Circle||i instanceof L.Polygon||i instanceof L.Rectangle||(e.fill=!1),i.setStyle(e))),o?(i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd)):i.editing.enable())},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this)):e.editing.disable()},_onMarkerDragEnd:function(t){t.target.edited=!0},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},includes:L.Mixin.Events,initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire("draw:deletestart",{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire("draw:deletestop",{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.layerGroup,this._tooltip=new L.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t)},this)},save:function(){this._map.fire("draw:deleted",{layers:this._deletedLayers})},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e)},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document); 49L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),ipadicon:new L.DivIcon({iconSize:new L.Point(16,16),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(e,i){this._poly=e,L.setOptions(this,i)},addHooks:function(){this._poly._map&&(this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){this._poly._map&&(this._poly._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var e,i,t,r,n,a,o=this._poly._latlngs;for(e=0,t=o.length;e<t;e++)(r=this._createMarker(o[e],e)).on("click",this._onMarkerClick,this),this._markers.push(r);for(e=0,i=t-1;e<t;i=e++)(0!==e||L.Polygon&&this._poly instanceof L.Polygon)&&(n=this._markers[i],a=this._markers[e],this._createMiddleMarker(n,a),this._updatePrevNext(n,a))},_createMarker:function(e,i){if(-1!=navigator.platform.indexOf("iPad")){console.log("ipadhogs");var t=new L.Marker(e,{draggable:!0,icon:this.options.ipadicon})}else t=new L.Marker(e,{draggable:!0,icon:this.options.icon});return t._origLatLng=e,t._index=i,t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._fireEdit,this),this._markerGroup.addLayer(t),t},_removeMarker:function(e){var i=e._index;this._markerGroup.removeLayer(e),this._markers.splice(i,1),this._poly.splice
vendor: 10,417 bytes, lines 49-54
49LatLngs(i,1),this._updateIndexes(i,-1),e.off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("click",this._onMarkerClick,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit")},_onMarkerDrag:function(e){var i=e.target;L.extend(i._origLatLng,i._latlng),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw()},_onMarkerClick:function(e){var i=L.Polygon&&this._poly instanceof L.Polygon?4:3,t=e.target;this._poly._latlngs.length<i||(this._removeMarker(t),this._updatePrevNext(t._prev,t._next),t._middleLeft&&this._markerGroup.removeLayer(t._middleLeft),t._middleRight&&this._markerGroup.removeLayer(t._middleRight),t._prev&&t._next?this._createMiddleMarker(t._prev,t._next):t._prev?t._next||(t._prev._middleRight=null):t._next._middleLeft=null,this._fireEdit())},_updateIndexes:function(e,i){this._markerGroup.eachLayer(function(t){t._index>e&&(t._index+=i)})},_createMiddleMarker:function(e,i){var t,r,n,a=this._getMiddleLatLng(e,i),o=this._createMarker(a);o.setOpacity(.6),e._middleRight=i._middleLeft=o,r=function(){var r=i._index;o._index=r,o.off("click",t,this).on("click",this._onMarkerClick,this),a.lat=o.getLatLng().lat,a.lng=o.getLatLng().lng,this._poly.spliceLatLngs(r,0,a),this._markers.splice(r,0,o),o.setOpacity(1),this._updateIndexes(r,1),i._index++,this._updatePrevNext(e,o),this._updatePrevNext(o,i),this._poly.fire("editstart")},n=function(){o.off("dragstart",r,this),o.off("dragend",n,this),this._createMiddleMarker(e,o),this._createMiddleMarker(o,i)},t=function(){r.call(this),n.call(this),this._fireEdit()},o.on("click",t,this).on("dragstart",r,this).on("dragend",n,this),this._markerGroup.addLayer(o)},_updatePrevNext:function(e,i){e&&(e._next=i),i&&(i._prev=e)},_getMiddleLatLng:function(e,i){var t=this._poly._map,r=t.project(e.getLatLng()),n=t.project(i.getLatLng());return t.unproject(r._add(n)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}); 50L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"})},initialize:function(e,r){this._shape=e,L.Util.setOptions(this,r)},addHooks:function(){this._shape._map&&(this._map=this._shape._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup))},removeHooks:function(){if(this._shape._map){this._unbindMarker(this._moveMarker);for(var e=0,r=this._resizeMarkers.length;e<r;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(e,r){var i=new L.Marker(e,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(e){e.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this)},_unbindMarker:function(e){e.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this)},_onMarkerDragStart:function(e){e.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(e){var r=e.target,i=r.getLatLng();r===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw()},_onMarkerDragEnd:function(e){e.target.setOpacity(1),this._fireEdit()},_move:function(){},_resize:function(){}}); 51L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var e=this._shape.getLatLng();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var e=this._shape.getLatLng(),i=this._getResizeMarkerPoint(e);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(i,this.options.resizeIcon))},_getResizeMarkerPoint:function(e){var i=this._shape._radius*Math.cos(Math.PI/4),t=this._map.project(e);return this._map.unproject([t.x+i,t.y-i])},_move:function(e){var i=this._getResizeMarkerPoint(e);this._resizeMarkers[0].setLatLng(i),this._shape.setLatLng(e)},_resize:function(e){var i=this._moveMarker.getLatLng().distanceTo(e);this._shape.setRadius(i)}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}); 52L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var e=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(e,this.options.moveIcon)},_createResizeMarker:function(){var e=this._getCorners();this._resizeMarkers=[];for(var t=0,r=e.length;t<r;t++)this._resizeMarkers.push(this._createMarker(e[t],this.options.resizeIcon)),this._resizeMarkers[t]._cornerIndex=t},_onMarkerDragStart:function(e){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,e);var t=this._getCorners(),r=e.target._cornerIndex;this._oppositeCorner=t[(r+2)%4],this._toggleCornerMarkers(0,r)},_onMarkerDragEnd:function(e){var t,r=e.target;r===this._moveMarker&&(t=this._shape.getBounds().getCenter(),r.setLatLng(t)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,e)},_move:function(e){for(var t,r=this._shape.getLatLngs(),s=this._shape.getBounds().getCenter(),i=[],n=0,a=r.length;n<a;n++)t=[r[n].lat-s.lat,r[n].lng-s.lng],i.push([e.lat+t[0],e.lng+t[1]]);this._shape.setLatLngs(i),this._repositionCornerMarkers()},_resize:function(e){var t;this._shape.setBounds(L.latLngBounds(e,this._oppositeCorner)),t=this._shape.getBounds(),this._moveMarker.setLatLng(t.getCenter())},_getCorners:function(){var e=this._shape.getBounds();return[e.getNorthWest(),e.getNorthEast(),e.getSouthEast(),e.getSouthWest()]},_toggleCornerMarkers:function(e){for(var t=0,r=this._resizeMarkers.length;t<r;t++)this._resizeMarkers[t].setOpacity(e)},_repositionCornerMarkers:function(){for(var e=this._getCorners(),t=0,r=this._resizeMarkers.length;t<r;t++)this._resizeMarkers[t].setLatLng(e[t])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}); 53L.Draw={},L.Draw.Feature=L.Handler.extend({includes:L.Mixin.Events,initialize:function(e,t){this._map=e,this._container=e._container,this._overlayPane=e._panes.overlayPane,this._popupPane=e._panes.popupPane,t&&t.shapeOptions&&(t.shapeOptions=L.Util.extend({},this.options.shapeOptions,t.shapeOptions)),L.setOptions(this,t)},enable:function(){this._enabled||(this.fire("enabled",{handler:this.type}),this._map.fire("draw:drawstart",{layerType:this.type}),L.Handler.prototype.enable.call(this))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire("draw:drawstop",{layerType:this.type}),$(".leaflet-draw-draw-freehand-banner").slideToggle(),this.fire("disabled",{handler:this.type}))},addHooks:function(){var e=this._map;e&&(L.DomUtil.disableTextSelection(),e.getContainer().focus(),this._tooltip=new L.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(e){L.setOptions(this,e)},_fireCreatedEvent:function(e){this._map.fire("draw:created",{layer:e,layerType:this.type})},_cancelDrawing:function(e){27===e.keyCode&&this.disable()}}); 54L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,showLength:!0,zIndexOffset:2e3},initialize:function(t,e){this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this).on("mouseup",this._onMouseUp,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mousemove",this._onMouseMove,this).off("zoomend",this._onZoomEnd,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=this._poly.splice
vendor: 5,189 bytes, lines 54-55
54LatLngs(e.getLatLngs().length-1,1)[0];this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>0&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},_finishShape:function(){var t=this._poly.newLatLngIntersects(this._poly.getLatLngs()[0],!0);!this.options.allowIntersection&&t||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._updateGuide()},_onMouseMove:function(t){var e=t.layerPoint,i=t.latlng;this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){var e=t.originalEvent;this._mouseDownOrigin=L.point(e.clientX,e.clientY)},_onMouseUp:function(t){if(this._mouseDownOrigin){var e=L.point(t.originalEvent.clientX,t.originalEvent.clientY).distanceTo(this._mouseDownOrigin);Math.abs(e)<9*(window.devicePixelRatio||1)&&this.addVertex(t.latlng)}this._mouseDownOrigin=null},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers.length;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,o,r,s=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),n=this.options.guidelineDistance,a=this.options.maxGuideLineLength,h=s>a?s-a:n;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));h<s;h+=this.options.guidelineDistance)i=h/s,o={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(r=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(r,o)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var i,o,r=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=r-(e?2:1),o=t.distanceTo(this._markers[i].getLatLng()),this._measurementRunningTotal+=o*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=this._measurementRunningTotal+e.distanceTo(i),L.GeometryUtil.readableDistance(t,this.options.metric)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}); 55L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}}
55,initialize:function(t,i){L.Draw.Polyline.prototype.initialize.call(this,t,i),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,i;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?t=L.drawLocal.draw.handlers.polygon.tooltip.cont:(t=L.drawLocal.draw.handlers.polygon.tooltip.end,i=this._getMeasurementString()),{text:t,subtext:i}},_getMeasurementString:function(){var t=this._area;return t?L.GeometryUtil.readableArea(t,this.options.metric):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexAdded:function(){if(!this.options.allowIntersection&&this.options.showArea){var t=this._poly.getLatLngs();this._area=L.GeometryUtil.geodesicArea(t)}},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}); 56L.Freehand={},L.Draw.Freehand=L.Draw.Feature.extend({statics:{TYPE:"freehand"},options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),simplifyFunction:null,guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,showLength:!0,zIndexOffset:2e3},canvasLayer:undefined,initialize:function(t,e){this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Freehand.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},disable:function(t){this._map.dragging.enable(),this._map.removeLayer(this.canvasLayer),L.Draw.Feature.prototype.disable.call(this),this.temp!=undefined&&t==undefined&&L.Draw.Feature.prototype._fireCreatedEvent.call(this,this.temp)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this.temp=this.options.featureGroup.getLayers()[0],this.options.featureGroup.clearLayers();var t=L.CanvasLayer.extend({simplify:function(){},callbackTarget:undefined,points:[],_on_finger_move:function(t){this.findxy("drag",t)},_on_mouse_move:function(t){this.findxy("move",t)},_on_mouse_down:function(t){this.findxy("down",t)},_on_mouse_up:function(t){this.findxy("up",t)},render:function(){this.canvas=this.getCanvas(),this.ctx=this.canvas.getContext("2d");var t=this;this.canvas.addEventListener("mousemove",function(e){t._on_mouse_move(e)},!1),this.canvas.addEventListener("mousedown",function(e){t._on_mouse_down(e)},!1),this.canvas.addEventListener("mouseup",function(e){t._on_mouse_up(e)},!1),this.canvas.addEventListener("touchstart",function(e){e.preventDefault(),t._on_mouse_down(e)},!1),this.canvas.addEventListener("touchmove",function(e){t._on_mouse_move(e)},!1),this.canvas.addEventListener("touchend",function(e){t._on_mouse_up(e)},!1)},findxy:function(t,e){"up"==t&&this.callbackTarget.disable(!1),"down"==t&&this.pushPoints(e),"move"==t&&this.points.length>0&&(this.pushPoints(e),this.draw()),this.redraw(t,this.points)},pushPoints:function(t){if(t.touches==undefined)if(null==t.pageX&&null!=t.clientX){var e=document.documentElement,n=document.body,i=t.pageX=t.clientX+(e&&e.scrollLeft||n&&n.scrollLeft||0)-(e&&e.clientLeft||n&&n.clientLeft||0);i=t.pageY=t.clientY+(e&&e.scrollTop||n&&n.scrollTop||0)-(e&&e.clientTop||n&&n.clientTop||0)}else{i=t.pageX;var o=t.pageY}else i=t.touches[0].pageX,o=t.touches[0].pageY;var s=0,a=0,r=0,h=0,l=this._canvas;do{s+=l.offsetLeft-l.scrollLeft,a+=l.offsetTop-l.scrollTop}while(l=l.offsetParent);r=i-s-document.body.scrollLeft,h=o-a-document.body.scrollTop,this.points.push([r,h])},draw:function(){var t=this.points.length;this.extendPath(this.points[t-2][0],this.points[t-2][1],this.points[t-1][0],this.points[t-1][1])},extendPath:function(t,e,n,i){this.ctx.beginPath(),this.ctx.moveTo(t,e),this.ctx.lineTo(n,i),this.ctx.strokeStyle=this.options.shapeOptions.color,this.ctx.lineWidth=this.options.shapeOptions.weight,this.ctx.stroke(),this.ctx.closePath()},redraw:function(t,e){"up"==t&&(e=this.finishLine(e),this.drawPolygon(this.simplify(this.properRDP(e,1))),this.callbackTarget.disable(!0))},properRDP:function(t,e){var n=t[0],i=t[t.length-1];if(t.length<3)return t;for(var o=-1,s=0,a=1;a<t.length-1;a++){var r=this.findPerpendicularDistance(t[a],n,i);r>s&&(s=r,o=a)}if(s>e){var h=t.slice(0,o+1),l=t.slice(o),c=this.properRDP(h,e),p=this.properRDP(l,e);return c.slice(0,c.length-1).concat(p)}return[n,i]},findPerpendicularDistance:function(t,e,n){var i,o,s;return e[0]==n[0]?i=Math.abs(t[0]-e[0]):(o=(n[1]-e[1])/(n[0]-e[0]),s=e[1]-o*e[0],i=Math.abs(o*t[0]-t[1]+s)/Math.sqrt(Math.pow(o,2)+1)),i},finishLine:function(t){for(var e=t.length,n=t[0][0],i=t[0][1],o=t[e-1][0],s=t[e-1][1],a=10,r=(n-o)/a,h=(i-s)/a,l=e;l<e+a;l++)t[l]=new Array(Math.floor(o+r*(l-(e-1))),Math.floor(s+h*(l-(e-1))));return t},drawPolygon:function(t){for(var e=[],n=0;t.length>20;)t=this.properRDP(t,5+n),n++;for(n=1;n<t.length;n++){var i=new L.Point(t[n-1][0],t[n-1][1]),o=this._map.containerPointToLatLng(i);e[n-1]=new L.LatLng(o.lat,o.lng)}polygon=new L.Polygon(e),L.Draw.Feature.prototype._fireCreatedEvent.call(this,polygon),this._map.dragging.enable()}});this._map.dragging.disable(),this.canvasLayer=new t,null!=this.options.simplifyFunction&&(this.canvasLayer.simplify=this.options.simplifyFunction),this.canvasLayer.options=this.options,this.canvasLayer.callbackTarget=this,this.canvasLayer.addTo(this._map)}}); 57L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this),L.DomEvent.off(document,"mouseup",this._onMouseUp,this),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(document,"mouseup",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent({text:this._endLabelText}),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}); 58L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0}},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)}}); 59L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#f06eaa",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0},initialize:function(t,i){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,i)},_drawShape:function(t){this._shape?this._shape.setRadius(this._startLatLng.distanceTo(t)):(this._shape=new L.Circle(this._startLatLng,this._startLatLng.distanceTo(t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var i,e=t.latlng,a=this.options.showRadius,s=this.options.metric;this._tooltip.updatePosition(e),this._isDrawing&&(this._drawShape(e),i=this._shape.getRadius().toFixed(1),this._tooltip.updateContent({text:this._endLabelText,subtext:a?"Radius: "+L.GeometryUtil.readableDistance(i,s):""}))}}); 60L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(e,t){this.type=L.Draw.Marker.TYPE,L.Draw.Feature.prototype.initialize.call(this,e,t)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:L.drawLocal.draw.handlers.marker.tooltip.start}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._marker&&(this._marker.off("click",this._onClick,this),this._map.off("click",this._onClick,this).removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(e){var t=e.latlng;this._tooltip.updatePosition(t),this._mouseMarker.setLatLng(t),this._marker?(t=this._mouseMarker.getLatLng(),this._marker.setLatLng(t)):(this._marker=new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset}),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_fireCreatedEvent:function(){var e=new L.Marker(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,e)}}); 61L.LatLngUtil={cloneLatLngs:function(n){for(var t=[],L=0,l=n.length;L<l;L++)t.push(this.cloneLatLng(n[L]));return t},cloneLatLng:function(n){return L.latLng(n.lat,n.lng)}}; 62L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(e){var t,a,i=e.length,n=0,r=L.LatLng.DEG_TO_RAD;
62if(i>2){for(var l=0;l<i;l++)t=e[l],n+=((a=e[(l+1)%i]).lng-t.lng)*r*(2+Math.sin(t.lat*r)+Math.sin(a.lat*r));n=6378137*n*6378137/2}return Math.abs(n)},readableArea:function(e,t){return t?e>=1e4?(1e-4*e).toFixed(2)+" ha":e.toFixed(2)+" m²":(e*=.836127)>=3097600?(e/3097600).toFixed(2)+" mi²":e>=4840?(e/4840).toFixed(2)+" acres":Math.ceil(e)+" yd²"},readableDistance:function(e,t){return t?e>1e3?(e/1e3).toFixed(2)+" km":Math.ceil(e)+" m":(e*=1.09361)>1760?(e/1760).toFixed(2)+" miles":Math.ceil(e)+" yd"}}); 63L.Util.extend(L.LineUtil,{segmentsIntersect:function(e,c,t,n){return this._checkCounterclockwise(e,t,n)!==this._checkCounterclockwise(c,t,n)&&this._checkCounterclockwise(e,c,t)!==this._checkCounterclockwise(e,c,n)},_checkCounterclockwise:function(e,c,t){return(t.y-e.y)*(c.x-e.x)>(c.y-e.y)*(t.x-e.x)}}); 64L.Polyline.include({intersects:function(){var t,n,e,i=this._originalPoints,r=i?i.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=r-1;t>=3;t--)if(n=i[t-1],e=i[t],this._lineSegmentsIntersectsRange(n,e,t-2))return!0;return!1},newLatLngIntersects:function(t,n){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),n)},newPointIntersects:function(t,n){var e=this._originalPoints,i=e?e.length:0,r=e?e[i-1]:null,
64s=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(r,t,s,n?1:0)},_tooFewPointsForIntersection:function(t){var n=this._originalPoints,e=n?n.length:0;return e+=t||0,!this._originalPoints||e<=3},_lineSegmentsIntersectsRange:function(t,n,e,i){var r,s,o=this._originalPoints;i=i||0;for(var a=e;a>i;a--)if(r=o[a-1],s=o[a],L.LineUtil.segmentsIntersect(t,n,r,s))return!0;return!1}}); 65L.Polygon.include({intersects:function(){var t,e,n,i,s=this._originalPoints;return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=s.length,e=s[0],n=s[t-1],i=t-2,this._lineSegmentsIntersectsRange(n,e,i,1)))}}); 66L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(o){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var t,a;L.Control.prototype.initialize.call(this,o),this._toolbars={},L.DrawToolbar&&this.options.draw&&(a=new L.DrawToolbar(this.options.draw),t=L.stamp(a),this._toolbars[t]=a,this._toolbars[t].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(a=new L.EditToolbar(this.options.edit),t=L.stamp(a),this._toolbars[t]=a,this._toolbars[t].on("enable",this._toolbarEnabled,this))},onAdd:function(o){var t,a=L.DomUtil.create("div","leaflet-draw"),r=!1,i="leaflet-draw-toolbar-top";for(var s in this._toolbars)this._toolbars.hasOwnProperty(s)&&(t=this._toolbars[s].addToolbar(o))&&(r||(L.DomUtil.hasClass(t,i)||L.DomUtil.addClass(t.childNodes[0],i),r=!0),a.appendChild(t));return a},onRemove:function(){for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&this._toolbars[o].removeToolbar()},setDrawingOptions:function(o){for(var t in this._toolbars)this._toolbars[t]instanceof L.DrawToolbar&&this._toolbars[t].setOptions(o)},_toolbarEnabled:function(o){var t=""+L.stamp(o.target);for(var a in this._toolbars)this._toolbars.hasOwnProperty(a)&&a!==t&&this._toolbars[a].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}); 67L.Control.Title=L.Control.Draw.extend({options:{position:"topleft",deleteText:"Sketch-A-Map"},onAdd:function(){var e=L.DomUtil.create("div","leaflet-control-title");L.DomUtil.create("div","leaflet-help-banner");L.DomEvent.addListener(e,"click",L.DomEvent.stopPropagation).addListener(e,"click",L.DomEvent.preventDefault);var t=L.DomUtil.create("div","leaflet-control-title-interior",e);return t.title="Draw an area.",t.innerHTML="Sketch-a-Search",e}}); 68L.Toolbar=L.Class.extend({includes:[L.Mixin.Events],initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var o,e=L.DomUtil.create("div","leaflet-draw-section"),i=0,a=this._toolbarClass||"",n=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,o=0;o<n.length;o++)n[o].enabled&&this._initModeHandler(n[o].handler,this._toolbarContainer,i++,a,n[o].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),e.appendChild(this._toolbarContainer),e.appendChild(this._actionsContainer),e},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var o=0,e=this._actionButtons.length;o<e;o++)this._disposeButton(this._actionButtons[o].button,this._actionButtons[o].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,o,e,i,a){var n=t.type;this._modes[n]={},this._modes[n].handler=t,this._modes[n].button=this._createButton({title:a,className:i+"-"+n,id:5,container:o,callback:this._modes[n].handler.enable,context:this._modes[n].handler,text:this.options.text}),this._modes[n].buttonIndex=e,this._modes[n].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_createButton:function(t){var o=L.DomUtil.create("a",t.className||"",t.container);return o.href="#",t.text&&("leaflet-draw-edit-edit"==t.className?o.innerHTML="Edit":"leaflet-draw-edit-edit"==t.className?o.innerHTML="Delete":o.innerHTML=t.text),t.title&&(o.title=t.title),L.DomEvent.on(o,"click",L.DomEvent.stopPropagation).on(o,"click",function(){on=!0;var t="."+this.className.split(" ")[0]+"-banner";$(t).slideToggle(),$(t).siblings().slideToggle}).on(o,"mousedown",L.DomEvent.stopPropagation).on(o,"dblclick",L.DomEvent.stopPropagation).on(o,"click",L.DomEvent.preventDefault).on(o,"click",t.callback,t.context),o},_disposeButton:function(t,o){L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,"click",o)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var o,e,i,a,n=this._actionsContainer,s=this.getActions(t),l=s.length;for(e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback);for(this._actionButtons=[];n.firstChild;)n.removeChild(n.firstChild);for(var d=0;d<l;
vendor: 7,010 bytes, lines 68-72
68d++)"enabled"in s[d]&&!s[d].enabled||(o=L.DomUtil.create("li","",n),a=this._createButton({title:s[d].title,text:s[d].text,container:o,callback:s[d].callback,context:s[d].context}),this._actionButtons.push({button:a,callback:s[d].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,o=this._lastButtonIndex,e=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=e+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===o&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block"},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom")}}); 69L.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1},dispose:function(){this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",this):this},updatePosition:function(t){var i=this._map.latLngToLayerPoint(t),e=this._container;return this._container&&(e.style.visibility="inherit",L.DomUtil.setPosition(e,i)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this}}); 70L.DrawToolbar=L.Toolbar.extend({options:{polyline:!1,polygon:!1,rectangle:!1,circle:!1,marker:!1,freehand:{},text:"Draw"},initialize:function(t){for(var o in this.options)this.options.hasOwnProperty(o)&&t[o]&&(t[o]=L.extend({},this.options[o],t[o]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.freehand,handler:new L.Draw.Freehand(t,this.options.freehand),title:L.drawLocal.draw.toolbar.buttons.freehand},{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker}]},getActions:function(t){return[{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var o in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(o)&&t.hasOwnProperty(o)&&this._modes[o].handler.setOptions(t[o])}}); 71L.EditToolbar=L.Toolbar.extend({options:{text:"Edit",edit:{selectedPathOptions:{color:"#fe57a1",opacity:.6,dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1}},remove:!0,text:"Delete",featureGroup:null},initialize:function(t){t.edit&&("undefined"==typeof t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit=L.extend({},this.options.edit,t.edit)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(){return[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}]},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}); 72L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},options:{text:"Delete"},includes:L.Mixin.Events,initialize:function(e,t){if(L.Handler.prototype.initialize.call(this,e),L.Util.setOptions(this,t),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.t
72ype}),this._map.fire("draw:deletestart",{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&($(".leaflet-draw-actions-bottom").show(),this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire("draw:deletestop",{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var e=this._map;$(".leaflet-draw-actions-bottom").hide(),e&&(e.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.layerGroup,this._tooltip=new L.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(e){this._deletableLayers.addLayer(e)},this)},save:function(){this._map.fire("draw:deleted",{layers:this._deletedLayers})},_enableLayerDelete:function(e){(e.layer||e.target||e).on("click",this._removeLayer,this)},_disableLayerDelete:function(e){var t=e.layer||e.target||e;t.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(t)},_removeLayer:function(e){var t=e.layer||e.target||e;this._deletableLayers.removeLayer(t),this._deletedLayers.addLayer(t),this._map.fire("draw:deleted",{layers:this._deletedLayers}),this.disable()},_onMouseMove:function(e){this._tooltip.updatePosition(e.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}}); 73L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},includes:L.Mixin.Events,initialize:function(e,t){if(L.Handler.prototype.initialize.call(this,e),this._selectedPathOptions=t.selectedPathOptions,this._featureGroup=t.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire("draw:editstart",{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire("draw:editstop",{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var e=this._map;e&&(e.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._featureGroup.eachLayer(function(e){this._revertLayer(e)},this)},save:function(){var e=new L.LayerGroup;this._featureGroup.eachLayer(function(t){t.edited&&(e.addLayer(t),t.edited=!1)}),this._map.fire("draw:edited",{layers:e})},_backupLayer:function(e){var t=L.Util.stamp(e);this._uneditedLayerProps[t]||(e instanceof L.Polyline||e instanceof L.Polygon||e instanceof L.Rectangle?this._uneditedLayerProps[t]={latlngs:L.LatLngUtil.cloneLatLngs(e.getLatLngs())}:e instanceof L.Circle?this._uneditedLayerProps[t]={latlng:L.LatLngUtil.cloneLatLng(e.getLatLng()),radius:e.getRadius()}:e instanceof L.Marker&&(this._uneditedLayerProps[t]={latlng:L.LatLngUtil.cloneLatLng(e.getLatLng())}))},_revertLayer:function(e){var t=L.Util.stamp(e);e.edited=!1,$(".leaflet-draw-edit-edit-banner").slideToggle(),this._uneditedLayerProps.hasOwnProperty(t)&&(e instanceof L.Polyline||e instanceof L.Polygon||e instanceof L.Rectangle?e.setLatLngs(this._uneditedLayerProps[t].latlngs):e instanceof L.Circle?(e.setLatLng(this._uneditedLayerProps[t].latlng),e.setRadius(this._uneditedLayerProps[t].radius)):e instanceof L.Marker&&e.setLatLng(this._uneditedLayerProps[t].latlng))},_toggleMarkerHighlight:function(e){if(e._icon){var t=e._icon;t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.Dom
73Util.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display=""}},_offsetMarker:function(e,t){var i=parseInt(e.style.marginTop,10)-t,a=parseInt(e.style.marginLeft,10)-t;e.style.marginTop=i+"px",e.style.marginLeft=a+"px",console.log(e.style.marginTop)},_enableLayerEdit:function(e){var t,i=e.layer||e.target||e,a=i instanceof L.Marker;a&&!i._icon||(this._backupLayer(i),this._selectedPathOptions&&(t=L.Util.extend({},this._selectedPathOptions),a?this._toggleMarkerHighlight(i):(i.options.previousOptions=L.Util.extend({dashArray:null},i.options),i instanceof L.Circle||i instanceof L.Polygon||i instanceof L.Rectangle||(t.fill=!1),i.setStyle(t))),a?(i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd)):i.editing.enable())},_disableLayerEdit:function(e){var t=e.layer||e.target||e;t.edited=!1,this._selectedPathOptions&&(t instanceof L.Marker?this._toggleMarkerHighlight(t):(t.setStyle(t.options.previousOptions),delete t.options.previousOptions)),t instanceof L.Marker?(t.dragging.disable(),t.off("dragend",this._onMarkerDragEnd,this)):t.editing.disable()},_onMarkerDragEnd:function(e){e.target.edited=!0},_onMouseMove:function(e){this._tooltip.updatePosition(e.latlng)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}); 74 75!function(){"use strict";var e=function(e){return(e="number"==typeof e?{precision:e}:e||{}).precision=e.precision||5,e.factor=e.factor||Math.pow(10,e.precision),e.dimension=e.dimension||2,e},n={encode:function(n,o){o=e(o);for(var r=[],t=0,i=n.length;t<i;++t){var d=n[t];if(2===o.dimension)r.push(d.lat||d[0]),r.push(d.lng||d[1]);else for(var c=0;c<o.dimension;++c)r.push(d[c])}return this.encodeDeltas(r,o)},decode:function(n,o){o=e(o);for(var r=this.decodeDeltas(n,o),t=[],i=0,d=r.length;i+(o.dimension-1)<d;){for(var c=[],s=0;s<o.dimension;++s)c.push(r[i++]);t.push(c)}return t},encodeDeltas:function(n,o){o=e(o);for(var r=[],t=0,i=n.length;t<i;)for(var d=0;d<o.dimension;++d,++t){var c=n[t],s=c-(r[d]||0);r[d]=c,n[t]=s}return this.encodeFloats(n,o)},decodeDeltas:function(n,o){o=e(o);for(var r=[],t=this.decodeFloats(n,o),i=0,d=t.length;i<d;)for(var c=0;c<o.dimension;++c,++i)t[i]=r[c]=t[i]+(r[c]||0);return t},encodeFloats:function(n,o){o=e(o);for(var r=0,t=n.length;r<t;++r)n[r]=Math.round(n[r]*o.factor);return this.encodeSignedIntegers(n)},decodeFloats:function(n,o){o=e(o);for(var r=this.decodeSignedIntegers(n),t=0,i=r.length;t<i;++t)r[t]/=o.factor;return r},encodeSignedIntegers:function(e){for(var n=0,o=e.length;n<o;++n){var r=e[n];e[n]=r<0?~(r<<1):r<<1}return this.encodeUnsignedIntegers(e)},decodeSignedIntegers:function(e){for(var n=this.decodeUnsignedIntegers(e),o=0,r=n.length;o<r;++o){var t=n[o];n[o]=1&t?~(t>>1):t>>1}return n},encodeUnsignedIntegers:function(e){for(var n="",o=0,r=e.length;o<r;++o)n+=this.encodeUnsignedInteger(e[o]);return n},decodeUnsignedIntegers:function(e){for(var n=[],o=0,r=0,t=0,i=e.length;t<i;++t){var d=e.charCodeAt(t)-63;o|=(31&d)<<r,d<32?(n.push(o),o=0,r=0):r+=5}return n},encodeSignedInteger:function(e){return e=e<0?~(e<<1):e<<1,this.encodeUnsignedInteger(e)},encodeUnsignedInteger:function(e){for(var n,o="";e>=32;)n=63+(32|31&e),o+=String.fromCharCode(n),e>>=5;return n=e+63,o+=String.fromCharCode(n)}};if("object"==typeof module&&"object"==typeof module.exports&&(module.exports=n),"object"==typeof L){L.Polyline.prototype.fromEncoded||(L.Polyline.fromEncoded=function(e,o){return new L.Polyline(n.decode(e),o)}),L.Polygon.prototype.fromEncoded||(L.Polygon.fromEncoded=function(e,o){return new L.Polygon(n.decode(e),o)});var o={encodePath:function(){return n.encode(this.getLatLngs())}};L.Polyline.prototype.encodePath||L.Polyline.include(o),L.Polygon.prototype.encodePath||L.Polygon.include(o),L.PolylineUtil=n}}(); 76(function(){var e=[].slice;window.typeIsArray=function(e){return e&&"object"==typeof e&&e instanceof Array&&"number"==typeof e.length&&"function"==typeof e.splice&&!e.propertyIsEnumerable("length")},window.Ctesius={Models:{},Collections:{},Views:{},Routers:{},config:{},user:null,events:{},getCurrentFlashMessage:function(){return null!=this.flash?this.flash:this.flash=new Ctesius.Models.Flash},resetAll:function(){return this.search=void 0,this.user=void 0,this.savedPropertiesCollection=void 0,this.groupsCollection=void 0,this.search=void 0,this.router=void 0},getSearch:function(){var e,t;return null!=this.search?this.search:(this.search=Ctesius.Models.SearchBuilder.parseFragment(window.location.pathname),t=this.getConfig("place"),null!=(e=this.getConfig("branch")?this.getConfig("branch").branch_id:this.getConfig("branch_id"))&&this.search.set("branch_id",e),null!=t&&this.search.set("place",new Ctesius.Models.Place(t)),this.search)},createBookingCalendar:function(){var e;return e=new Ctesius.Models.BookingCalendar,new Ctesius.Views.BookingCalendar({model:e})},createBookingCalendarModal:function(){var e;return e=new Ctesius.Models.BookingCalendar,new Ctesius.Views.BookingCalendar({model:e,asModal:!0})},getOrCreateSmallMapView:function(){return null!=this.smallMapView?this.smallMapView:Ctesius.getPathManager().isPath("property_show")?this.smallMapView=new Ctesius.Views.Map({model:this.getProperty()}):this.smallMapView=new Ctesius.Views.Map({collection:Ctesius.getPropertiesCollection()})},getOrCreateBranchMapView:function(){return null!=this.branchMapView?this.branchMapView:null!=this.getConfig("branches")?this.branchMapView=new Ctesius.Views.BranchMap({collection:Ctesius.getBranchesCollection(this.getConfig("branches").branches)}):void 0},getPathManager:function(){return this.path_manager},getUser:function(){return this.user},bootUser:function(e){return Ctesius.Models.User.boot((t=this,function(r){return t.user=r,e(t.user)}));var t},getProperty:function(){return null!=this.property?this.property:this.property=Ctesius.Models.Property.boot
76()},getSavedSearchesCollection:function(){return null!=this.savedSearchesCollection?this.savedSearchesCollection:this.savedSearchesCollection=Ctesius.Collections.SavedSearches.boot()},getGroupsCollection:function(){return null!=this.groupsCollection?this.groupsCollection:this.groupsCollection=Ctesius.Collections.Groups.boot()},getIntestingPropertiesCollection:function(){return null!=this.intestingPropertiesCollection?this.intestingPropertiesCollection:this.intestingPropertiesCollection=Ctesius.Collections.InterestingProperties.boot(this.getSavedPropertiesCollection(),this.getUserHistoryCollection(),this.getSavedSearchesCollection())},getUserHistoryCollection:function(){return null!=this.userHistoryCollection?this.userHistoryCollection:this.userHistoryCollection=Ctesius.Collections.UserHistory.boot()},getUserPropertyHistoryCollection:function(){return null!=this.userPropertyHistoryCollection?this.userPropertyHistoryCollection:this.userPropertyHistoryCollection=Ctesius.Collections.UserPropertyHistory.boot()},getSavedPropertiesCollection:function(){return null!=this.savedPropertiesCollection?this.savedPropertiesCollection:this.savedPropertiesCollection=Ctesius.Collections.SavedProperties.boot()},getPropertiesCollection:function(){return null!=this.propertiesCollection?this.propertiesCollection:this.bootPropertiesCollection(this.getConfig("properties"))},boot:function(){},inBrowserStorageEnabled:function(){try{if("undefined"!=typeof window.localStorage)return window.localStorage.setItem("testLocalStorage","success"),window.localStorage.removeItem("testLocalStorage"),!0}catch(e){return e,!1}},init:function(){return this.path_manager=new Ctesius.PathManager,this.startBootAt=(new Date).getTime(),L.Icon.Default.imagePath=Ctesius.getConfig("root_url")+"assets/leaflet",this.getConfig("enable_user_history")&&this.inBrowserStorageEnabled()&&(Ctesius.getUserHistoryCollection(),Ctesius.getGroupsCollection(),(Ctesius.getPathManager().isPath("search_page")||Ctesius.getPathManager().isPath("global_search_page"))&&Ctesius.getUserHistoryCollection().addSearch(this.getSearch()),Ctesius.getUserPropertyHistoryCollection(),Ctesius.getPathManager().isPath("property_show")&&Ctesius.getUserPropertyHistoryCollection().addProperty(this.getProperty())),this.getConfig("enable_infinite_scroll")&&Ctesius.Models.InfiniteScroll.init(),this.getConfig("enable_article_infinite_scroll")&&Ctesius.Models.ArticleInfiniteScroll.init(),this.bootUser((e=this,function(){return e.bootPropertiesCollection(e.getConfig("properties")),e.getSavedPropertiesCollection(),e.getSavedPropertiesCollection().fetch(),e.getSavedSearchesCollection(),e.getSavedSearchesCollection().fetch(),e.getGroupsCollection(),e.getGroupsCollection().fetch(),e.getOrCreateSmallMapView(),e.getOrCreateBranchMapView(),Ctesius.Models.SearchPresenter.configureForm(e.getSearch()),e.getConfig("enable_user_history")&&e.inBrowserStorageEnabled()&&(e.getIntestingPropertiesCollection(),Ctesius.Collections.InterestingBranches.boot(e.getUserHistoryCollection(),e.getSavedSearchesCollection())),e.router=new Ctesius.Router,Backbone.history.start()}));var e},bootPropertiesCollection:function(e){return this.propertiesCollection=new Ctesius.Collections.Properties(e)},bootGeoFeaturesCollection:function(e){return this.geofeaturesCollection=new Ctesius.Collection.GeoFeatures(e)},bootLocalBusinessDataCollection:function(e){return this.localBusinessDataCollection=new Ctesius.Collection.LocalBusinessData(e)},getBranchesCollection:function(e){return null==e&&this.getConfig("branches")&&(e=this.getConfig("branches").branches),this.branchesCollection=new Ctesius.Collections.Branches(e)},defaultConfig:{flash_message_success:"Success!",flash_message_warning:"Warning!",root_url:"/",enable_draw_a_map:!1,pin_clustering:!1,skip_polygon:!0,hide_place_from_form:!0,minimum_interesting_properties:1,sales_price_dropdown_list:"",lettings_price_dropdown_list:"",properties_list_view:"properties_list_view",draggable_map_view:"draggable_map_view",togglable_list:"togglable_list",draggable_map_toggle_view:"draggable_map_toggle_view",properties_grid_toggle_view:"properties_grid_toggle_view",permit_blank_searches:!1,default_channel:"sales",disable_autocomplete:!1,autoscroll_infinite_scroll:!0,buffer_adjust:0,enable_interesting_branches:!1,leaflet_layer:new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"Map data \xa9 OpenStreetMap contributors"}
76),"flash-message-welcome-lead-sent-new-user":"Thank you. We have sent your message and created you an account.","flash-message-welcome-lead-sent":"Thank you. We have sent your message.","flash-message-lead-sending-error":"There was an error sending your message - please try again later.","flash-message-file-upload-error":"There was an error uploading your attachment - please try again in a minute.","flash-message-location-not-found":"Sorry, we couldn't find that location.","flash-message-agent-or-location-not-found":"Sorry we couldn't find that agent or location","flash-message-lead-sending-error-validation":"Sorry, we couldn't create your lead. Only alphanumeric characters are allowed for First and Last name.","flash-message-send-property-sent":"This property has been shared successfully!","flash-message-send-property-invalid":"There was an error trying to share this property.","flash-message-user-create-dupe":"There is already a user with that email address registered.","flash-message-user-create-successful":"You have registered successfully and been logged in.","flash-message-user-login-successful":"You have been logged in successfully!","flash-message-user-create-error":"There was an error in registering you with the agent.","flash-message-names-not-different":"First name and last name must be different.","flash-message-search-query-required":"Please enter a search query.","flash-message-article-not-found-error":"Sorry, we could not find this article","flash-message-recaptcha-invalid":"There was an error sending your message - please try again later.","flash-message-invalid-authenticity-token":"There was an error sending your message - please try again later.","flash-message-invalid-message-content":"Your message contains illegal content. Please submit again.","flash-message-password-invalid":"The password you have specified is invalid. Make sure it is alphanumeric and contains more than 5 characters.","flash-message-postcode-invalid":"The postcode supplied seems to be invalid. Please try again","flash-message-site-not-live":"<span>This website needs to be activated. Please contact Homeflow.</span>","flash-message-invalid-password-reset-link":"Sorry, that password reset link is not valid.","flash-message-password-reset-link-invalid":"That password reset link is not valid.",polygon_color:"#0033ff",polygon_fill_color:"#0033ff",no_draw_map_alert:"Draw a Search Disabled",autopan_padding:[5,5],pop_up_on_mouseover:!1,instant_delete_polygon:!1,get_geo_features:!1,local_business_data:!1,enable_scroll_wheel_zoom:!1,default_saved_search_attrs:{alert_frequency:"I"},free_text_search:!1,sales_preposition:"for sale",lettings_preposition:"to let"},addConfig:function(e,t){return this.config[e]=t},removeConfig:function(e){return this.config[e]=void 0},clearEvents:function(){return this.events={}},getConfig:function(e){return null!=this.config[e]?this.config[e]:this.defaultConfig[e]},appendConfig:function(e,t){var r,s,o,n;if(!t||!e)return null;for(o=[],r=0,s=t.length;r<s;r++)n=t[r],o.push(this.config[e].push(n));return o},hasEvent:function(e){return null!=this.events[e]},registerEvent:function(e,t,r){var s;return null!=this.events[e]?(null==r||(s=!1,_.each(this.events[e],function(e){if(null!=e.lock&&e.lock===r)return s=!0}),!s))&&this.events[e].push({"function":t,lock:r}):this.events[e]=[{"function":t,lock:r}]},registerEvents:function(e,t,r){var s,o,n,i;for(i=[],s=0,n=e.length;s<n;s++)o=e[s],i.push(this.registerEvent(o,t,r));return i},removeEvent:function(e){return this.events[e]=void 0},getEvent:function(e){return this.events[e]},kickEvent:function(){var t,r,s;if(s=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],null!=(r=this.getEvent(s)))return _.each(r,function(e){return e["function"].apply(e,t)})},searchFromFragment:function(e){var t;return t=e.fragment?"/properties/"+e.channel+"/"+e.fragment+".ljson?page_size="+e.limit:"/properties/"+e.channel+".ljson?page_size="+e.limit,$.getJSON(t,function(t){var r;return"liquid"===e.templateType?(r=Ctesius.Template.load(e.templateId),$(e.container).html(r.render({properties:t.properties}))):(r=_.template($("#"+e.templateId).html()),$(e.container).html(r({properties:t.properties})))})},freshToMarketSortedByAltcode:function(e){var t;return t="/featured_properties_by_altcode/sales",$.getJSON(t,function(t){var r,s;if(s=_.template($("#"+e.templateId).html()),$(e.container).html(s({properties:t.properties})),null!=t.properties)return r=t.properties.map(function(e){return e.property_id}
76),Ctesius.Actions.postBulkPropertyExposureCreation("SearchResult",r)})}},Ctesius.Actions={geoLocate:function(e){if(e=e||$("input#location"),"undefined"!=typeof navigator&&null!==navigator&&null!=navigator.geolocation)return navigator.geolocation.getCurrentPosition(function(t){var r;return r=Ctesius.getConfig("root_url")+"places?near="+t.coords.longitude+","+t.coords.latitude,$.get(r,function(t){if((t=JSON.parse(t)).length>0)return Ctesius.getSearch().set("place",new Ctesius.Models.Place({place_id:t[0][1]})),e.val(t[0][0])})},function(){return alert("We're sorry - On this occasion we were unable to identify your location from your internet connection. Please type your area into the search box.")},{maximumAge:1e16,timout:1e4})},propertyExposure:function(){return null},propertyView:function(){return null},postPropertyView:function(e){var t;return t=document.domain,$.ajax({method:"post",dataType:"json",crossDomain:!0,url:"/property_views",data:{property_id:e,domain:t},timeout:5e3})},postBulkPropertyExposureCreation:function(e,t){var r,s;return r=document.domain,s=Ctesius.getConfig("exposures_public_url"),t instanceof Array||(t=JSON.parse(t)),t.length?$.ajax({method:"post",dataType:"json",crossDomain:!0,url:s+"/create_many",data:{property_ids:t,domain:r,event_type:e},timeout:5e3}):null},outcodeBranchLookup:function(e,t){var r;return r=document.domain,$.ajax({method:"get",dataType:"json",url:"https://leads.homeflow.co.uk/outcode_branch_lookup",data:{post_code:e,domain:r},statusCode:{500:function(){alert("Internal Server Error, please try again.")}},success:function(e){return t(e)}})},postcodeBranchLookup:function(e,t){return $.ajax({method:"get",dataType:"json",url:"/postcode_branch_lookup",data:{postcode:e},success:function(e){return t(e)}})},addSavedProperty:function(e){return Ctesius.getSavedPropertiesCollection().addSavedPropertyById(e,function(e){return Ctesius.kickEvent("after_saved_property_added_by_action",e)}),!1},removeSavedProperty:function(e){return Ctesius.kickEvent("before_saved_property_removed_by_action",e),Ctesius.getSavedPropertiesCollection().removeSavedPropertyById(e)},submitSearchForm:function(e){var t;return null==e&&(e={}),t=Ctesius.getSearch(),Ctesius.Models.SearchBuilder.parseForm(t,e.selector),null!=e&&_.each(_.pairs(e),function(e){return t.set(e[0],e[1])}),Ctesius.kickEvent("before_search_form_submitted"),t.processFormAndSubmit(),!1},createNewGroup:function(e){var t,r;return Ctesius.kickEvent("before_create_new_group"),t=$(e).serializeObject(),r=Ctesius.getConfig("root_url")+"groups",$.ajax({type:"post",url:r,data:{group:t},success:function(){return Ctesius.getGroupsCollection().fetch(),Ctesius.getCurrentFlashMessage().setFlash("Group created.","success")},error:function(){return Ctesius.getCurrentFlashMessage().setFlash("Sorry error")}}),!1},togglePropertyInGroup:function(e,t){return Ctesius.getGroupsCollection().fetch().then(function(){var r,s;return s=null,(r=Ctesius.getGroupsCollection().find(function(t){return t.get("id")===e})).get("properties")&&(s=r.get("properties").find(function(e){return e.id===t})),s?Ctesius.Actions.removePropertyFromGroup(e,t):Ctesius.Actions.addPropertyToGroup(e,t)})},addPropertyToGroup:function(e,t){var r;return r={group_id:e,property_id:t},$.ajax({type:"POST",url:"/add_property_to_user_group",data:r,success:function(){}})},removePropertyFromGroup:function(e,t){var r;return r={group_id:e,property_id:t},$.ajax({type:"DELETE",url:"/remove_property_from_user_group",data:r,success:function(){return Ctesius.getGroupsCollection().fetch()}})},addSearchToGroup:function(e){return $.ajax({type:"POST",url:"/add_search_to_user_group",data:e,success:function(){}})},removeSearchFromGroup:function(e,t){var r;return r={group_id:e,search_id:t},$.ajax({type:"DELETE",url:"/remove_search_from_user_group",data:r,success:function(){}}),Ctesius.getGroupsCollection().fetch()},logUserOut:function(){return Ctesius.getUser().logOut(),!1},logUserIn:function(e){return Ctesius.getUser().logIn(e.username.value,e.password.value),!1},createNewUser:function(e){return console.log("createNewUser called",e),Ctesius.kickEvent("before_create_new_user"),Ctesius.getUser().signUp(e),
76!1},updateUser:function(e,t){var r,s,o;return null==t&&(t=[]),(e=$(e).serializeJSON()).marketing_preferences&&e.marketing_preferences.custom_preferences&&(o=Ctesius.getUser().attributes.user_id,s=Ctesius.getUser().attributes.marketing_preference_id,r=e.marketing_preferences,$.ajax({type:"PUT",url:"/custom_marketing_preferences/"+o,dataType:"json",data:{user_id:o,marketing_preferences:r}}),e.marketing_preferences.custom_preferences.custom_opt_out?e.opt_in_marketing_at="optout":e.opt_in_marketing_at="optin",$.ajax({type:"PUT",url:"/marketing_preferences/"+s,dataType:"json",data:{opt_in_marketing_at:e.opt_in_marketing_at,opt_in_marketing_url:document.URL.split("?")[0],user_id:Ctesius.getUser().attributes.user_id}})),Ctesius.getUser().validateFor(e,t)&&Ctesius.getUser().save(e,{success:function(){return Ctesius.getCurrentFlashMessage().setFlashWhenSynced(Ctesius.getUser(),"We've updated your details","success"),Ctesius.kickEvent("user_updated")},error:function(e,t){var r,s;return 422===t.status?(r="Unable to process your request. (Error 422)",(null!=(s=t.responseJSON)?s.message:void 0)&&(r="Unable to process your request: "+t.responseJSON.message),Ctesius.getCurrentFlashMessage().setFlash(r)):Ctesius.getCurrentFlashMessage().setFlash("Sorry there was an error, please contact support."),!1}}),!1},reapitResponseCode:function(e){return $.ajax({type:"GET",url:"/property_tracker_response",data:{url:e},async:!1})},checkUserReapitIframe:function(e){return Ctesius.Actions.reapitResponseCode(e).responseJSON.response_code},saveCurrentSearch:function(){var e;return e=Ctesius.getConfig("default_saved_search_attrs"),Ctesius.getSavedSearchesCollection().addSearch(Ctesius.getSearch(),e),Ctesius.kickEvent("after_saved_search",Ctesius.getUser())},removeSavedSearch:function(e){return Ctesius.getSavedSearchesCollection().removeSearchById(e)},updateSavedSearch:function(e,t){return Ctesius.getSavedSearchesCollection().updateSearchById(e,t)},updateMarketingPreferences:function(e,t){var r;return(r=$("#update_button")).length&&(r.addClass("updating"),r.text("Updating")),e=$(e).serializeObject(),t=Ctesius.getUser().attributes.user_id,$.ajax({type:"PUT",url:"/marketing_preferences/"+t,dataType:"json",data:{opt_in_marketing_at:e.opt_in_marketing_at,opt_in_marketing_url:document.URL,user_id:t}}),Ctesius.getUser().save(e,{success:function(){return(r=$("#update_button")).length&&(r.removeClass("updating"),r.text("Update")),Ctesius.getCurrentFlashMessage().setFlashWhenSynced(Ctesius.getUser(),"We've updated your details","success")}}),!1},updateMarketingPreferencesFromEncryptedToken:function(e,t){var r;return(r=$("#update_button")).length&&(r.addClass("updating"),r.text("Updating")),e=$(e).serializeObject(),t=t,$.ajax({type:"PUT",url:"/marketing_preferences/"+t,dataType:"json",data:{opt_in_marketing_at:e.opt_in_marketing_at,opt_in_marketing_url:document.URL.split("?")[0]+"#"+document.URL.split("#")[1],encrypted_token:e.encrypted_token},success:function(){return(r=$("#update_button")).length&&(r.removeClass("updating"),r.text("Update")),Ctesius.getCurrentFlashMessage().setFlash("We've updated your details","success")}}),!1},resetPassword:function(e){var t,r;return(e=$(e).serializeObject()).body?window.location.href="/":(t=/^([\w.+-]+)@([\w.-]+)\.([a-zA-Z.]{2,63})$/i,e.email.match(t)?(r=Ctesius.getConfig("root_url")+"reset_passwords",$.ajax({type:"post",url:r,data:e,success:function(){return Ctesius.getCurrentFlashMessage().setFlash("If email is registered, you will get a reset link.","success"),Ctesius.kickEvent("reset_password_success")},error:function(e){return"user not found"===e.responseText?Ctesius.getCurrentFlashMessage().setFlash("Sorry, We couldn't find your account"):Ctesius.getCurrentFlashMessage().setFlash("Sorry, there has been an error"),Ctesius.kickEvent("reset_password_failed")}}),!1):(Ctesius.getCurrentFlashMessage().setFlash("Sorry, that email doesn't look valid"),Ctesius.kickEvent("reset_password_failed"),!1))},updateSavedSearchOld:function(e){var t,r;return t=e.value.split("_")[1],r=e.value.split("_")[0],$.ajax({type:"PUT",url:"/searches?id="+r+"&freq="+t,dataType:"json",success:function(){return Ctesius.getSavedSearchesCollection().fetch()}}),!1},loadArticlesByTopic:function(e){return Ctesius.Models.ArticleInfiniteScroll.loadNextByTopic(e)}}
76,Ctesius.Template={noisy:!1,load:function(e){var t;return null!=(t=$("#"+e)).html()?Liquid.parse(t.html()):(this.noisy&&alert("template "+e+" not found"),Liquid.parse(""))}}}).call(this); 77(function(){var e=function(e,r){function s(){this.constructor=e}for(var i in r)t.call(r,i)&&(e[i]=r[i]);return s.prototype=r.prototype,e.prototype=new s,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Models.User=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.urlRoot="/user",r.boot=function(e){var t;return(t=new Ctesius.Models.User).fetch({async:!1}),t.isNew()?((t=new Ctesius.Models.LocalUser({})).fetch(),Ctesius.kickEvent("user_loaded",t),e(t)):(t.fetch(),Ctesius.kickEvent("user_loaded",t),e(new Ctesius.Models.PersistedUser(t.attributes)))},r.prototype.initialize=function(e){var t,r;if((t=null!=e?e:{}).saved_searches)return r=new Ctesius.Collections.SavedSearches(t.saved_searches),this.set("saved_searches",r)},r.prototype.parse=function(e){return e.user},r.prototype.idAttribute="user_id",r.prototype.canBeCreated=function(){return!1},r.prototype.url=function(){return Ctesius.getConfig("root_url")+"user.ljson"},r.prototype.missingCreatableAttributes=function(){var e;return e=[],null!=this.attributes.password&&null!=this.attributes.password_confirmation?this.attributes.password_confirmation!==this.attributes.password&&e.push("password")&&e.push("password_confirmation"):e.push("password")&&e.push("password_confirmation"),e},r.prototype.fetchNextAndPrevProperties=function(){var e,t;if(this.get("implied_search"))return t=this.get("implied_search"),t=new Ctesius.Models.Search(t),e=new Ctesius.Models.Search(t.get("place")),t.set("place",e),t.propertiesAroundAndRender(Ctesius.getConfig("property_id"))},r.prototype.getOrCreateUserMicroView=function(){return null!=this.userMicroView?this.userMicroView:this.userMicroView=new Ctesius.Views.UserMicro({model:this})},r.prototype.getOrCreateUserProfileView=function(){return null!=this.userProfileView?this.userProfileView:this.userProfileView=new Ctesius.Views.UserProfile({model:this})},r.prototype.inBrowserStorageEnabled=function(){return!1},r}(Backbone.Model)}).call(this); 78(function(){var e=function(e,i){function n(){this.constructor=e}for(var r in i)t.call(i,r)&&(e[r]=i[r]);return n.prototype=i.prototype,e.prototype=new n,e.__super__=i.prototype,e},t={}.hasOwnProperty;Ctesius.Models.InfiniteScroll=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.init=function(){var e;return this.loading_next=0,this.loading_prev=0,this.last_search=Ctesius.getSearch().clone(),this.last_search.get("page")?this.prev_page=this.last_search.get("page")-1:this.prev_page=0,this.next_page=this.prev_page+2,this.base_url=document.location.pathname.replace(this.last_search.toHomeflowUrlParams(),""),"/"!==this.base_url.substr(this.base_url.length-1)&&(this.base_url+="/"),$(".infinite_page").each((e=this,function(t,i){if(!$(i).attr("data-page-no"))return $(i).attr("data-page-no",e.prev_page+1)})),$(".pagination").hide(),Ctesius.registerEvent("load_next_for_infinite_scroll",function(e){return function(){return document.activeElement&&document.activeElement.blur(),e.loadNext()}}(this)),Ctesius.registerEvent("load_previous_for_infinite_scroll",function(e){return function(){return e.loadPrevious()}}(this)),$(window).scroll(function(e){return function(){return e.checkScroll()}}(this)),this.checkScroll()},i.calcBufferHeight=function(){return Ctesius.getConfig("container_to_offset")?Ctesius.getConfig("container_to_offset"):Math.max(300,$(window).height()/2)+Ctesius.getConfig("buffer_adjust")},i.checkScroll=function(){var e,t,i,n;e=this.calcBufferHeight(),t=$(window).scrollTop(),Ctesius.getConfig("autoscroll_infinite_scroll")&&(Ctesius.getConfig("ininite_scroll_container")?(i=$(Ctesius.getConfig("ininite_scroll_container")),0===this.loading_next&&this.next_page>0&&t+$(window).height()+e>=i.height()+i.position().top&&this.loadNext(),0===this.loading_prev&&this.prev_page>0&&t-e<=i.position().top&&this.loadPrevious()):(Ctesius.getConfig("container_to_offset")?0===this.loading_next&&this.next_page>0&&t>$(e).height()/2&&this.loadNext():0===this.loading_next&&this.next_page>0&&t+$(window).height()+e>=$(document).height()&&this.loadNext(),0===this.loading_prev&&this.prev_page>0&&t<=e&&this.loadPrevious())),$(".infinite_page").each((n=this,function(e,i){var r;if((r=$(i).offset().top)<=t&&r+$(i).height()>t)return n.setPage(i)}))},i.setPage=function(e){var t,i,n;return n=$(e).attr("data-page-no"),t=this.last_search.clone().set("page",n).toHomeflowUrlParams(),i=window.location.hash,history.replaceState(null,"Page "+n,this.base_url+t+i)},i.loadNext=function(){var e;if($(".loading").fadeIn("slow"),this.loading_next=1,0!==this.next_page)return this.temp_next_search=this.last_search.clone(),this.temp_next_search.unset("performed_data"),this.temp_next_search.set("page",this.next_page),window.location.pathname.match(/\/commercial\//)&&this.temp_next_search.set("type","commercial"),this.temp_next_search.performAsData((e=this,function(){var t;if(Ctesius.kickEvent("performed_next_infinite_scroll",e.temp_next_search.get("performed_data")),Ctesiu
78s.getUserHistoryCollection().addSearch(e.temp_next_search),(t=e.temp_next_search.get("performed_data")).pagination.has_next_page?e.next_page++:e.next_page=0,$("#infinite_pages").append(e.renderAndMergeProperties(t)),$("#infinite_pages_secondary").append(e.renderAndMergeProperties(t)),$("#page-no-"+t.pagination.current_page+" a").click(function(){return e.setPage($("#page-no-"+t.pagination.current_page))}),e.loading_next=0,$(".loading").fadeOut("slow"),Ctesius.kickEvent("infinite_scroll_complete"),e.last_search=e.temp_next_search,$("#infinite_pages").length)return e.createPropertyExposures(t.properties)}))},i.loadPrevious=function(){var e;if(this.loading_prev=1,0!==this.prev_page)return this.temp_previous_search=this.last_search.clone(),this.temp_previous_search.unset("performed_data"),this.temp_previous_search.set("page",this.prev_page),this.temp_previous_search.performAsData((e=this,function(){var t;return Ctesius.kickEvent("performed_previous_infinite_scroll",e.temp_previous_search.get("performed_data")),Ctesius.getUserHistoryCollection().addSearch(e.temp_previous_search),t=e.temp_previous_search.get("performed_data"),e.prev_page--,$("#infinite_pages").prepend(e.renderAndMergeProperties(t)),$(window).scrollTop($(window).scrollTop()+$("#page-no-"+t.pagination.current_page).height()),$("#page-no-"+t.pagination.current_page+" a").click(function(){return e.setPage($("#page-no-"+t.pagination.current_page))}),e.loading_prev=0,e.last_search=e.temp_previous_search}))},i.renderAndMergeProperties=function(e){var t,i,n,r;
78return(r=new Ctesius.Collections.Properties(e.properties)).length>0?(Ctesius.getPropertiesCollection().add(e.properties),Ctesius.kickEvent("performed_property_data",r),Ctesius.getConfig("no_advert_pages")&&(t=e.pagination.current_page%Ctesius.getConfig("no_advert_pages")),n=new Ctesius.Views.InfiniteScrollProperties({collection:r,current_page:e.pagination.current_page,advert_no:t}),i='<div id="page-no-'+e.pagination.current_page+'" class="infinite_page" data-page-no="'+e.pagination.current_page+'">',i+=n.render()+"</div>"):""},i.createPropertyExposures=function(e){var t;if(null!=e)return t=e.map(function(e){return e.property_id}),Ctesius.Actions.postBulkPropertyExposureCreation("SearchResult",t)},i}(Backbone.Model)}).call(this); 79(function(){var t=function(t,o){function e(){this.constructor=t}for(var n in o)r.call(o,n)&&(t[n]=o[n]);return e.prototype=o.prototype,t.prototype=new e,t.__super__=o.prototype,t},r={}.hasOwnProperty;Ctesius.Models.Article=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return t(o,r),o.prototype.idAttribute="article_id",o}(Backbone.Model)}).call(this); 80(function(){var e=function(e,i){function n(){this.constructor=e}for(var r in i)t.call(i,r)&&(e[r]=i[r]);return n.prototype=i.prototype,e.prototype=new n,e.__super__=i.prototype,e},t={}.hasOwnProperty;Ctesius.Models.ArticleInfiniteScroll=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,t),i.init=function(){return this.prev_page=0,Ctesius.registerEvent("load_next_for_article_infinite_scroll",(e=this,function(t){return t&&"all"!==t?e.loadNextByTopic(t):e.loadNext()}));var e},i.loadNext=function(){var e,t;return this.next_page=this.prev_page+2,e=Ctesius.getConfig("root_url")+"articles.ljson?page="+this.next_page,Ctesius.getConfig("articles_page_size")&&(e+="&page_size="+Ctesius.getConfig("articles_page_size")),Ctesius.getConfig("articles_branch")&&(e+="&branch="+Ctesius.getConfig("articles_branch")),$.get(e,(t=this,function(e){return $("#infinite_pages").append(t.renderAndMergeArticles(e)),t.prev_page++,Ctesius.kickEvent("article_infinite_scroll_performed",e)})),$(".loading").fadeOut("slow")},i.loadNextByTopic=function(e){var t,i;return this.next_page=this.prev_page+2,t=Ctesius.getConfig("root_url")+"articles.ljson?page="+this.next_page+"&topic="+e,$.get(t,(i=this,function(e){return $("#infinite_pages").append(i.renderAndMergeArticles(e)),i.prev_page++,Ctesius.kickEvent("article_infinite_scroll_performed",e)})),$(".loading").fadeOut("slow")},i.renderAndMergeArticles=function(e){var t,i,n;return(n=new Ctesius.Collections.Articles(e.articles)).length>0?(Ctesius.kickEvent("performed_article_data",n),i=new Ctesius.Views.InfiniteScrollArticles({collection:n}),t='<div id="page-no-'+e.pagination.current_page+'" class="infinite_page" data-page-no="'+e.pagination.current_page+'">',t+=i.render()+"</div>"):""},i}(Backbone.Model)}).call(this); 81(function(){var e=function(e,o){function a(){this.constructor=e}for(var n in o)t.call(o,n)&&(e[n]=o[n]);return a.prototype=o.prototype,e.prototype=new a,e.__super__=o.prototype,e},t={}.hasOwnProperty;Ctesius.Models.BookingCalendar=function(t){function o(){return o.__super__.constructor.apply(this,arguments)}return e(o,t),o.prototype.availableTimes=function(){var e,t,o,a,n,r,s;return o=moment().add(2,"days"),e=moment().endOf("week"),n=this.createWeekTimes(o,e),a=moment().add(1,"weeks").startOf("week").add(1,"days"),e=moment().add(1,"weeks").endOf("week"),t=this.createWeekTimes(a,e),a=moment().add(2,"weeks").startOf("week").add(1,"days"),e=moment().add(2,"weeks").endOf("week"),r=this.createWeekTimes(a,e),a=moment().add(3,"weeks").startOf("week").add(1,"days"),e=moment().add(3,"weeks").endOf("week"),s=this.createWeekTimes(a,e),n.concat(t).concat(r).concat(s)},o.prototype.createWeekTimes=function(e,t){var o,a,n,r,s,d,i,c,m,f;for(o=this,n=[],a=e,f=[];a<=t;){for(n.push(a.toDate()),s=c=m=9;m<=18?c<=18:c>=18;s=m<=18?++c:--c)i=("0"+s).slice(-2),d=("0"+(s+1)).slice(-2),o.get("firstEvent")||o.set("firstEvent",a),r={start:a.format("YYYY-MM-DD")+"T"+i+":00:00",end:a.format("YYYY-MM-DD")+"T"+d+":00:00",allDay:!1}
81,f.push(r);a=a.clone().add(1,"d")}return f},o}(Backbone.Model)}).call(this); 82(function(){var t=function(t,o){function n(){this.constructor=t}for(var e in o)r.call(o,e)&&(t[e]=o[e]);return n.prototype=o.prototype,t.prototype=new n,t.__super__=o.prototype,t},r={}.hasOwnProperty;Ctesius.Models.Branch=function(r){function o(){return o.__super__.constructor.apply(this,arguments)}return t(o,r),o.prototype.idAttribute="branch_id",o}(Backbone.Model)}).call(this); 83(function(){var s=function(s,t){function n(){this.constructor=s}for(var o in t)e.call(t,o)&&(s[o]=t[o]);return n.prototype=t.prototype,s.prototype=new n,s.__super__=t.prototype,s},e={}.hasOwnProperty;Ctesius.Models.Flash=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,e),t.prototype.setFlash=function(s,e){var t;return null==e&&(e="warning"),this.flash_message=s,this.flash_type=e,$(".flash_message_container").each((t=this,function(n,o){var r;return(r=$(o)).html("<strong>"+t.getStrongForType(e)+"</strong> "+s),Ctesius.getConfig("flash_message_custom_close_button")&&r.append("<a class='close-flash'>\xd7</a>"),r.removeClass("alert-success"),r.removeClass("hidden"),r.addClass(t.getClassForType(e))})),Ctesius.getConfig("scroll_to_flash")?Ctesius.getConfig("scroll_to_flash")():document.getElementsByClassName("flash_message_container")[0].scrollIntoView(!0),this.clear()},t.prototype.setFlashWhenSynced=function(s,e,t){return null==t&&(t="warning"),this.listenToOnce(s,"sync",function(){return this.setFlash(e,t)})},t.prototype.getClassForType=function(s){return"warning"===s?"alert-danger":"success"===s?"alert-success":void 0},t.prototype.getStrongForType=function(s){return"warning"===s?Ctesius.getConfig("flash_message_warning"):"success"===s?Ctesius.getConfig("flash_message_success"):void 0},t.prototype.toJSON=function(s){var e;return null==s&&(s=!0),null!=this.flash_message?(e={message:this.flash_message,type:this.flash_type},this.clear(),e):{}},t.prototype.clear=function(){return this.flash_message=void 0,this.flash_type=void 0},t}(Backbone.Model)}).call(this); 84(function(){var t=function(t,r){function e(){this.constructor=t}for(var n in r)o.call(r,n)&&(t[n]=r[n]);return e.prototype=r.prototype,t.prototype=new e,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Models.GeoFeature=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.idAttribute="id",r}(Backbone.Model)}).call(this); 85(function(){var t=function(t,r){function n(){this.constructor=t}for(var e in r)o.call(r,e)&&(t[e]=r[e]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Models.Group=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.idAttribute="group_id",r}(Backbone.Model)}).call(this); 86(function(){var t=function(t,r){function n(){this.constructor=t}for(var e in r)o.call(r,e)&&(t[e]=r[e]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Models.LocalBusinessDatum=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.idAttribute="id",r}(Backbone.Model)}).call(this); 87(function(){var e=function(e,r){function s(){this.constructor=e}for(var n in r)t.call(r,n)&&(e[n]=r[n]);return s.prototype=r.prototype,e.prototype=new s,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Models.LocalUser=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.userType=function(){return"local"},r.prototype.url=function(){return"user"},r.prototype.id=function(){return"persisted_user"},r.prototype.parse=function(e){return e},r.prototype.inBrowserStorageEnabled=function(){return!0},r.prototype.canBePersisted=function(){return this.missingCreatableAttributes()===[]&&(!!this.isNew()&&void 0)},r.prototype.localStorage=new Backbone.LocalStorage("Localuser"),r.prototype.defaults={first_name:"Guest",second_name:"User"},r.prototype.initialize=function(){return this.getOrCreateUserMicroView().render(),this.getOrCreateUserProfileView().render()},r.prototype.logIn=function(e,t){var r;return Ctesius.kickEvent("before_user_log_in"),r=Ctesius.getConfig("root_url")+"session",$.ajax({type:"post",url:r,data:{username:e,password:t,local_user:"local_user"},success:function(){return Ctesius.bootUser(function(e){return Ctesius.router.refreshColorBox(),Ctesiu
87s.kickEvent("user_logged_in",e)})},error:function(){return Ctesius.getCurrentFlashMessage().setFlash("Sorry, we couldn't find that username or password combination"),Ctesius.kickEvent("user_log_in_failed")}})},r.prototype.signUp=function(e){return console.log("LocalUser.signUp called",e),Ctesius.kickEvent("before_user_sign_up"),this.buildUserAttributesFromForm($(e).serializeJSON(),function(t){var r,s,n,i;return i=Ctesius.getConfig("root_url")+"user.ljson",t.marketing_preferences&&t.marketing_preferences.custom_preferences&&!t.marketing_preferences.custom_preferences.custom_opt_out&&(t["marketing_preferences[opt_in_marketing]"]="on"),"on"===t["marketing_preferences[opt_in_marketing]"]&&(t["marketing_preferences[opt_in_marketing_url]"]=window.location.href,t["marketing_preferences[opt_in_marketing_statement]"]=$(".statement_text").first().text()),r=t.authenticity_token,delete t.authenticity_token,s=function(e){var s;return s={authenticity_token:r,client:t},e&&(s["g-recaptcha-response"]=e),$.ajax({type:"post",url:i,data:s,success:function(){return Ctesius.kickEvent("user_sign_up"),Ctesius.bootUser(function(){return Ctesius.router.refreshColorBox(),Ctesius.kickEvent("user_signed_up")})},error:function(){var e;return e=Ctesius.getConfig("custom_user_register_error")?Ctesius.getConfig("custom_user_register_error"):'Sorry, there has been an error. Perhaps you already have an account? Try "Sign in" or "Password reminder".',Ctesius.getCurrentFlashMessage().setFlash(e),Ctesius.kickEvent("user_sign_up_failed")}})},"cloud"===(n=Ctesius.getConfig("recaptcha_version")||3)?null!=("undefined"!=typeof grecaptcha&&null!==grecaptcha?grecaptcha.enterprise:void 0)?grecaptcha.enterprise.ready(function(){return grecaptcha.enterprise.execute(RECAPTCHA_CLOUD_SITE_KEY,{action:"sign_up"}).then(function(e){return s(e)})}):s(null):window.enableRecaptcha?2===n?(window.submitRecaptchaForm=function(e){return s(e)},Ctesius.addConfig("submitted_form",$(e)),grecaptcha.execute()):grecaptcha.ready(function(){return grecaptcha.execute("6LeKPOUUAAAAAEKNWIu2qkNwdOqVxH41v0D7fe-K",{action:"register"}).then(function(e){return s(e)})}):s(null)})},r.prototype.buildUserAttributesFromForm=function(e,t){var r,s,n,i,o;return o=["first_name","last_name","password","password_confirmation","email"],r=/^([\w.+-]+)@([\w.-]+)\.([a-zA-Z.]{2,63})$/i,n=/^[a-zA-Z\xc0-\xfa\-\s].*$/,0!==(i=_.difference(o,_.compact(_.map(_.pairs(e),function(e){return!_.str.isBlank(e[1])&&e[0]})))).length?(s=_.map(i,function(e){return _.str.humanize(e)}),Ctesius.getCurrentFlashMessage().setFlash("Looks like you forgot to fill in the following fields: "+s.join(", ")),Ctesius.kickEvent("user_sign_up_failed"),!1):e.first_name.toLowerCase().replace(/\s/g,"")===e.last_name.toLowerCase().replace(/\s/g,"")?(Ctesius.getCurrentFlashMessage().setFlash("First name and Surname can not be the same"),Ctesius.kickEvent("user_sign_up_failed"),!1):e.first_name.match(n||e.last_name.match(n))?e.email.match(r)?e.password!==e.password_confirmation?(Ctesius.getCurrentFlashMessage().setFlash("Your passwords did not match"),Ctesius.kickEvent("user_sign_up_failed"),!1):e.password.length<8&&e.password_confirmation.length<8?(Ctesius.getCurrentFlashMessage().setFlash("Your password must be a minimum of 8 characters."),Ctesius.kickEvent("user_sign_up_failed"),!1):t(e):(Ctesius.getCurrentFlashMessage().setFlash("Sorry, that email doesn't look valid"),Ctesius.kickEvent("user_sign_up_failed"),!1):(Ctesius.getCurrentFlashMessage().setFlash("Sorry, that name doesn't look valid"),Ctesius.kickEvent("user_sign_up_failed"),!1)},r}(Ctesius.Models.User)}).call(this); 88(function(){Ctesius.PathManager=function(){function e(){this.window=window,this.document=document}return e.prototype.isPath=function(e){return this.passesRegex(window.location.pathname,e)},e.prototype.branchPageTest=function(e){return/.*\/branches/.test(e)&&!/.*\/branches\/\D+\/(sales|lettings)/.test(e)},e.prototype.isReferer=function(){},e.prototype.passesRegex=function(e,s){var t,a;return a={crm_page:/.*\/pages\//,property_show:/.*\/properties\/(\d*|\d*\-\w*)\/(sales|lettings)/,agency_page:/.*\/agencies/,global_search_page:new RegExp("^"+Ctesius.getConfig("root_url").replace(/(?=[\/\\^$*+?.()|{}[\]])/g,"\\")+"properties/(sales|lettings)"),root:new RegExp("^"+Ctesius.getConfig("root_url").replace(/(?=[\/\\^$*+?.()|{}[\]])/g,"\\")+"$")},t={search_page:this.isSearchPage,branch_page:this.branchPageTest},a[s]?a[s].test(e):!!t[s]&&t[s].call(this,e)},e.prototype.isSearchPage=function(e){return!(this.passesRegex(e,"crm_page")||this.passesRegex(e,"property_show")||this.passesRegex(e,"root")||this.passesRegex(e,"agency_page")||this.passesRegex(e,"branch_page")||this.passesRegex(e,"global_search_page")||!/(sales|lettings)/.test(e))},e}()}).call(this); 89(function(){var e=function(e,s){function r(){this.constructor=e}for(var o in s)t.call(s,o)&&(e[o]=s[o]);return r.prototype=s.prototype,e.prototype=new r,e.__super__=s.prototype,e},t={}.hasOwnProperty,s=[].indexOf||function(e){for(var t=0,s=this.length;t<s;t++)if(t in this&&this[t]===e)return t;return-1};Ctesius.Models.PersistedUser=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.getOrCreateUserMicroView().render(),this.getOrCreateUserProfileView().render(),Ctesiu
89s.kickEvent("user_logged_in",this)},r.prototype.userType=function(){return"persisted"},r.prototype.getOrCreateUserMicroView=function(){return null!=this.userMicroView?this.userMicroView:this.userMicroView=new Ctesius.Views.UserMicro({model:this})},r.prototype.validateFor=function(e,t){return null==t&&(t=[]),0===t.length&&(t=["email","address","telephone","password","postcode","name"]),s.call(t,"email")>=0&&!this.meetsEmailRequirement(e)?(Ctesius.getCurrentFlashMessage().setFlash("You must enter a valid email address"),!1):s.call(t,"address")>=0&&!this.meetsAddressRequirement(e)?(Ctesius.getConfig("custom_address_flash_message")?Ctesius.getCurrentFlashMessage().setFlash(Ctesius.getConfig("custom_address_flash_message")):Ctesius.getCurrentFlashMessage().setFlash("Please fill out all of the address fields"),!1):s.call(t,"telephone")>=0&&!this.meetsTelephoneRequirement(e)?(Ctesius.getCurrentFlashMessage().setFlash("Your telephone number can only be numeric"),!1):s.call(t,"password")>=0&&!this.meetsPasswordRequirements(e)?(Ctesius.getCurrentFlashMessage().setFlash("The 'password' and the 'password confirmation' must match and be 8 or more characters long"),!1):s.call(t,"postcode")>=0&&!this.meetsPostcodeRequirements(e)?(Ctesius.getCurrentFlashMessage().setFlash("Please enter a valid postcode (with spaces)"),!1):!(s.call(t,"name")>=0&&!this.meetsNameRequirement(e))||(Ctesius.getCurrentFlashMessage().setFlash("Sorry, that name doesn't look valid!"),!1)},r.prototype.logOut=function(){var e;return e=Ctesius.getConfig("root_url")+"session",$.ajax({url:e,type:"DELETE",success:function(){return Ctesius.bootUser(function(){return Ctesius.kickEvent("user_logged_out"),Ctesius.router.closeColorBox()})}})},r.prototype.meetsAddressRequirement=function(e){return!(e.street_address||e.town||e.postcode)||!!e.street_address&&!!e.town&&!!e.postcode},r.prototype.meetsTelephoneRequirement=function(e){return null==e.tel_home||(""===e.tel_home||jQuery.isNumeric(e.tel_home.replace(" ","")))},r.prototype.meetsEmailRequirement=function(e){return e.email?e.email.match(/\S+@\S+/):null==e.email},r.prototype.meetsPasswordRequirements=function(e){return e.password&&e.password_confirmation?!(e.password.length<9&&e.password_confirmation.length<9)&&e.password===e.password_confirmation:null==e.password&&null==e.password_confirmation},r.prototype.meetsPostcodeRequirements=function(e){return!e.postcode||e.postcode.match(/[A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1}\s+?[0-9][A-Z]{2}/i)},r.prototype.meetsFirstNameRequirements=function(e){var t;return t=/^[a-zA-Z\xc0-\xfa\-\s].*$/,!!e.first_name&&!!e.first_name.match(t)},r.prototype.meetsLastNameRequirements=function(e){var t;return t=/^[a-zA-Z\xc0-\xfa\-\s].*$/,!!e.last_name&&!!e.last_name.match(t)},r.prototype.meetsNameRequirement=function(e){return this.meetsFirstNameRequirements(e)&&this.meetsLastNameRequirements(e)},r}(Ctesius.Models.User)}).call(this); 90(function(){var t=function(t,r){function n(){this.constructor=t}for(var e in r)o.call(r,e)&&(t[e]=r[e]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Models.Place=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.description=function(){return"hello"},r.prototype.toLiquid=function(){return this.toJSON()},r}(Backbone.Model)}).call(this); 91(function(){var e=function(e,r){function o(){this.constructor=e}for(var n in r)t.call(r,n)&&(e[n]=r[n]);return o.prototype=r.prototype,e.prototype=new o,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Models.Property=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.idAttribute="property_id",r.boot=function(){if(Ctesius.getConfig("property"))return new Ctesius.Models.Property(Ctesius.getConfig("property"))},r.prototype.generatedSearch=function(){var e;if(e=Ctesius.getConfig("search_fragment_for_property"))return Ctesius.Models.SearchBuilder.parseFragment(e).set("place",new Ctesius.Models.Place(Ctesius.getConfig("place")))},r.prototype.performAsData=function(e){var t,r,o;return t=new jQuery.Deferred,null==this.get("performed_data")?(r=this.get("property_url"),$.get(r,(o=this,function(r){if(o.set("performed_data",r),t.resolve(o),null!=e)return e()}))):(t.resolve(this),null!=e&&e()),t},r}(Backbone.Model)}).call(this); 92(function(){}).call(this); 93(function(){var t=function(t,i){function s(){this.constructor=t}for(var n in i)e.call(i,n)&&(t[n]=i[n]);return s.prototype=i.prototype,t.prototype=new s,t.__super__=i.prototype,t},e={}.hasOwnProperty;Ctesius.Models.Search=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.initialize=function(){var t,e,i;
93if(e=this,null!=this.get("fragment")&&(this.models,Ctesius.Models.SearchBuilder.parseFragment(this.get("fragment"),this)),null!=this.get("place")&&null==this.get("place").cid&&this.set("place",new Ctesius.Models.Place(this.get("place"))),e.bind("change",(i=this,function(){return _.each(i.changedAttributes(),function(t,e){return i.coerceValue(e,t)})})),e.bind("change:q",function(t){return function(){return t.set("place",null),t.set("poly",null)}}(this)),e.bind("change:poly",function(){}),e.bind("change:place_id",function(t){return function(){var e;return e=new Ctesius.Models.Place({place_id:t.get("place_id")}),t.set("place",e)}}(this)),null!=this.get("place_id")&&(t=new Ctesius.Models.Place({place_id:this.get("place_id")}),this.set("place",t)),(t=null!=this.get("poly"))&&this.set("poly",decodeURIComponent(this.get("poly"))),this.get("channel"))return this.performAsData()},i.prototype.isSavable=function(){return null!=this.get("place_id")||null!=this.get("place")},i.prototype.properties=function(){return null!=this.get("performed_data")?this.get("performed_data").properties:[]},i.prototype.performAsData=function(t){var e,i,s;return e=new jQuery.Deferred,null==this.get("performed_data")?(i=Ctesius.getConfig("root_url")+"search.ljson?"+this.toGetParams(),$.get(i,(s=this,function(i){if(s.set("performed_data",i),e.resolve(s),null!=t)return t()}))):(e.resolve(this),null!=t&&t()),e},i.prototype.coerceValue=function(t,e){if(("max_price"===t||"min_price"===t||"max_beds"===t||"min_beds"===t||"max_bathrooms"===t||"min_bathrooms"===t)&&null!=e)return""!==e?this.set(t,parseInt(e),{silent:!0}):this.set(t,void 0,{silent:!0})},i.prototype.is_first=!1,i.prototype.idAttribute="search_id",i.prototype.search_id=function(){return null!=this.get("search_id")?this.get("search_id"):this.cid},i.prototype.search_to_be_done=function(){return""!==this.to_homeflow_url_params()||!this.is_first},i.prototype.int_criteria=function(t,e){var i;return""!==t?((i=new Object)[e]=t,this.set(i)):this.unset(e)},i.prototype.requiresDisambiguation=function(){return null==this.get("place")},i.prototype.requiresServerSearch=function(){return!0},i.prototype.propertiesAroundAndRender=function(t){return this.propertiesAround(t,function(t){if(null!=t.after&&new Ctesius.Views.NextProperty({model:t.after}),null!=t.before)return new Ctesius.Views.PreviousProperty({model:t.before})})},i.prototype.propertiesAround=function(t,e){var i;return performAsData,i=Ctesius.getConfig("root_url")+"search.ljson?"+this.toGetParams(),$.get(i,function(i){var s,n,r;return 3===(r=i.properties).length?(n=r[0],s=r[2]):r[0].property_id===t?s=r[1]:n=r[0],e({before:new Ctesius.Models.Property(n),after:new Ctesius.Models.Property(s)})})},i.prototype.description=function(){var t,e,i,s;return i=[],null!=this.get("min_price")&&null!=this.get("max_price")?i.push("between \xa3"+this.get("min_price").formatMoney(0,".",",")+this.priceQualifier()+" and \xa3"+this.get("max_price").formatMoney(0,".",",")+this.priceQualifier()):this.get("min_price")?i.push("from \xa3"+this.get("min_price").formatMoney(0,".",",")+this.priceQualifier()):null!=this.get("max_price")&&i.push("up to \xa3"+this.get("max_price").formatMoney(0,".",",")+this.priceQualifier()),null!=this.get("min_beds")&&i.push("with more than "+this.get("min_beds")+" beds"),null!=this.get("branch_id")&&(e=Ctesius.getBranchesCollection().where({branch_id:this.get("branch_id")})[0])&&i.push("from the "+e.get("name")+" branch"),this.get("poly")?i.push("in a drawn area"):this.get("place")&&this.get("place").get("name")&&i.push("around "+this.get("place").get("name")),"sales"===this.get("channel")&&i.push(Ctesius.getConfig("sales_preposition")),"lettings"===this.get("channel")&&i.push(Ctesius.getConfig("lettings_preposition")),null!=this.get("tags")&&(t=this.get("tags").split("-").join(" ").split(","),""!==(s=_.reject(t,function(t){return"!"===t[0]}))&&i.push(s)),i.join(" ")},i.prototype.priceQualifier=function(){return"lettings"===this.get("channel")?" PCM":""},i.prototype.query=function(){var t;if(this.get("place")&&(t=this.get("place").get("name"),null!=this.get("place").get("county_name")))return t+", "+this.get("place").get("county_name")}
93,i.prototype.processFormAndSubmit=function(){return this.searchPermitted()?window.location=this.link(!1):window.location.hash="#/flash/search-query-required"},i.prototype.mapConditions=function(){return new RegExp("#map").test(window.location.hash)?"&url_fragment="+window.location.hash:""},i.prototype.link=function(t){return null==t&&(t=!0),Ctesius.getConfig("root_url")+"search?"+this.toGetParams(t)},i.prototype.isValid=function(){return null!=this.get("channel")},i.prototype.toHomeflowUrlParams=function(t,e){var i;return null==t&&(t=!0),null==e&&(e=!0),i=[],this.get("type")!==undefined&&""!==this.get("type")&&i.push("tag-"+this.get("type")),this.get("min_beds")!==undefined&&i.push("from-"+this.get("min_beds")+"-bed"),this.get("max_beds")!==undefined&&i.push("up-to-"+this.get("max_beds")+"-bed"),this.get("min_bathrooms")!==undefined&&i.push("from-"+this.get("min_bathrooms")+"-bathrooms"),this.get("max_bathrooms")!==undefined&&i.push("up-to-"+this.get("max_bathrooms")+"-bathrooms"),this.get("min_price")!==undefined&&this.get("pppw_price")===undefined&&i.push("from-"+this.get("min_price")),this.get("max_price")!==undefined&&this.get("pppw_price")===undefined&&i.push("up-to-"+this.get("max_price")),this.get("min_price")!==undefined&&this.get("pppw_price")!==undefined&&i.push("from-"+this.get("min_price")+"-pppw"),this.get("max_price")!==undefined&&this.get("pppw_price")!==undefined&&i.push("up-to-"+this.get("max_price")+"-pppw"),this.get("min_square_feet")!==undefined&&i.push("min-sq-ft-"+this.get("min_square_feet")),this.get("max_square_feet")!==undefined&&i.push("max-sq-ft-"+this.get("max_square_feet")),this.get("area")!==undefined&&i.push("area-"+this.get("area")),this.get("updated_ago")!==undefined&&i.push("updated-in-"+this.get("updated_ago")+"-days"),this.get("created_ago")!==undefined&&i.push("newer-than-"+this.get("created_ago")+"-days"),this.get("area")!==undefined&&i.push("area-"+this.get("area")),this.get("status")!==un
93defined&&i.push("status-"+this.get("status")),this.get("short-lets")!==undefined&&i.push("short-lets"),null!=this.get("min_acreage")&&""!==this.get("min_acreage")&&i.push("from-"+this.get("min_acreage")+"-acres"),null!=this.get("max_acreage")&&""!==this.get("max_acreage")&&i.push("up-to-"+this.get("max_acreage")+"-acres"),this.get("within")!==undefined&&""!==this.get("within")&&i.push("within-"+this.get("within")),null!=this.get("sorted")&&""!==this.get("sorted")&&i.push(this.get("sorted")),t&&null!=this.get("page")&&this.get("page")>1&&i.push("page-"+this.get("page")),null!=this.get("poly")&&""!==this.get("poly")&&e&&!this.get("place_id")&&i.push("poly-"+base64.encode(this.get("poly"))),null==this.get("poly")||""===this.get("poly")||e||this.get("place_id")||i.push("poly-"+this.get("poly")),this.get("text")!==undefined&&""!==this.get("text")&&i.push("text-"+this.get("text")),i.join("/")},i.prototype.toGetParams=function(t,e){var i;return null==t&&(t=!0),null==e&&(e=!0),i=[],this.requiresServerSearch()&&(i.push("channel="+(this.get("channel")||"sales")),null!=this.get("q")&&this.requiresDisambiguation()&&i.push("q="+this.get("q").replace(/^\s+|\s+$/g,"")),this.get("country_id")&&i.push("country_id="+this.get("country_id")),this.get("county_id")&&i.push("county_id="+this.get("county_id")),this.get("location_id")&&i.push("location_id="+this.get("location_id")),this.get("branch_id")&&i.push("branch_id="+this.get("branch_id")),"none"!==this.get("place_id")&&!this.requiresDisambiguation()&&this.get("place").get("place_id")&&e&&i.push("place_id="+this.get("place").get("place_id")),this.get("custom_sales_redirect")&&i.push("custom_sales_redirect="+this.get("custom_sales_redirect")),this.get("custom_lettings_redirect")&&i.push("custom_lettings_redirect="+this.get("custom_lettings_redirect")),this.get("text_search")&&i.push("text_search="+this.get("text_search")),i.push("fragment="+this.toHomeflowUrlParams(t))),i.join("&")},i.prototype.searchPermitted=function(){return!!Ctesius.getConfig("permit_blank_searches")||(null!=this.get("q")||this.get("place_id")||null!=this.get("place")||this.get("branch_id"))},i.prototype.toLiquid=function(){var t;return(t=this.toJSON()).description=this.description(),t.link=this.link(),t.query=this.query(),t},i.prototype.toJSON=function(){var t;return t=i.__super__.toJSON.call(this),this.get("place"),t},i.prototype.hasPlace=function(){return this.get("place")&&this.get("place").get("place_id")},i.prototype.equalTo=function(t,e){var i;return null==e&&(e=!1),!(null==t||!t.isValid()||!this.isValid())&&(null!=t&&null!=this.get("channel")&&(i=(i=this.toHomeflowUrlParams(e)===t.toHomeflowUrlParams(e))&&this.get("channel")===t.get("channel"),t.hasPlace()||this.hasPlace()?!(t.get("place")&&!this.get("place")||!t.get("place")&&this.get("place"))&&(i&&t.get("place").get("place_id")===this.get("place").get("place_id")):i))},i}(Backbone.Model)}).call(this); 94(function(){Ctesius.Models.SearchBuilder=function(){function t(){}return t.parseFragment=function(t,e){var s;return s=null!=e?e:new Ctesius.Models.Search,null==t&&(t=""),_.each(t.split("/"),function(t){if("sales"!==t&&"all-property-for-sale"!==t&&"property-for-sale"!==t||s.set("channel","sales"),"lettings"!==t&&"all-property-for-rent"!==t&&"property-for-rent"!==t||s.set("channel","lettings"),_.str.startsWith(t,"from-")&&(_.str.endsWith(t,"-bed")?s.set("min_beds",parseInt(t.split("-")[1])):_.str.endsWith(t,"-bathrooms")?s.set("min_bathrooms",parseInt(t.split("-")[1])):_.str.endsWith(t,"-acres")?s.set("min_acreage",parseInt(t.split("-")[1])):(s.set("min_price",parseInt(t.split("-")[1])),$("select#min_price").val(parseInt(t.split("-")[1])))),_.str.startsWith(t,"up-to-")&&(_.str.endsWith(t,"-bed")?s.set("max_beds",parseInt(t.split("-")[2])):_.str.endsWith(t,"-bathrooms")?s.set("max_bathrooms",parseInt(t.split("-")[2])):_.str.endsWith(t,"-acres")?s.set("max_acreage",parseInt(t.split("-")[2])):s.set("max_price",parseInt(t.split("-")[2]))),_.str.startsWith(t,"min-sq-ft-")&&s.set("min_square_feet",parseInt(t.split("-")[3])),_.str.startsWith(t,"max-sq-ft-")&&s.set("max_square_feet",parseInt(t.split("-")[3])),_.str.startsWith(t,"within-")&&s.set("within",_.str.splice(t,0,7,"")),_.str.startsWith(t,"poly-")&&s.set("poly",base64.decode(_.str.splice(t,0,5,""))),_.str.startsWith(t,"tag-")&&s.set("type",_.str.splice(t,0,4,"")),_.str.startsWith(t,"tag-")&&s.set("tags",_.str.splice(t,0,4,"")),"least-expensive-first"===t&&s.set("sorted","least-expensive-first"),"most-recent-first"===t&&s.set("sorted","most-recent-first"),"most-recently-launched-first"===t&&s.set("sorted","most-recently-launched-first"),"most-expensive-first"===t&&s.set("sorted","most-expensive-first"),"least-square-feet-first"===t&&s.set("sorted","least-square-feet-first"),"most-square-feet-first"===t&&s.set("sorted","most-square-feet-first"),"highest-investment-first"===t&&s.set("sorted","highest-investment-first"),"lowest-investment-first"===t&&s.set("sorted","lowest-investment-first"),"recommended"===t&&s.set("sorted","recommended"),"short-lets"===t&&s.set("short-lets","short-lets"),"most-recently-updated-first"===t&&s.set("sorted","most-recently-updated-first"),_.str.startsWith(t,"status-")&&s.set("status",_.str.splice(t,0,7,"")),_.str.startsWith(t,"page-")&&s.set("page",_.str.splice(t,0,5,"")),_.str.startsWith(t,"newer-than")&&s.set("created_ago",parseInt(t.split("-")[2])),_.str.startsWith(t,"updated-in")&&s.set("updated_ago",parseInt(t.split("-")[2])),_.str.startsWith(t,"text-")&&s.set("text",_.str.splice(t,0,5,"")),_.str.endsWith(t,"-pppw"))return s.set("pppw_price","pppw_price")}),s},t.parseForm=function(t,e){var s,r,a,i,l,n,c,o,p,d,u;for(null==e&&(e=null),null==e&&(e=""),null==t&&(t=new Ctesius.Models.Search),t.unset("text"),t.set("min_beds",$(e+" #min_beds").val()),t.set("min_price",$(e+" #min_price").val()),t.set("min_bathrooms",$(e+" #min_bathrooms").val()),t.set("max_bathrooms",$(e+" #max_bathrooms").val()),t.set("max_beds",$(e+" #max_beds").val()),t.set("min_acreage",$(e+" #min_acreage").val()),t.set("max_acreage",$(e+" #max_acreage").val()),t.set("min_square_feet",$(e+" #min_square_feet").val()),t.set("max_square_feet",$(e+" #max_square_feet").val()),t.set("max_price",$(e+" #max_price").val()),t.set("within",$(e+" #within").val()),t.set("branch_id",$(e+" #branch_id").val()),t.set("updated_ago",$(e+" #updated_ago").val()),t.set("created_ago",$(e+" #created_ago").val()),t.set("country_id",$(e+" #country_id").val()),t.set("county_id",$(e+" #county_id").val()),t.set("location_id",$(e+" #location_id").val()),t.set("custom_lettings_redirect",$(e+" #custom_lettings_redirect").val()),t.set("custom_sales_redirect",$(e+" #custom_sales_redirect").val()),t.set("text_search",$(e+" #text_search").val()),""!==$(e+" input#location").val()&&void 0===t.get("q")&&t.set("q",$(e+" input#location").val()),""===$(e+" input#location").val()&&""!==t.get("q")&&t.set("q",""),""!==$(e+" input#place_id").val()?t.set("place_id",$(e+" input#place_id").val()):""!==$(e+" select#place_id").val()&&t.set("place_id",$(e+" select#place_id").val()),(r=$(e+" select#county_id")).length&&""!==r.val()&&t.set("place_id",$(e+" select#county_id").val()),!t.get("place_id")&&Ctesius.storedPlace&&Ctesiu
94s.getConfig("savePlaceHistoryForMap")&&t.set("place_id",Ctesius.storedPlace.get("place_id")),s=$(e+" select#country_id"),r.length&&""===r.val()&&s.length&&""!==s.val()&&t.set("place_id",$(e+" select#country_id").val()),""===$(e+" input#branch_id").val()||t.get("place")||t.get("q")?t.unset("branch_id"):t.set("branch_id",$(e+" input#branch_id").val()),u=[],l=0,c=(i=$(e+" input[type=checkbox][name=type]")).length;l<c;l++)(a=i[l]).checked&&u.push(a.value);for(n=0,o=(p=[$(e+" select#type").val(),$(e+" select#secondary_type").val()]).length;n<o;n++)(d=p[n])&&u.push(d);return u=_(u).sortBy(function(t){return[t]}),t.set("type",u.join(",")),t.set("tags",u.join(",")),"least-expensive-first"===$(e+" select#sort_select").val()&&t.set("sorted","least-expensive-first"),"most-expensive-first"===$(e+" select#sort_select").val()&&t.set("sorted","most-expensive-first"),"most-recent-first"===$(e+" select#sort_select").val()&&t.set("sorted","most-recent-first"),"most-square-feet-first"===$(e+" select#sort_select").val()&&t.set("sorted","most-square-feet-first"),"least-square-feet-first"===$(e+" select#sort_select").val()&&t.set("sorted","least-square-feet-first"),"most-recently-launched-first"===$(e+" select#sort_select").val()&&t.set("sorted","most-recently-launched-first"),"recommended"===$(e+" select#sort_select").val()&&t.set("sorted","recommended"),"most-recently-updated-first"===$(e+" select#sort_select").val()&&t.set("sorted","most-recently-updated-first"),t.set("channel",$(e+" input#channel").val()),$(e+" #buy").is(":checked")&&t.set("channel","sales"),$(e+" #let").is(":checked")&&t.set("channel","lettings"),$(e+" #status").is(":checked")?t.set("status",$(e+" #status").val()):t.unset("status"),$(e+" input#pppw_price").is(":checked")?t.set("pppw_price","pppw_price"):t.unset("pppw_price"),$(e+" #short-lets").is(":checked")?t.set("short-lets","short-lets"):t.unset("short-lets"),Ctesius.kickEvent("after_search_builder",t),t},t}()}).call(this); 95(function(){Ctesius.Models.SearchPresenter=function(){function e(){}return e.configureForm=function(e){var t,n,i,s,r,c;if(this.pppwCheckBox(e),Ctesius.Models.SearchPresenter.setPriceFromConfig(e.get("channel")),$("select#min_beds").val(e.get("min_beds")),$("select#min_price").val(e.get("min_price")),$("select#max_price").val(e.get("max_price")),$("select#max_beds").val(e.get("max_beds")),$("#min_acreage").val(e.get("min_acreage")),$("#max_acreage").val(e.get("max_acreage")),$("#min_square_feet").val(e.get("min_square_feet")),$("#max_square_feet").val(e.get("max_square_feet")),$("select#created_ago").val(e.get("created_ago")),$("select#updated_ago").val(e.get("updated_ago")),null!=e.get("within")&&$("select#within").val(e.get("within")),null!=e.get("type"))for(t=0,n=(r=(s=e.get("type")).split(",")).length;t<n;t++)s=r[t],$("select#secondary_type:has(option[value='"+s+"'])").length>0&&$("select#secondary_type").val(s),$("select#type:has(option[value='"+s+"'])").length>0&&$("select#type").val(s);return e.has("sorted")?$("select#sort_select").val(e.get("sorted")):$("select#sort_select").val(Ctesius.getConfig("default_"+e.get("channel")+"_search_order")),e.get("status")===$("#status").val()&&$("#status").attr("checked","checked"),e.get("short-lets")&&$("#short-lets").attr("checked","checked"),"sales"===e.get("channel")&&$("#buy").attr("checked","checked"),"lettings"===e.get("channel")&&$("#let").attr("checked","checked"),$("input#channel").attr("value",e.get("channel")),null!=e.get("place")?Ctesius.getPathManager().isPath("property_show")&&Ctesius.getConfig("hide_place_from_form")||(i=e.get("place").get("name"),$("select#place_id").val(e.get("place").get("place_id")),null!=e.get("place").get("county_name")&&(i=i+", "+e.get("place").get("county_name")),$("input#location").val(i)):e.get("text")&&$("input#location").val(unescape(e.get("text"))),$("input:radio[name='channel']").bind("click",(c=this,function(e){return c.displayPPPW(e),c.setPriceFromConfig(e.target.value)})),$("button#channel_sales").bind("click",function(t){return function(n){return t.displayPPPW(n),e.set("channel","sales"),$("input#channel").attr("value",e.get("channel")),t.setPriceFromConfig("sales")}}(this)),$("button#channel_lettings").bind("click",function(t){return function(n){return t.displayPPPW(n),e.set("channel","lettings"),$("input#channel").attr("value",e.get("channel")),t.setPriceFromConfig("lettings")}}(this)),$("input#pppw_price").bind("change",function(e){return function(){return $("input#pppw_price").is(":checked")?e.setPPPWView():e.setPriceFromConfig("lettings")}}(this)),$("select#min_price").bind("change",function(e){return function(){return e.optionsConnector("price","min")}}(this)),$("select#max_price").bind("change",function(e){return function(){return e.optionsConnector("price","max")}}(this)),$("select#min_beds").bind("change",function(e){return function(){return e.optionsConnector("beds","min")}}(this)),$("select#max_beds").bind("change",function(e){return function(){return e.optionsConnector("beds","max")}}(this)),this.configureOptions(e)},e.optionsConnector=function(e,t){var n,i,s,r,c,a;return"min"===t?(r=$("select#min_"+e+" option:selected"),n=$("select#max_"+e+" option"),this.reinstateAllOptions(n),a=parseInt(this.getSelectedValues(r)),this.removeLowerOptions(n,a)):(i=$("select#max_"+e+" option:selected"),s=$("select#min_"+e+" option"),this.reinstateAllOptions(s),c=parseInt(this.getSelectedValues(i)),this.removeGreaterOptions(s,c))},e.reinstateAllOptions=function(e){var t,n,i,s;for(s=[],n=0,i=e.length;n<i;n++)t=e[n],s.push(t.style.display="block");return s},e.getSelectedValues=function(e){var t,n,i,s;for(s=[],n=0,i=e.length;n<i;n++)""!==(t=e[n]).value&&s.push(t.value);return s[0]},e.configureOptions=function(e){var t;if(e.get("min_beds")&&(t=e.get("min_beds"),this.configureDropDown("max","beds",t)),e.get("max_beds")&&(t=e.get("max_beds"),this.configureDropDown("min","beds",t)),e.get("min_price")&&(t=e.get("min_price"),this.configureDropDown("max","price",t)),e.get("max_price"))return t=e.get("max_price"),this.configureDropDown("min","price",t)},e.configureDropDown=function(e,t,n){var i,s,r,c;return"max"===e?(i=$("select#max_"+t+" option"),c=parseInt(n),this.removeLowerOptions(i,c)):(s=$("select#min_"+t+" option"),r=parseInt(n),this.removeGreaterOptions(s,r))},e.removeLowerOptions=function(e,t){var n,i,s,r;for(r=[],i=0,s=e.length;i<s;i++)n=e[i],parseInt(n.value)<=t?r.push(n.style.display="none"):r.push(void 0);return r},e.removeGreaterOptions=function(e,t){var n,i,s,r;for(r=[],i=0,s=e.length;i<s;i++)n=e[i],parseInt(n.value)>=t?r.push(n.style.display="none"):r.push(void 0);return r}
95,e.pppwCheckBox=function(e){return"lettings"===e.get("channel")||$("input#let").is(":checked")?($("input#pppw_price, label[for='pppw_price']").show(),e.get("pppw_price")?$("input#pppw_price").attr("checked","checked"):void 0):$("input#pppw_price, label[for='pppw_price']").hide()},e.setPriceFromConfig=function(e){var t;if(null==e&&(e=Ctesius.getConfig("default_channel")),""!==(t="lettings"===e||$("input#let").is(":checked")?this.setLettingsPriceList():this.setSalesPriceList()))return this.populateMinMaxPrice(t)},e.setSalesPriceList=function(){return $("button#channel_sales").removeClass("btn-unselected"),$("button#channel_lettings").addClass("btn-unselected"),Ctesius.getConfig("sales_price_dropdown_list")},e.setLettingsPriceList=function(){return $("input#pppw_price").is(":checked")?Ctesius.getConfig("lettings_price_pppw_dropdown_list"):($("button#channel_sales").addClass("btn-unselected"),$("button#channel_lettings").removeClass("btn-unselected"),Ctesius.getConfig("lettings_price_dropdown_list"))},e.setPPPWView=function(){var e;return e=Ctesius.getConfig("lettings_price_pppw_dropdown_list"),this.populateMinMaxPrice(e)},e.populateMinMaxPrice=function(e){var t,n,i,s;return t=null!=(i=Ctesius.getConfig("price_dropdown_max_header"))?i:"Max Price",n=null!=(s=Ctesius.getConfig("price_dropdown_min_header"))?s:"Min Price",$("select#min_price").html('<option title="'+n+'" value="">'+n+"</option>"+e),$("select#max_price").html('<option title="'+t+'" value="">'+t+"</option>"+e),Ctesius.kickEvent("prices_set_from_config")},e.displayPPPW=function(e){var t;return t=$("input#pppw_price, label[for='pppw_price']"),"lettings"===e.currentTarget.value?t.show():t.hide()},e}()}).call(this); 96(function(){Ctesius.Models.Settings=function(){function n(){}return n}()}).call(this); 97(function(){var t=function(t,o){function a(){this.constructor=t}for(var n in o)e.call(o,n)&&(t[n]=o[n]);return a.prototype=o.prototype,t.prototype=new a,t.__super__=o.prototype,t},e={}.hasOwnProperty;Ctesius.Models.Valuation=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return t(o,e),o.prototype.initialize=function(){return this.set("valuationMap",""),this.set("valuationMarkerGroup",[]),this.set("currentStep",0)},o.prototype.incrementStep=function(){return this.set("currentStep",this.get("currentStep")+1)},o.prototype.decrementStep=function(){return this.set("currentStep",this.get("currentStep")-1)},o.prototype.lettingsPrice=function(t){var e;return e=parseInt(t)/100*2.83/12,Ctesius.getConfig("homeval_lettings_adjustment")&&(e*=Ctesius.getConfig("homeval_lettings_adjustment")),e},o.prototype.formatLettingsPrice=function(t){return("\xa3"+Math.round(t)+"/month").replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")},o.prototype.salesPrice=function(t){return parseInt(t)},o.prototype.formatSalesPrice=function(t){return("\xa3"+Math.round(t)).replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")},o.prototype.validatePostcode=function(t){return new RegExp(/^[a-zA-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][a-zA-Z]{2}$/).test(t)},o.prototype.getAddresses=function(t){return $.ajax({url:"/address_lookup?postcode="+t,method:"GET",success:function(t){return $("#valuation_not-found-message").html(""),t},error:function(){var t;return t="Apologies, we do not seem to have any records for that postcode in our system. Please contact your local branch for a valuation.",$("#valuation_not-found-message").html("").append(t)}})},o.prototype.formatAddressOption=function(t){var e,o,a;return e=$("<option>"),a=t.split(","),o="",a.each(function(t,e){return""!==t&&" "!==t&&0===e?o+=t:""!==t&&" "!==t?o+=", "+t:void 0}),e.text(o)},o.prototype.getSimilarProperties=function(t,e,o,a){return $.ajax({method:"GET",url:"/properties/similar_properties",data:{bedrooms:e,postcode:t,channel:o,property_type:a},success:function(t){return t}})},o.prototype.buildSimilarPropertiesMarkup=function(t){var e,o,a,n,r,i,p,s;for(e=$("<div>"),a=0,r=i=0,s=t.length-1;(0<=s?i<=s:i>=s)&&!(a>5);r=0<=s?++i:--i)p=$('<label for="'+t[r].property_id+'" contenteditable="false">'),(o=$('<input id="'+t[r].property_id+'" type="checkbox">')).val(t[r].property_id),t[r].photos.length?p.append('<img src="https://mr0.homeflow-assets.co.uk/'+t[r].photos[0].replace("120x90","350x240")+'" alt="Property '+r+'" style="width: 100%;"/>'):p.append('<img src="/no-image-av.png" alt="No image placeholder" style="width: 100%; height: 136px;"/>'),p.append("<p> "+t[r].display_address.split(",")[0]+"<br />"+t[r].price+"<br />"+t[r].bedrooms+" bedrooms<br />"+t[r].postcode+"</p>"),(n=$('<div class="similar-property" style="display: inline-block; float: left;">')).append(o),n.append(p),e.append(n),a++;return e},o.prototype.getValuation=function(t){var e;return e=this,$.getJSON("/valuations.json",this.buildValuationParams(),function(o){var a;return $.each(o,function(t,o){return e.set(t,Math.round(o))}),a="/address_lookup?postcode="+$("#valuation_postcode").val()+"&house_number="+$("#valuation_house-number").val(),$.ajax({method:"GET",url:a,success:function(e){return t(o,e)},error:function(t){return console.log(t)}})})},o.prototype.buildValuationParams=function(){var t,e,o,a,n,r,i;return n=[],e=(t=$(".valuation_prefs label.optin-label__account_confirmation_status input[type=checkbox]")[0])?t.checked:null,o=(a=$(".valuation_prefs label.optin-label__opt_in_marketing input[type=checkbox]")[0])?a.checked:null,r=(i=$(".valuation_prefs label.optin-label__opt_in_terms input[type=checkbox]")[0])?i.checked:null,$("#similar-properties input[type=checkbox]").each(function(t,e){if(this.checked)return n.push($(e).val())}),{search:{paon:$("#valuation_house-number").val(),postcode:$("#valuation_postcode").val().toUpperCase(),properties:n,property_type:$("#valuation_property-type").val(),bedrooms:$("#valuation_bedrooms").val()},lead:{first_name:$("#valuation_first_name").val(),last_name:$("#valuation_last_name").val(),tel_home:$("#valuation_phone").val(),email:$("#valuation_email").val(),moving_plans:$("#valuation_interest").val(),reason:$("#valuation_reason").val(),plans:$("#valuation_interest").val(),full_address:$("#address_dropdown").val(),is_branch_lead:$("#valuation_is_branch_lead").val(),branch_id:$("#valuation_branch").val(),account_confirmation_status:e,opt_in_marketing:o,opt_in_terms:r,opt_in_marketing_statement:$(".valuation_prefs label.optin-label__opt_in_marketing").text(),opt_in_marketing_url:document.URL,contact_by_phone:$("#valuation_contact_by_phone").is(":checked"),contact_by_email:$("#valuation_contact_by_email").is(":checked"),contact_by_sms:$("#valuation_contact_by_sms").is(":checked"),contact_by_post:$("#valuation_contact_by_post").is(":checked")}}},o.prototype.getRecentSales=function(t,e){return this,$.ajax({method:"GET",url:"/valuations/recent_sales",data:{postcode:t,property_type:e},success:function(t){return t}})},o.prototype.formatRecentSale=function(t){var e,o,a;return e=$("<li>"),a=t.sale.street_address.split(","),e.text(a[0]+" "+a[1]),(o=$('<span class="comparable-property-price">
97')).text("\xa3"+t.sale.sale_price.toLocaleString()),e.append(o)},o.prototype.createMap=function(){if(!this.get("valuationMap"))return Ctesius.getConfig("google_maps_api_key")?this.set("valuationMap",L.map("valuation-map",{zoomControl:!1})):this.set("valuationMap",L.map("valuation-map-no-streetview",{zoomControl:!1})),L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery \xa9 <a href="http://mapbox.com">Mapbox</a>',maxZoom:20}).addTo(this.get("valuationMap"))},o}(Backbone.Model)}).call(this); 98(function(){var t=function(t,r){function e(){this.constructor=t}for(var n in r)o.call(r,n)&&(t[n]=r[n]);return e.prototype=r.prototype,t.prototype=new e,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Collections.Articles=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.model=Ctesius.Models.Article,r}(Backbone.Collection)}).call(this); 99(function(){var t=function(t,r){function n(){this.constructor=t}for(var e in r)o.call(r,e)&&(t[e]=r[e]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Collections.Branches=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.model=Ctesius.Models.Branch,r}(Backbone.Collection)}).call(this); 100(function(){var t=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty;Ctesius.Collections.GeoFeatures=function(o){function e(){return e.__super__.constructor.apply(this,arguments)}return t(e,o),e.prototype.model=Ctesius.Models.GeoFeature,e}(Backbone.Collection)}).call(this); 101(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e=function(t,e){function o(){this.constructor=t}for(var n in e)r.call(e,n)&&(t[n]=e[n]);return o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype,t},r={}.hasOwnProperty;Ctesius.Collections.Groups=function(r){function o(){return this.removeGroupById=t(this.removeGroupById,this),o.__super__.constructor.apply(this,arguments)}return e(o,r),o.prototype.model=Ctesius.Models.Group,o.prototype.inBrowserStorageEnabled=function(){return null==Ctesius.getUser()||"local"===Ctesius.getUser().userType()},o.prototype.localStorage=new Backbone.LocalStorage("Groups"),o.boot=function(){var t;return t=new Ctesius.Collections.Groups,Ctesius.getUser(),t.fetch({reset:!0}),t},o.prototype.fetch=function(t){return null==t&&(t={}),t.reset=!0,Backbone.Collection.prototype.fetch.call(this,t)},o.prototype.url=function(){return Ctesius.getConfig("root_url")+"groups.ljson"},o.prototype.initialize=function(){return this.getOrCreateGroupsView().render(),this.on("add",this.groupAddedKicker,this),this.on("remove",this.groupRemovedKicker,this),this.on("reset",function(){return _.each(this.models,(t=this,function(e){if(null!=e.id)return t.groupAddedKicker(e)}));var t},this),this.registerEvents()},o.prototype.parse=function(t){return null!=t.groups&&t.groups.length>0?t.groups:window.typeIsArray(t)&&t.length>0?t:null},o.prototype.id="GroupsCollection-17072013",o.prototype.registerEvents=function(){var t;return Ctesius.registerEvent("user_logged_in",(t=this,function(){return t.newUserHasLoggedIn()}),Ctesius.Collections.Groups),Ctesius.registerEvent("user_logged_out",function(t){return function(){return t.userLoggedOut()}}(this),Ctesius.Collections.Groups)},o.prototype.save=function(t){return Backbone.sync("update",this,{success:function(){if(null!=t&&null!=t.callback)return t.callback()},error:function(){}})},o.prototype.toJSON=function(t){var e;return e=o.__super__.toJSON.call(this,t),_.select(e,function(t){return null!=t.group_id})},o.prototype.groupAddedKicker=function(t){return Ctesius.kickEvent("group_added",t,this)},o.prototype.groupRemovedKicker=function(){return Ctesius.kickEvent("group_removed",property,this)},o.prototype.addGroupById=function(t,e){var r;if(null==this.get(t))return r=Ctesius.getGroupsCollection().get(t),this.addGroup(r,e)},o.prototype.addGroup=function(t,e){if(null!=t&&!this.get(t.id))return this.add(t),this.store({add:t,callback:e})},o.prototype.store=function(t){var e,r;return this.inBrowserStorageEnabled()?this.save({callback:function(){if(null!=t.add)return t.callback(t.add)}}):null!=t.remove?(r=Ctesius.getConfig("root_url")+"groups/"+t.remove.get("group_id"),$.ajax({url:r,type:"DELETE",success:function(){}})):null!=t.add?(r=Ctesius.getConfig("root_url")+"groups.ljson",e=t.add.get("group_id"),$.post(r,{group_ids:e},t.callback(t.add))):void 0},o.prototype.removeGroupById=function(t){return $.ajax({method:"DELETE",url:Ctesius.getConfig("root_url")+"groups/"+t}
101),Ctesius.getGroupsCollection().fetch()},o.prototype.getOrCreateGroupsView=function(){return null!=this.groupsView?this.groupsView:this.groupsView=new Ctesius.Views.Groups({collection:this})},o.prototype.newUserHasLoggedIn=function(){var t,e,r;return(t=_.map(this.toJSON(),function(t){return t.groups_id})).length>0?(e=Ctesius.getConfig("root_url")+"groups.ljson",$.post(e,{group_ids:t.join(",")},(r=this,function(t){return r.localStorage.destroy(r),t.groups&&t.groups.length>0?r.reset(t.groups):r.reset()}))):this.fetch({reset:!0})},o.prototype.userLoggedOut=function(){var t;return _.each(this.models,(t=this,function(e){return t.groupRemovedKicker(e)})),this.reset({})},o}(Backbone.Collection)}).call(this); 102(function(){var t=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty;Ctesius.Collections.InterestingBranches=function(n){function e(){return e.__super__.constructor.apply(this,arguments)}return t(e,n),e.prototype.model=Ctesius.Models.Branch,e.boot=function(t,n){var e,r,o,s;return null==(e=t.last())&&(e=n.last()),null!=e&&(null!=(o=e.get("place"))&&(r={place_id:o.get("place_id")},null!=Ctesius.getConfig("interesting_branch_conditions")&&(r.search=Ctesius.getConfig("interesting_branch_conditions")),r=jQuery.param(r),s=Ctesius.getConfig("root_url")+"branches.ljson?"+r,$.ajax({url:s,type:"get",success:function(t){var n;return n=new Ctesius.Collections.InterestingBranches(t.branches),new Ctesius.Views.InterestingBranches({collection:n,place:o})}})))},e}(Backbone.Collection)}).call(this); 103(function(){var e=function(e,n){function r(){this.constructor=e}for(var i in n)t.call(n,i)&&(e[i]=n[i]);return r.prototype=n.prototype,e.prototype=new r,e.__super__=n.prototype,e},t={}.hasOwnProperty;Ctesius.Collections.InterestingProperties=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.model=Ctesius.Models.Property,n.boot=function(e,t,n){var r,i,s,o,l,u,p,c,a,g;return g=[],null!=(l=t.last())&&null!=(p=l.properties())&&(g=p),null==n&&(n=[]),a=n.map(function(e){return e.properties()}).flatten(),c=e.models,o=[],null!=Ctesius.getConfig("fallback_interesting_properties")&&(o=new Ctesius.Collections.Properties(Ctesius.getConfig("fallback_interesting_properties")).models),u=_.shuffle(_.union(g,a,c,o)),u=Ctesius.getConfig("only_available_interesting_properties")?_.reject(u,function(e){return null!=e.exclude_from_implied&&e.exclude_from_implied||"Sold"===e.status||"Under Offer"===e.status||"SSTC"===e.status}):_.reject(u,function(e){return null!=e.exclude_from_implied&&e.exclude_from_implied}),Ctesius.getConfig("only_brand_interesting_properties")&&(i=Ctesius.getConfig("agency_name"),r=parseInt(Ctesius.getConfig("agency_id"),10),u=_.reject(u,function(e){return e.agency_id!==r||e.agency_name!==i})),(s=new Ctesius.Collections.InterestingProperties(u)).getOrCreateInterestingPropertiesView(),s},n.prototype.getOrCreateInterestingPropertiesView=function(){return null!=this._interesting_properties_view?this._interesting_properties_view:this._interesting_properties_view=new Ctesius.Views.InterestingProperties({collection:this})},n}(Backbone.Collection)}).call(this); 104(function(){var t=function(t,n){function r(){this.constructor=t}for(var e in n)o.call(n,e)&&(t[e]=n[e]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},o={}.hasOwnProperty;Ctesius.Collections.LocalBusinessData=function(o){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,o),n.prototype.model=Ctesius.Models.LocalBusinessData,n}(Backbone.Collection)}).call(this); 105(function(){var t=function(t,r){function e(){this.constructor=t}for(var n in r)o.call(r,n)&&(t[n]=r[n]);return e.prototype=r.prototype,t.prototype=new e,t.__super__=r.prototype,t},o={}.hasOwnProperty;Ctesius.Collections.Properties=function(o){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,o),r.prototype.model=Ctesius.Models.Property,r}(Backbone.Collection)}).call(this); 106(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function o(){this.constructor=e}for(var s in t)r.call(t,s)&&(e[s]=t[s]);return o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype,e},r={}.hasOwnProperty;Ctesius.Collections.SavedProperties=function(r){function o(){return this.removeSavedPropertyById=e(this.removeSavedPropertyById,this),o.__super__.constructor.apply(this,arguments)}return t(o,r),o.prototype.model=Ctesius.Models.Property,o.prototype.inBrowserStorageEnabled=function(){return null==Ctesius.getUser()||"local"===Ctesius.getUser().userType()},o.prototype.localStorage=new Backbone.LocalStorage("SavedProperties"),o.boot=function(){var e;
106return e=new Ctesius.Collections.SavedProperties,Ctesius.getUser(),e.fetch({reset:!0}),e},o.prototype.fetch=function(e){return null==e&&(e={}),e.reset=!0,Backbone.Collection.prototype.fetch.call(this,e)},o.prototype.url=function(){return Ctesius.getConfig("root_url")+"saved_properties.ljson"},o.prototype.initialize=function(){return this.getOrCreateSavedPropertiesView().render(),this.on("add",this.savedPropertyAddedKicker,this),this.on("remove",this.savedPropertyRemovedKicker,this),this.on("reset",function(){return _.each(this.models,(e=this,function(t){if(null!=t.id)return e.savedPropertyAddedKicker(t)}));var e},this),this.registerEvents()},o.prototype.parse=function(e){return null!=e.properties&&e.properties.length>0?e.properties:window.typeIsArray(e)&&e.length>0?e:null},o.prototype.id="savedPropertiesCollection-17072013",o.prototype.registerEvents=function(){var e;return Ctesius.registerEvent("user_logged_in",(e=this,function(){return e.newUserHasLoggedIn()}),Ctesius.Collections.SavedProperties),Ctesius.registerEvent("user_logged_out",function(e){return function(){return e.userLoggedOut()}}(this),Ctesius.Collections.SavedProperties)},o.prototype.save=function(e){return Backbone.sync("update",this,{success:function(){if(null!=e&&null!=e.callback)return e.callback()},error:function(){}})},o.prototype.toJSON=function(e){var t;return t=o.__super__.toJSON.call(this,e),_.select(t,function(e){return null!=e.property_id})},o.prototype.savedPropertyAddedKicker=function(e){return Ctesius.kickEvent("saved_property_added",e,this)},o.prototype.savedPropertyRemovedKicker=function(e){return Ctesius.kickEvent("saved_property_removed",e,this)},o.prototype.addSavedPropertyById=function(e,t){var r;if(null==this.get(e))return r=Ctesius.getPropertiesCollection().get(e),this.addProperty(r,t)},o.prototype.addProperty=function(e,t){if(null!=e&&!this.get(e.id))return this.add(e),this.store({add:e,callback:t})},o.prototype.store=function(e){var t,r;return this.inBrowserStorageEnabled()?this.save({callback:function(){if(null!=e.add)return e.callback(e.add)}}):null!=e.remove?(r=Ctesius.getConfig("root_url")+"saved_properties/"+e.remove.get("property_id"),$.ajax({url:r,type:"DELETE",success:function(){}})):null!=e.add?(r=Ctesius.getConfig("root_url")+"saved_properties.ljson",t=e.add.get("property_id"),$.post(r,{property_ids:t},e.callback(e.add))):void 0},o.prototype.removeSavedPropertyById=function(e){var t;return t=this.get(e),this.remove(t),this.store({remove:t})},o.prototype.getOrCreateSavedPropertiesView=function(){return null!=this.savedPropertiesView?this.savedPropertiesView:this.savedPropertiesView=new Ctesius.Views.SavedProperties({collection:this})},o.prototype.newUserHasLoggedIn=function(){var e,t,r;return(e=_.map(this.toJSON(),function(e){return e.property_id})).length>0?(t=Ctesius.getConfig("root_url")+"saved_properties.ljson",$.post(t,{property_ids:e.join(",")},(r=this,function(e){return r.localStorage.destroy(r),e.properties&&e.properties.length>0?r.reset(e.properties):r.reset()}))):this.fetch({reset:!0})},o.prototype.userLoggedOut=function(){var e;return _.each(this.models,(e=this,function(t){return e.savedPropertyRemovedKicker(t)})),this.reset({})},o}(Backbone.Collection)}).call(this); 107(function(){var e=function(e,r){function n(){this.constructor=e}for(var s in r)t.call(r,s)&&(e[s]=r[s]);return n.prototype=r.prototype,e.prototype=new n,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Collections.SavedSearches=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.model=Ctesius.Models.Search,r.prototype.inBrowserStorageEnabled=function(){return null==Ctesius.getUser()||"local"===Ctesius.getUser().userType()},r.prototype.registerEvents=function(){var e;return Ctesius.registerEvent("user_logged_in",(e=this,function(){return e.newUserHasLoggedIn()}),Ctesius.Collections.SavedSearches),Ctesius.registerEvent("user_logged_out",function(e){return function(){return e.userLoggedOut()}}(this),Ctesius.Collections.SavedSearches)},r.prototype.localStorage=new Backbone.LocalStorage("SavedSearches"),r.prototype.id="savedsearchesCollection-17072013",r.prototype.url=function(){return Ctesius.getConfig("root_url")+"saved_searches.ljson"},r.boot=function(){var e;
107return e=new Ctesius.Collections.SavedSearches,Ctesius.getUser(),e.fetch({async:!1,reset:!0}),e},r.prototype.toJSON=function(e){var t;return t=r.__super__.toJSON.call(this,e),_.select(t,function(e){return 0!==Object.keys(e).length})},r.prototype.containsSearch=function(e){var t;return t=!1,_.each(this.models,function(r){if(r.equalTo(e))return t=!0}),t},r.prototype.addSearch=function(e,t){if(null==t&&(t=null),e.unset("page"),t&&e.set(t),!this.containsSearch(e))return this.add(e),e.performAsData(),this.store({add:e})},r.prototype.store=function(e){var t,r;if(this.inBrowserStorageEnabled()){if(this.save({}),null!=e.remove)return this.savedSearchRemovedKicker(e.remove);if(null!=e.add)return this.savedSearchAddedKicker(e.add)}else{if(null!=e.remove)return r=Ctesius.getConfig("root_url")+"searches/"+e.remove.get("search_id"),$.ajax({url:r,type:"DELETE",success:function(t){return function(){return t.savedSearchRemovedKicker(e.remove)}}(this)});if(null!=e.add)return r=e.add.link(),$.ajax({type:"POST",url:r,async:!0,dataType:"json",success:function(t){return function(r){return e.add.set("search_id",r.id),t.savedSearchAddedKicker(e.add)}}(this)});if(null!=e.update)return t=this,$.ajax({type:"PUT",url:"/saved_searches?id="+e.update.get("search_id")+"&alert_frequency="+e.update.get("alert_frequency"),success:function(){return t.trigger("update",e.update),t.savedSearchUpdatedKicker(e.update)}})}},r.prototype.removeSearchById=function(e){var t;return t=null,t=this.get(e),this.remove(t),this.store({remove:t})},r.prototype.updateSearchById=function(e,t){var r;return r=null,(r=this.get(e)).set(t),this.store({update:r})},r.prototype.toLiquid=function(){var e;return e=_.collect(this.models,function(e){var t;return null!=e.get("channel")?(null==(t=e.toJSON()).search_id&&(t.search_id=e.cid),t.link=e.link(),t.description=e.description(),t):{}}),_.select(e,function(e){return Object.keys(e).length>2})},r.prototype.initialize=function(){return this.on("add",function(){return _.each(this.models,(e=this,function(t){if(0!==Object.keys(t).length)return e.savedSearchAddedKicker(t)}));var e},this),this.registerEvents()},r.prototype.savedSearchAddedKicker=function(e){return Ctesius.kickEvent("saved_search_added",e,this)},r.prototype.savedSearchRemovedKicker=function(e){return Ctesius.kickEvent("saved_search_removed",e,this)},r.prototype.savedSearchUpdatedKicker=function(e){return Ctesius.kickEvent("saved_search_updated",e,this)},r.prototype.save=function(){return Backbone.sync("update",this,{success:function(){},error:function(){}})},r.prototype.newUserHasLoggedIn=function(){var e;return this.models.length<1?this.fetch():async.forEach(this.models,function(e,t){var r;if(r=e.link(),e.isValid())return $.ajax({type:"POST",url:r,async:!0,dataType:"json",success:function(){return t()}})},(e=this,function(){return e.fetch({async:!1})})),this.localStorage.destroy(this)},r.prototype.userLoggedOut=function(){var e;return _.each(this.models,(e=this,function(t){return e.savedSearchRemovedKicker(t)})),this.reset({})},r}(Backbone.Collection)}).call(this); 108(function(){var e=function(e,r){function o(){this.constructor=e}for(var n in r)t.call(r,n)&&(e[n]=r[n]);return o.prototype=r.prototype,e.prototype=new o,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Collections.UserHistory=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.model=Ctesius.Models.Search,r.prototype.localStorage=new Backbone.LocalStorage("UserHistory"),r.prototype.id="UserHistoryCollection-17072013",r.prototype.walks=1,r.prototype.inBrowserStorageEnabled=function(){return!0},r.boot=function(){var e;return(e=new Ctesius.Collections.UserHistory).fetch({async:!0,reset:!0}),e.getMostRecentSearch().done(function(t){return e.mostRecentSearchValue=t,e.getOrCreatMostRecentSearchView().render(),e.currentPageIsPropertyPage()&&e.getOrCreatNextAndPreviousPropertyView().render(),Ctesius.kickEvent("user_history_ready",e)}),e},r.prototype.toJSON=function(e){var t;return t=r.__super__.toJSON.call(this,e),_.select(t,function(e){return 0!==Object.keys(e).length})},r.prototype.mostRecentSearch=function(){return this.mostRecentSearchValue},r.prototype.getMostRecentSearch=function(){var e,t;return this.mrsR&&"pending"===this.mrsR.state()?this.mrsR:(this.mrsR=new jQuery.Deferred,this.currentPageIsPropertyPage()&&((e
108=this.at(this.mostRecentSearchPositionForCurrentProperty()))?this.mrsR.resolve(e):this.createSearchFromProperty().done((t=this,function(e){return t.mrsR.resolve(e)}))),this.mrsR)},r.prototype.createSearchFromProperty=function(){var e,t,r,o;return e=Ctesius.getProperty(),null!=Ctesius.getConfig("search_from_property")?(r=new jQuery.Deferred,(t=Ctesius.getConfig("search_from_property").call(e)).performAsData((o=this,function(){return r.resolve(t),o.addSearch(t,Ctesius.kickEvent("search_from_property_added"))})),r):(t=e.generatedSearch(),this.walkAlongSearchUntilPropertyFound(t,this.currentPropertyId()))},r.prototype.walkAlongSearchUntilPropertyFound=function(e,t){var r,o;return r=new jQuery.Deferred,e.performAsData((o=this,function(){var n;return _.find(e.get("performed_data").properties,function(e){return""+e.property_id===t})?o.addSearch(e,function(){return o._most_recent=void 0,o.getOrCreatNextAndPreviousPropertyView().render(),o.getOrCreatMostRecentSearchView().render(),r.resolve(e)}):e.get("performed_data").pagination.has_next_page&&((n=e.get("page"))||(n=1),e.unset("performed_data"),e.set("page",n+1),o.walks=o.walks+1,o.walks<10)?o.walkAlongSearchUntilPropertyFound(e,t).done(function(e){return r.resolve(e)}):void 0})),r},r.prototype.mostRecentSearchPositionForCurrentProperty=function(){var e,t,r,o,n,i,s,p,a;if(null==this._most_recent&&this.currentPageIsPropertyPage()){for(this._most_recent=!1,i=this.currentPropertyId(),a=[],r=o=0,n=(s=this.models).length;o<n;r=++o)(p=s[r])&&(e=p.get("performed_data"))&&e.properties&&(t=[].concat(e.properties),_.find(t,function(e){return""+e.property_id===i})&&a.push(r));this._most_recent=_.max(a)}return this._most_recent},r.prototype.currentPageIsPropertyPage=function(){return Ctesius.getPathManager().isPath("property_show")},r.prototype.lastSearchContainsCurrentProperty=function(){var e,t;return e=this.currentPropertyId(),t=this.last(),_.find(t.get("performed_data").properties,function(t){return""+t.property_id===e})},r.prototype.currentPropertyId=function(){var e;if(null!=(e=window.location.pathname.match(/.*\/properties\/(\d*)\/(sales|lettings)/)))return e[1]},r.prototype.refererWasASearchPage=function(){return this.urlIsASearchPage(document.referrer)},r.prototype.urlIsASearchPage=function(){return Ctesius.getPathManager().isPath("property_show")},r.prototype.containsSearch=function(e){var t;return t=!1,_.each(this.models,function(r){if(r.equalTo(e))return t=!0}),t},r.prototype.addSearch=function(e,t){var r;if(this.each((r=this,function(t){if(e.equalTo(t,!0))return r.remove(t)})),e.set("added",(new Date).getTime()),e.performAsData(function(r){return function(){return r.add(e),r.save(t)}}(this)),this.length>9)return this.remove(this.at(0))},r.prototype.comparator="added",r.prototype.removeSearchById=function(e){var t;return t=null,t=this.get(e),this.remove(t),this.store({remove:t})},r.prototype.toLiquid=function(){var e;return e=_.collect(this.models,function(e){var t;return null!=e.get("channel")?(null==(t=e.toJSON()).search_id&&(t.search_id=e.cid),t.link=e.link(),t.description=e.description(),t):{}}),_.select(e,function(e){return Object.keys(e).length>2})},r.prototype.positionOfPropertyInSearch=function(e,t){var r,o,n,i,s;for(null==t&&(t=this.mostRecentSearch()),o=null,r=n=0,i=(s=t.get("performed_data").properties).length;n<i;r=++n)""+s[r].property_id===e&&(o=r);return o},r.prototype.getNextProperty=function(){var e,t,r,o;return this._next_property?this._next_property:null!=(r=this.propertyAfter(this.currentPropertyId()))?this._next_property=r:(this.mostRecentSearch().get("performed_data").properties.length-1===this.positionOfPropertyInSearch(this.currentPropertyId())&&this.mostRecentSearch().get("performed_data").pagination.has_next_page&&(t=this.mostRecentSearch().clone(),(e=this.mostRecentSearch().get("page"))||(e=1),t.unset("performed_data"),t.set("page",e+1),t.performAsData((o=this,function(){return o.addSearch(t),o._next_property=t.get("performed_data").properties[0],o._most_recent=void 0,o.getOrCreatNextAndPreviousPropertyView().render()}))),null)},r.prototype.getPreviousProperty=function(){var e,t,r,o;return this._prev_property?this._prev_property:null!=(r=this.propertyBefore(this.currentPropertyId()))?this._prev_property=r:0===this.positionOfPropertyInSearch(this.currentPropertyId())?(t=this.mostRecentSearch().clone(),(e=this.mostRecentSearch().get("page"))&&(t.unset("performed_data"),t.set("page",e-1),t.performAsData((o=this,function(){if(o.addSearch(t),o._prev_property=t.get("performed_data").properties[o.getPropertySizeFromPagination(t)],o._most_recent=void 0,o._prev_property)return o.getOrCreatNextAndPreviousPropertyView().render()}))),null):void 0},r.prototype.getPropertySizeFromPagination=function(e){var t;return""!==(t=e.attributes.performed_data.pagination.to_record)?t-1:9},r.prototype.propertyAfter=function(e,t){return null==t&&(t=this.mostRecentSearch()),t.get("performed_data").properties[this.positionOfPropertyInSearch(e,t)+1]},r.prototype.propertyBefore=function(e){var t;return(t=this.mostRecentSearch()).get("performed_data").properties[this.positionOfPropertyInSearch(e,t)-1]},r.prototype.getOrCreatMostRecentSearchView=function(){return null!=this.mostRecentSearchView?this.mostRecentSearchView:this.mostRecentSearchView=new Ctesius.Views.MostRecentSearch({model:this})},r.prototype.getOrCreatNextAndPreviousPropertyView=function(){return null!=this.NextAndPreviousPropertyView?this.NextAndPreviousPropertyView:this.NextAndPreviousPropertyView=new Ctesius.Views.NextAndPreviousProperty({model:this})},r.prototype.initialize=function(){},r.prototype.save=function(e){return Backbone.sync("update",this,{success:(t=this,function(){return e&&e(),Ctesiu
108s.kickEvent("user_history_search_added",t)}),error:function(){}});var t},r}(Backbone.Collection)}).call(this); 109(function(){var t=function(t,r){function o(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return o.prototype=r.prototype,t.prototype=new o,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Collections.UserPropertyHistory=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.model=Ctesius.Models.Property,r.prototype.localStorage=new Backbone.LocalStorage("UserHistory"),r.prototype.id="UserPropertyHistoryCollection-17072013",r.prototype.walks=1,r.prototype.inBrowserStorageEnabled=function(){return!0},r.boot=function(){var t;return(t=new Ctesius.Collections.UserPropertyHistory).fetch({async:!0,reset:!0}),Ctesius.kickEvent("user_property_history_ready",t),t},r.prototype.toJSON=function(t){var e;return e=r.__super__.toJSON.call(this,t),_.select(e,function(t){return 0!==Object.keys(t).length})},r.prototype.currentPageIsPropertyPage=function(){return Ctesius.getPathManager().isPath("property_show")},r.prototype.currentPropertyId=function(){var t;if(null!=(t=window.location.pathname.match(/.*\/properties\/(\d*)\/(sales|lettings)/)))return t[1]},r.prototype.containsProperty=function(t){var e;return e=!1,_.each(this.models,function(r){if(r.equalTo(t))return e=!0}),e},r.prototype.addProperty=function(t,e){var r;if(this.each((r=this,function(e){if(t.get("property_id")===e.get("property_id"))return r.remove(e)})),t.set("added",(new Date).getTime()),this.add(t),this.save(e),this.length>9)return this.remove(this.at(0))},r.prototype.comparator="added",r.prototype.removePropertyById=function(t){var e;return e=null,e=this.get(t),this.remove(e),this.store({remove:e})},r.prototype.toLiquid=function(){var t;return t=_.collect(this.models,function(t){var e;return null!=t.get("channel")?(null==(e=t.toJSON()).property_id&&(e.property_id=t.cid),e.link=t.link(),e.description=t.description(),e):{}}),_.select(t,function(t){return Object.keys(t).length>2})},r.prototype.initialize=function(){},r.prototype.save=function(t){return Backbone.sync("update",this,{success:(e=this,function(){return t&&t(),Ctesius.kickEvent("user_property_history_property_added",e)}),error:function(){}});var e},r}(Backbone.Collection)}).call(this); 110(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},t=function(e,t){function n(){this.constructor=e}for(var i in t)o.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},o={}.hasOwnProperty;Ctesius.Views.DraggableMap=function(o){function n(){return this.onPolygonDrawn=e(this.onPolygonDrawn,this),this.updateURL=e(this.updateURL,this),n.__super__.constructor.apply(this,arguments)}var i;return t(n,o),n.prototype.initialize=function(){return null!=Ctesius.getConfig("draggable_map_view")&&null!=$(Ctesius.getConfig("draggable_map_view"))&&(this.element=Ctesius.getConfig("draggable_map_view"),this.mapLoadedTimes=1,this.render(),this.buildPolygon(),null!=this.collection&&this.addMarkersFor(this.collection.models),this.noLocationfound&&this.setToMarkeredBounds(),Ctesius.getConfig("custom_map_zoom")&&this.map.setZoom(Ctesius.getConfig("custom_map_zoom"))),Ctesius.kickEvent("map_view_rendered",this),this.mapLoadedTimes=2},n.prototype.template=function(){return null!=this._template?this._template:this._template=Ctesius.Template.load("property_map_pin_template")},n.prototype.render=function(){var e,t;return(t=Ctesius.getUserHistoryCollection().last())&&(Ctesius.storedPlace=t.get("place")),this.generateMap(),Ctesius.getConfig("free_text_search")||this.map.on("zoomend",function(e){return function(){return e.onMapDrag()}}(this)),this.map.on("dragend",function(e){return function(){return e.onMapDrag()}}(this)),e=this,this.map.on("popupopen",function(t){var o;if(Ctesius.kickEvent("map_marker_opened",t),(o=e.map.project(t.popup._latlng)).y-=t.popup._container.clientHeight/1.8,!Ctesius.getConfig("disable_map_pop_up_scroll"))return e.map.panTo(e.map.unproject(o),{animate:!0})}),this.map.on("popupclose",function(e){return Ctesius.kickEvent("map_marker_closed",e)})},n.prototype.generateMarker=function(e){var t,o,n,i,r,s,a,u,l,p,g,c,_,m;return null!=Ctesius.getConfig("custom_property_pin")?o=Ctesius.getConfig("custom_property_pin")(e):(n=null!=(l=Ctesius.getConfig("custom_map_icon"))?l:Ctesius.getConfig("root_url")+"assets/leaflet/marker-icon.png",i=null!=(p=Ctesius.getConfig("custom_map_icon_size"))?p:[25,41],s=null!=(g=Ctesius.getConfig("custom_map_shadow"))?g:Ctesius.getConfig("root_url")+"assets/leaflet/marker-shadow.png",r=null!=(c=Ctesius.getConfig("custom_map_shadow_icon_size"))?c:[41,41],a=null!=(_=Ctesius.getConfig("custom_map_icon_offset"))?_:[12,41],o=new L.Icon.Default({iconUrl:n,iconSize:i,shadowUrl:s,shadowSize:r,iconAnchor:a})),t=L.marker([e.get("lat"),e.get("lng")],{icon:o}
110),Ctesius.getConfig("do_not_show_marker_popup")||(m=this.template().render({property:e.toJSON()}),Ctesius.kickEvent("map_marker_rendered",e),u=new L.Point(Ctesius.getConfig("autopan_padding")[0],Ctesius.getConfig("autopan_padding")[1]),t.bindPopup(m,{autoPanPadding:u,autoPan:!Ctesius.getConfig("disable_map_pop_up_scroll")}),Ctesius.getConfig("pop_up_on_mouseover")&&(t.on("mouseover",function(){return t.openPopup()}),t.on("mouseout",function(){return setTimeout(function(){return t.closePopup()},4e3)}))),window["map_marker_"+e.get("property_id")]=t},n.prototype.generateGeoFeature=function(e){var t,o,n,i,r,s,a,u,l,p;return n=null!=(a=Ctesius.getConfig("custom_map_icon"))?a:Ctesius.getConfig("root_url")+"assets/leaflet/marker-icon.png",i=null!=(u=Ctesius.getConfig("custom_map_icon_size"))?u:[25,41],s=null!=(l=Ctesius.getConfig("custom_map_shadow"))?l:Ctesius.getConfig("root_url")+"assets/leaflet/marker-shadow.png",r=null!=(p=Ctesius.getConfig("custom_map_shadow_icon_size"))?p:[41,41],o=new L.Icon.Default({iconUrl:n,iconSize:i,shadowUrl:s,shadowSize:r}),(t=new L.marker([e.lat,e.lng],{icon:o})).bindPopup(e.name),Ctesius.getConfig("pop_up_on_mouseover")&&(t.on("mouseover",function(){return t.openPopup()}),t.on("mouseout",function(){return setTimeout(function(){return t.closePopup()},4e3)})),t},n.prototype.addGeoMarkers=function(e){var t,o,n;for(Ctesius.getConfig("pin_clustering")?((n=Ctesius.getConfig("custom_clustering_radius"))||(n=10),this.geo_marker_layer=new L.MarkerClusterGroup({maxClusterRadius:n})):this.geo_marker_layer=L.featureGroup(),t=0;t<e.length;)o=this.generateGeoFeature(e[t]),this.geo_marker_layer.addLayer(o),t++;return this.geo_marker_layer.addTo(this.map),this.bounds=this.geo_marker_layer.getBounds(),[this.geo_marker_layer.getBounds()]},n.prototype.generateMap=function(e){var t,o;if(o=Ctesius.getConfig("custom_max_zoom")?Ctesius.getConfig("custom_max_zoom"):16,null==e&&(e={minZoom:6,maxZoom:o,scrollWheelZoom:Ctesius.getConfig("enable_scroll_wheel_zoom"),dragging:!Ctesius.getConfig("disable_draggable_map")&&!L.Browser.mobile,tap:!L.Browser.mobile}),this.map=new L.Map(this.element,e),t=jQuery.extend({},Ctesius.getConfig("leaflet_layer")),Ctesius.getConfig("browser-lazyload-map-tiles")&&t.on("tileloadstart",function(e){return e.tile.setAttribute("loading","lazy")}),this.map.addLayer(t),t._url&&t._url.indexOf("google")>-1)return this.map.attributionControl.setPrefix('<img src="/assets/leaflet/google-logo.png" alt="Google" />').setPosition("bottomleft")},n.prototype.renderTiles=function(e){return this.tile_view=e?new Ctesius.Views.Tiles({collection:this.collection}):void 0},n.prototype.addMarkersFor=function(e){var t,o;return Ctesius.getConfig("pin_clustering")?((t=Ctesius.getConfig("custom_clustering_radius"))||(t=10),this.marker_layer=new L.MarkerClusterGroup({maxClusterRadius:t,showCoverageOnHover:!1})):this.marker_layer=L.featureGroup(),_.map(e,(o=this,function(e){var t;if(null!=e.get("property_id")&&0!==e.get("lat")&&0!==e.get("lng"))return t=o.generateMarker(e),o.marker_layer.addLayer(t),t})),this.marker_layer.addTo(this.map),this.bounds=this.marker_layer.getBounds(),[this.marker_layer.getBounds()]},n.prototype.setToMarkeredBounds=function(){if(null!=this.bounds)return Ctesius.getConfig("custom_map_bounds_padding")?this.map.fitBounds(this.bounds,Ctesius.getConfig("custom_map_bounds_padding")):this.map.fitBounds(this.bounds),Ctesius.getConfig("custom_map_centre_lat")&&Ctesius.getConfig("custom_map_centre_lng")&&this.map.setView([Ctesius.getConfig("custom_map_centre_lat"),Ctesius.getConfig("custom_map_centre_lng")],7),Ctesius.kickEvent("non_standard_zoom",this.map,4)},n.prototype.buildPolygon=function(){var e,t,o,n,i;return Ctesius.getConfig("enable_draw_a_map")&&null!=Ctesius.getSearch().get("poly")?(e=[],n=new L.Polygon.fromEncoded(Ctesius.getSearch().get("poly")),e=n.getBounds(),this.map.fire("draw:created",{layer:n,layerType:n.type}),this.map.fitBounds(e)):null!=Ctesius.getConfig("place")?null!=(o=Ctesius.getConfig("place")).radius&&""!==o.radius?(this.circle=new L.circle([o.lat,o.lng],1e3*o.radius,{fill:!1,weight:0}),this.map.addLayer(this.circle),t=new L.LatLng(o.lat,o.lng),this.map.fitBounds(this.circle.getBounds())):null!=o.polygon&&o.polygon.length>0?(e=[],_.each(o.polygon,(i=this,function(t){var o;return o=[],_.each(t,function(t){var n;return n=new L.LatLng(t[1],t[0]),e.push(n),o.push(n)}),t=new L.Polygon(o,{weight:10,fill:!0}),i.map.fire("draw:created",{layer:t,layerType:t.type,i:0})})),this.map.fitBounds(new L.LatLngBounds(e))):(t=new L.LatLng(o.lat,o.lng),this.map.setVie
110w(t,12)):this.noLocationfound=!0},n.prototype.onMapDrag=function(){var e,t,o,n;if(!Ctesius.getConfig("disable_draggable_map"))return e=this.getSearchableBounds(),o=1===this.mapLoadedTimes?Ctesius.getConfig("root_url")+"search.ljson?"+Ctesius.getSearch().toGetParams(!1)+"/view-"+e.toBBoxString()+"&count=50":Ctesius.getConfig("root_url")+"search.ljson?"+Ctesius.getSearch().unset("place").toGetParams(!1)+"/view-"+e.toBBoxString()+"&count=50",Ctesius.getConfig("get_geo_features")&&(t=Ctesius.getConfig("root_url")+"geo_features.ljson?"+Ctesius.getSearch().toGetParams(!1)+"/view-"+e.toBBoxString()+"&count=50",$.get(t,(n=this,function(e){return n._running_update=!1,null!=n.geo_marker_layer&&n.map.removeLayer(n.geo_marker_layer),n.addGeoMarkers(e)}))),null!=Ctesius.getConfig("map_branch_id")&&(o=o+"&branch_id="+Ctesius.getConfig("map_branch_id")),Ctesius.kickEvent("before_draggable_map_updated"),$.get(o,function(e){return function(t){return Ctesius.kickEvent("draggable_map_updated",t),e._running_update=!1,null!=e.marker_layer&&e.map.removeLayer(e.marker_layer),Ctesius.getPropertiesCollection().add(t.properties),e.collection=new Ctesius.Collections.Properties(t.properties),null!=e.tile_view&&(e.tile_view=new Ctesius.Views.Tiles({collection:e.collection})),e.addMarkersFor(e.collection.models)}}(this))},n.prototype.buildDrawnPolygon=function(e){var t,o,n,r,s,a,u,l,p,g,c,_;try{t=this.map.getPixelBounds()}catch(m){return e.getLatLngs()}return u=new ClipperLib.Paths,a=this.map.latLngToLayerPoint(this.map.getBounds().getNorthWest()),s=this.map.latLngToLayerPoint(this.map.getBounds().getNorthEast()),c=this.map.latLngToLayerPoint(this.map.getBounds().getSouthEast()),_=this.map.latLngToLayerPoint(this.map.getBounds().getSouthWest
110()),t=[new i(a.x,a.y),new i(s.x,s.y),new i(c.x,c.y),new i(_.x,_.y)],n=function(){var t,o,n,i;for(i=[],t=0,o=(n=e.getLatLngs()).length;t<o;t++)l=n[t],i.push(this.map.latLngToLayerPoint(l));return i}.call(this),g=[],o=new ClipperLib.Clipper,g=[function(){var e,t,o;for(o=[],e=0,t=n.length;e<t;e++)l=n[e],o.push(new i(l.x,l.y));return o}()],o.AddPath(g[0],ClipperLib.PolyType.ptSubject,!0),o.AddPath(t,ClipperLib.PolyType.ptClip,!0),o.Execute(ClipperLib.ClipType.ctIntersection,u,ClipperLib.PolyFillType.pftEvenOdd,ClipperLib.PolyFillType.pftEvenOdd),null!=u[0]&&(p=function(){var e,t,o,n;for(n=[],e=0,t=(o=u[0]).length;e<t;e++)r=o[e],n.push(this.map.layerPointToLatLng([r.X,r.Y]));return n}.call(this)),null==u[0]&&(p=[]),p},i=function(e,t){this.X=e,this.Y=t},n.prototype.updateURL=function(){var e;return Ctesius.getSearch(),e=(e=window.location.pathname.replace(/(.*\/sales|lettings).*/,"$1"))+"/"+Ctesius.getSearch().toHomeflowUrlParams(!0)+window.location.hash,window.history.replaceState("NaN",document.title,e)},n.prototype.onPolygonDrawn=function(e,t){var o,n,i,r;return null==t&&(t=!0),n=Ctesius.getSearch(),t&&null!=this.first&&!1===this.first&&n.set("poly",L.PolylineUtil.encode(this.buildDrawnPolygon(e))),n.get("poly")?(i=Ctesius.getConfig("root_url")+"search.ljson?"+n.toGetParams(!1,!1)+"&count=50",o=Ctesius.getConfig("root_url")+"geo_features.ljson?"+n.toGetParams(!1,!1)+"&count=50"):(i=Ctesius.getConfig("root_url")+"search.ljson?"+n.toGetParams(!1,!0)+"&count=50",o=Ctesius.getConfig("root_url")+"geo_features.ljson?"+n.toGetParams(!1,!0)+"&count=50"),null!=Ctesius.getConfig("map_branch_id")&&(i=i+"&branch_id="+Ctesius.getConfig("map_branch_id")),Ctesius.kickEvent("before_draggable_map_updated"),Ctesius.getConfig("get_geo_features")&&$.get(o,(r=this,function(e){return r._running_update=!1,null!=r.geo_marker_layer&&r.map.removeLayer(r.geo_marker_layer),r.addGeoMarkers(e)})),$.get(i,function(e){return function(t){return n.set("performed_data",t),Ctesius.getUserHistoryCollection().addSearch(n),Ctesius.kickEvent("clear_search_box"),Ctesius.kickEvent("draggable_map_updated",t),e._running_update=!1,null!=e.marker_layer&&e.map.removeLayer(e.marker_layer),e.collection=new Ctesius.Collections.Properties(t.properties),Ctesius.getPropertiesCollection().add(t.properties),null!=e.tile_view&&(e.tile_view=new Ctesius.Views.Tiles({collection:e.collection})),e.addMarkersFor(e.collection.models)}}(this))},n.prototype.getSearchableBounds=function(){return this.map.getBounds()},n.prototype.getAllowedBounds=function(e,t){var o,n,i,r,s,a;return s=t.lng,a=t.lat,o=e.getNorthEast().lng,n=e.getNorthEast().lat,s<(i=e.getSouthWest
110().lng)&&(s=i),s>o&&(s=o),a<(r=e.getSouthWest().lat)&&(a=r),a>n&&(a=n),new L.LatLng(a,s)},n}(Backbone.View)}).call(this); 111(function(){var e=function(e,r){function o(){this.constructor=e}for(var n in r)t.call(r,n)&&(e[n]=r[n]);return o.prototype=r.prototype,e.prototype=new o,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Views.DrawableMap=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.first=!0,r.__super__.initialize.apply(this,arguments),Ctesius.kickEvent("banner",this),Ctesius.kickEvent("drawbanner",this),Ctesius.kickEvent("editbanner",this),Ctesius.kickEvent("deletebanner",this),this.repositionDrawControls(),this.onMapDrag()},r.prototype.onMapDrag=function(){return 0===this.drawnItems.getLayers().length?r.__super__.onMapDrag.call(this):this.onPolygonDrawn(this.drawnItems.getLayers()[0],!0)},r.prototype.repositionDrawControls=function(){var e,t,r;if(e=Ctesius.getConfig("draw_controls_container")){for(t=this.drawControl.getContainer().parentNode,e=document.getElementById(e),r=[];t.childNodes.length>0;)r.push(e.appendChild(t.childNodes[0]));return r}},r.prototype.generateMap=function(e){var t;return e={minZoom:6,maxZoom:Ctesius.getConfig("custom_max_zoom")?Ctesius.getConfig("custom_max_zoom"):16,scrollWheelZoom:Ctesius.getConfig("enable_scroll_wheel_zoom"),zoomControl:!1,dragging:!Ctesius.getConfig("disable_drag_for_drawable_map")},r.__super__.generateMap.call(this,e),this.drawnItems=new L.FeatureGroup,this.map.addLayer(this.drawnItems),this.titleControl=new L.Control.Title,this.map.addControl(this.titleControl),new L.Control.Zoom({position:"topright"}).addTo(this.map),this.drawControl=new L.Control.Draw({position:"topleft",edit:{featureGroup:this.drawnItems,remove:!0},draw:{freehand:{featureGroup:this.drawnItems,simplifyFunction:Hull.parseVertices}}}),this.map.addControl(this.drawControl),this.map.on("draw:created",(t=this,function(e){var r,o,n;t.drawnItems.clearLayers(),t.marker_layer&&t.map.removeLayer(t.marker_layer),null!=t.geo_marker_layer&&t.map.removeLayer(t.geo_marker_layer),null!=t.circle&&t.map.removeLayer(t.circle),n=function(){return Ctesius.getSearch().set("poly",decodeURIComponent(o))},Ctesius.registerEvent("properties_map_toggle_view_displayed",n,1),e.layerType,(r=e.layer).options.color=Ctesius.getConfig("polygon_color"),r.options.fillColor=Ctesius.getConfig("polygon_fill_color"),r.options.fillOpacity=.1,Ctesius.getConfig("polygon_stroke_weight")&&(r.options.weight=Ctesius.getConfig("polygon_stroke_weight")),o=r.encodePath(),o=encodeURIComponent(o),t.drawnItems.addLayer(r),t.onPolygonDrawn(r),t.first||(t.updateURL(r),$.get(window.location),Ctesius.registerEvents(["togglable_list_displayed","properties_grid_toggle_view_displayed","no_root_view_displayed"],function(){return Ctesius.kickEvent("page_reloading"),location.reload()})),Ctesius.kickEvent("poly_url_refresh"),t.first&&(t.first=!1)})),this.map.on("zoomend",function(e){return function(){if(!e.first)return e.onMapDrag()}}(this)),this.map.on("draw:drawstart",function(e){return function(){return e.first=!1,e.map.removeLayer(e.marker_layer),e.geo_marker_layer&&e.map.removeLayer(e.geo_marker_layer),e.circle&&e.map.removeLayer(e.circle),Ctesius.kickEvent("drawbannertoggled",e)}}(this)),this.map.on("draw:drawstop",function(e){return function(){var t;return Ctesius.getConfig("fit_bounds_after_draw")?setTimeout(function(){var t;if(e.marker_layer.getLayers().length>0)return t=[e.drawnItems.getBounds()],e.map.fitBounds(t)},1500):e.circle&&(e.map.addLayer(e.circle),e.marker_layer.addTo(e.map)),t=e.map,e.map.eachLayer(function(e){e._latlng&&t.removeLayer(e)}),Ctesius.kickEvent("drawbannertoggled",e)}}(this)),this.map.on("draw:editstart",function(e){return function(){return e.first=!1,Ctesius.kickEvent("editbannertoggled")}}(this)),this.map.on("draw:editstop",function(e){return function(){var t;return e.first=!1,t=e.map,e.map.eachLayer(function(e){e._latlng&&t.removeLayer(e)}),e.onMapDrag(),Ctesius.kickEvent("editbannertoggled")}}(this)),this.map.on("draw:deletestart",function(e){return function(){return Ctesius.getConfig("instant_delete_polygon")?(e.drawnItems.clearLayers(),e.marker_layer&&e.map.removeLayer(e.marker_layer),null!=e.geo_marker_layer?e.map.removeLayer(e.geo_marker_layer):void 0):Ctesius.kickEvent("deletebannertoggled")}}(this)),this.map.on("draw:edited",function(e){return function(t){var r;r=t.layers,r.eachLayer(function(t){var r;r=encodeURIComponent(t.encodePath()),e.onPolygonDrawn(t),e.updateURL(t),window.location.hash="map/"+r,0}),$(".leaflet-draw-edit-edit-banner").slideToggle(),e.first||($.get(window.location),Ctesiu
111s.registerEvents(["togglable_list_displayed","properties_grid_toggle_view_displayed","no_root_view_displayed"],function(){return Ctesius.kickEvent("page_reloading"),location.reload()})),e.first&&(e.first=!1)}}(this)),this.map.on("draw:deleted",function(e){return function(){e.map.removeLayer(e.marker_layer),null!=e.geo_marker_layer&&e.map.removeLayer(e.geo_marker_layer),Ctesius.getSearch().unset("poly"),Ctesius.kickEvent("deletebannertoggled"),null!=e.circle?(e.map.addLayer(e.circle),e.onMapDrag()):e.buildPolygon()}}(this))},r}(Ctesius.Views.DraggableMap)}).call(this); 112(function(){var t=function(t,r){function o(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return o.prototype=r.prototype,t.prototype=new o,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.InfiniteScrollProperties=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.template=function(){return Ctesius.Template.load("infinite_scroll_properties_template")},r.prototype.render=function(){var t,e;if(t=this.template(),(e=this.collection.toJSON()).length>0)return t.render({properties:e,current_page:this.options.current_page,advert_no:this.options.advert_no})},r}(Backbone.View)}).call(this); 113(function(){var t=function(t,r){function i(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return i.prototype=r.prototype,t.prototype=new i,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.InterestingProperties=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.initialize=function(){return this.setElement($("#interesting_properties_view")),this.render()},r.prototype.template=function(){return Ctesius.Template.load("interesting_properties_template")},r.prototype.render=function(){var t,e,r;return e=this.template(),(r=this.collection.toJSON()).length>0&&r.length>=Ctesius.getConfig("minimum_interesting_properties")&&(t=e.render({properties:r}),this.$el.html(t)),Ctesius.kickEvent("interesting_properties_view_rendered",this)},r}(Backbone.View)}).call(this); 114(function(){var t=function(t,o){function s(){this.constructor=t}for(var i in o)e.call(o,i)&&(t[i]=o[i]);return s.prototype=o.prototype,t.prototype=new s,t.__super__=o.prototype,t},e={}.hasOwnProperty;Ctesius.Views.Map=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return t(o,e),o.prototype.initialize=function(){return null!=Ctesius.getConfig("small_map_element")&&(this.element=Ctesius.getConfig("small_map_element"),this.render(),Ctesius.getConfig("skip_polygon")?Ctesius.getConfig("custom_map_bounds_padding")?this.map.fitBounds(this.bounds,Ctesius.getConfig("custom_map_bounds_padding")):this.map.fitBounds(this.bounds):(this.buildPolygon(),this.noLocationfound&&this.setToMarkeredBounds()),Ctesius.getConfig("custom_map_zoom")&&this.map.setZoom(Ctesius.getConfig("custom_map_zoom"))),Ctesius.kickEvent("small_map_view_rendered",this)},o.prototype.render=function(){return this.generateMap(),this.model?this.addMarkerFor(this.model):this.addMarkersFor(this.collection.models),this.map.on("popupopen",function(t){return Ctesius.kickEvent("map_marker_opened",t)})},o.prototype.addMarkerFor=function(t){var e,o;return e=[],this.marker_layer=L.layerGroup(),null!=t.get("property_id")&&(o=this.generateMarker(t),e.push(o.getLatLng()),this.marker_layer.addLayer(o)),this.marker_layer.addTo(this.map),L.polyline([[0,0]]).addTo(this.map),this.bounds=e,e},o}(Ctesius.Views.DraggableMap)}).call(this); 115(function(){var t=function(t,r){function n(){this.constructor=t}for(var o in r)e.call(r,o)&&(t[o]=r[o]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.NextProperty=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.initialize=function(){return this.setElement($("#next_property_view")),this.render(),Ctesius.kickEvent("next_property_rendered",this.model)},r.prototype.template=function(){return Ctesius.Template.load("next_property_template")},r.prototype.render=function(){var t;return t=this.template().render({property:this.model.toJSON()}),this.$el.html(t)}
115,r}(Backbone.View)}).call(this); 116(function(){var t=function(t,r){function o(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return o.prototype=r.prototype,t.prototype=new o,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.PreviousProperty=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.initialize=function(){return this.setElement($("#previous_property_view")),this.render(),Ctesius.kickEvent("previous_property_rendered",this.model)},r.prototype.template=function(){return Ctesius.Template.load("previous_property_template")},r.prototype.render=function(){var t;return t=this.template().render({property:this.model.toJSON()}),this.$el.html(t)},r}(Backbone.View)}).call(this); 117(function(){var t=function(t,r){function n(){this.constructor=t}for(var o in r)e.call(r,o)&&(t[o]=r[o]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.Tiles=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.initialize=function(){return this.setElement($("#"+Ctesius.getConfig("map_and_list_tiles_element"))),this.render()},r.prototype.template=function(){return Ctesius.Template.load("map_and_list_tiles_template")},r.prototype.render=function(){var t;return t=this.template(),this.$el.html(t.render({properties:this.collection.toJSON()}))},r}(Backbone.View)}).call(this); 118(function(){var t=function(t,o){function s(){this.constructor=t}for(var n in o)e.call(o,n)&&(t[n]=o[n]);return s.prototype=o.prototype,t.prototype=new s,t.__super__=o.prototype,t},e={}.hasOwnProperty;Ctesius.Views.BranchMap=function(e){function o(){return o.__super__.constructor.apply(this,arguments)}return t(o,e),o.prototype.initialize=function(){return null!=Ctesius.getConfig("branch_map_element")&&(this.element=Ctesius.getConfig("branch_map_element"),this.render(),Ctesius.getConfig("custom_map_pan_coords")||(Ctesius.getConfig("custom_map_bounds_padding")?this.map.fitBounds(this.bounds,Ctesius.getConfig("custom_map_bounds_padding")):this.map.fitBounds(this.bounds),Ctesius.getConfig("custom_pan_and_zoom_on_branch_map")&&(this.map.panBy([0,-20]),this.map.zoomIn()))),Ctesius.kickEvent("branch_map_view_rendered",this)},o.prototype.render=function(){return this.generateMap({minZoom:3,scrollWheelZoom:Ctesius.getConfig("enable_scroll_wheel_zoom"),dragging:!Ctesius.getConfig("disable_draggable_map")}),this.pin_coords=[],this.addMarkersFor(this.collection.models)},o.prototype.addMarkersFor=function(t){var e,o;return Ctesius.getConfig("pin_clustering")?((e=Ctesius.getConfig("custom_clustering_radius"))||(e=10),this.marker_layer=new L.MarkerClusterGroup({maxClusterRadius:e})):this.marker_layer=L.layerGroup(),_.map(t,(o=this,function(t){var e;if(t.get("branch_id")||null!=t.get("property_id"))return e=o.generateMarker(t),o.pin_coords.push(e.getLatLng()),o.marker_layer.addLayer(e)})),this.marker_layer.addTo(this.map),Ctesius.getConfig("custom_map_pan_coords")?(this.map.setZoom(Ctesius.getConfig("custom_map_zoom")),this.map.panTo(new L.LatLng(Ctesius.getConfig("custom_map_pan_coords")[0],Ctesius.getConfig("custom_map_pan_coords")[1]))):(this.bounds=new L.LatLngBounds(this.pin_coords),this.bounds=this.bounds.pad(.1)),this.pin_coords},o.prototype.branchPopUpOnLoad=function(t){return this.map.on("layeradd",function(){return t.openPopup()}),t.on("click",function(){return setTimeout(function(){return t.closePopup()},4e3)})},o.prototype.addProperties=function(){return this.addMarkersFor(Ctesius.getPropertiesCollection().models),Ctesius.getConfig("custom_map_bounds_padding")?this.map.fitBounds(this.bounds,Ctesius.getConfig("custom_map_bounds_padding")):this.map.fitBounds(this.bounds)},o.prototype.generateMarker=function(t){var e,o,s,n,i,r,a,u,p,_,c,l,g,m,d,C,h,f;return f=t instanceof Ctesius.Models.Branch?(null!=Ctesius.getConfig("custom_branch_pin")?o=Ctesius.getConfig("custom_branch_pin")(t):(s=null!=(u=Ctesius.getConfig("custom_map_icon"))?u:Ctesius.getConfig("root_url")+"assets/leaflet/marker-icon.png",n=null!=(p=Ctesius.getConfig("custom_map_icon_size"))?p:[25,41],r=null!=(_=Ctesius.getConfig("custom_map_shadow"))?_:Ctesius.getConfig("root_url")+"assets/leaflet/marker-shadow.png",i=null!=(c=Ctesius.getConfig("custom_map_shadow_icon_size"))?c:[41,41],a=null!=(l=Ctesius.getConfig("custom_map_icon_offset"))?l:[12,41],o=new L.Icon.Default({iconUrl:s,iconSize:n,shadowUrl:r,shadowSize:i,iconAnchor:a})),e=L.marker([t.get("lat"),t.get("lng")],{icon:o}),this.branch_template().render({branch:t.toJSON()}
118)):t instanceof Ctesius.Models.Property?(null!=Ctesius.getConfig("custom_property_pin")?o=Ctesius.getConfig("custom_property_pin")(t):(s=null!=(g=Ctesius.getConfig("custom_map_icon"))?g:Ctesius.getConfig("root_url")+"assets/leaflet/marker-icon.png",n=null!=(m=Ctesius.getConfig("custom_map_icon_size"))?m:[25,41],r=null!=(d=Ctesius.getConfig("custom_map_shadow"))?d:Ctesius.getConfig("root_url")+"assets/leaflet/marker-shadow.png",i=null!=(C=Ctesius.getConfig("custom_map_shadow_icon_size"))?C:[41,41],a=null!=(h=Ctesius.getConfig("custom_map_icon_offset"))?h:[12,41],o=new L.Icon.Default({iconUrl:s,iconSize:n,shadowUrl:r,shadowSize:i,iconAnchor:a})),e=L.marker([t.get("lat"),t.get("lng")],{icon:o}),this.property_template().render({property:t.toJSON()})):void 0,e.bindPopup(f),Ctesius.getConfig("branch_pin_pop_up_on_load")&&this.branchPopUpOnLoad(e),e},o.prototype.branch_template=function(){return null!=this._branch_template?this._branch_template:this._branch_template=Ctesius.Template.load("branch_map_pin_template")},o.prototype.property_template=function(){return null!=this._property_template?this._property_template:this._property_template=Ctesius.Template.load("property_map_pin_template")},o}(Ctesius.Views.DraggableMap)}).call(this); 119(function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;Ctesius.Views.InterestingBranches=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.initialize=function(t){return this.place=t.place,this.setElement($("#interesting_branches_view")),this.render()},n.prototype.template=function(){return Ctesius.Template.load("interesting_branches_template")},n.prototype.render=function(){var t,e,n;return e=this.template(),0!==(n=this.collection.toJSON()).length&&(t=e.render({branches:n,place:this.place.toJSON()}),this.$el.html(t)),Ctesius.kickEvent("interesting_branches_view_rendered",this)},n}(Backbone.View)}).call(this); 120(function(){var e=function(e,r){function o(){this.constructor=e}for(var p in r)t.call(r,p)&&(e[p]=r[p]);return o.prototype=r.prototype,e.prototype=new o,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Views.SavedProperties=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.setElement($("#saved_properties_view")),this.collection.on("add",this.propertyAdded,this),this.collection.on("remove",this.propertyRemoved,this),this.collection.on("reset",this.render,this),this.render()},r.prototype.template=function(){return Ctesius.Template.load("saved_properties_template")},r.prototype.propertyTemplate=function(){return Ctesius.Template.load("saved_property_template")},r.prototype.render=function(){var e,t;return e=this.template(),this.$el.html(e.render({})),this.collection.each((t=this,function(e){return t.propertyAdded(e)})),Ctesius.kickEvent("saved_properties_view_rendered",this.collection)},r.prototype.renderProperty=function(e){var t;if(t=this.propertyTemplate(),!_.isEmpty(e.attributes))return t.render({property:e.toJSON()})},r.prototype.propertyAdded=function(e){var t;return t=this.renderProperty(e),$("#favourite_property_list").prepend(t),Ctesius.kickEvent("saved_property_view_rendered",e,this.collection)},r.prototype.propertyRemoved=function(){return this.render()},r}(Backbone.View)}).call(this); 121(function(){var t=function(t,n){function o(){this.constructor=t}for(var e in n)r.call(n,e)&&(t[e]=n[e]);return o.prototype=n.prototype,t.prototype=new o,t.__super__=n.prototype,t},r={}.hasOwnProperty;Ctesius.Views.UsersIndex=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,r),n}(Backbone.View)}).call(this); 122(function(){var e=function(e,r){function s(){this.constructor=e}for(var i in r)t.call(r,i)&&(e[i]=r[i]);return s.prototype=r.prototype,e.prototype=new s,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Views.UserMicro=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.setElement($("#user_micro_view")),Ctesiu
122s.getSavedPropertiesCollection().on("add",this.render,this),Ctesius.getSavedPropertiesCollection().on("remove",this.render,this),Ctesius.getSavedPropertiesCollection().on("reset",this.render,this),this.model.on("sync",this.render,this),Ctesius.getSavedSearchesCollection().on("add",this.render,this),Ctesius.getSavedSearchesCollection().on("remove",this.render,this),Ctesius.getSavedSearchesCollection().on("reset",this.render,this)},r.prototype.template=function(){return Ctesius.Template.load("user_micro_template")},r.prototype.render=function(){var e;return Ctesius.kickEvent("before_user_micro_view_rendered",this.model),e=this.template().render({user:this.model.toJSON(),user_type:this.model.userType(),saved_searches:Ctesius.getSavedSearchesCollection().toLiquid(),saved_properties:Ctesius.getSavedPropertiesCollection().toJSON()}),this.$el.html(e),Ctesius.kickEvent("user_micro_view_rendered",this.model)},r}(Backbone.View)}).call(this); 123(function(){var e=function(e,r){function o(){this.constructor=e}for(var n in r)t.call(r,n)&&(e[n]=r[n]);return o.prototype=r.prototype,e.prototype=new o,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Views.MostRecentSearch=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.setElement($("#most_recent_search_view"))},r.prototype.template=function(){return Ctesius.Template.load("most_recent_search_template")},r.prototype.render=function(){var e,t;if(e=this.model.mostRecentSearch())return Ctesius.kickEvent("before_most_recent_search_view_rendered",e),t=this.template().render({search:e.toLiquid()}),this.$el.html(t),Ctesius.kickEvent("most_recent_search_view_rendered",e)},r}(Backbone.View),Ctesius.Views.NextAndPreviousProperty=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.template=function(){return Ctesius.Template.load("next_and_previous_property_template")},r.prototype.render=function(){var e,t,r,o,n,i,s,p,_;if(p=this.model.mostRecentSearch()){for(Ctesius.kickEvent("before_next_and_previous_property_view_rendered",p),i=this.model.getPreviousProperty(),o=this.model.getNextProperty(),n=this.model.positionOfPropertyInSearch(this.model.currentPropertyId())+p.get("performed_data").pagination.from_record,_=this.template().render({next_property:o,previous_property:i,position:n,search:this.model.mostRecentSearch()}),t=0,r=(s=$('[id|="next_and_previous_property_view"]')).length;t<r;t++)e=s[t],$(e).html(_);return Ctesius.kickEvent("next_and_previous_property_view_rendered",p)}},r}(Backbone.View)}).call(this); 124(function(){var e=function(e,r){function s(){this.constructor=e}for(var o in r)t.call(r,o)&&(e[o]=r[o]);return s.prototype=r.prototype,e.prototype=new s,e.__super__=r.prototype,e},t={}.hasOwnProperty;Ctesius.Views.UserProfile=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return e(r,t),r.prototype.initialize=function(){return this.setElement($("#user_profile_view")),Ctesius.getSavedPropertiesCollection().on("add",this.render,this),Ctesius.getSavedPropertiesCollection().on("remove",this.render,this),Ctesius.getSavedPropertiesCollection().on("reset",this.render,this),this.model.on("sync",this.render,this),Ctesius.getSavedSearchesCollection().on("add",this.render,this),Ctesius.getSavedSearchesCollection().on("remove",this.render,this),Ctesius.getSavedSearchesCollection().on("update",this.render,this),Ctesius.getSavedSearchesCollection().on("reset",this.render,this),this.render(!1)},r.prototype.getHtml=function(){return this.html},r.prototype.template=function(){return Ctesius.Template.load("user_profile_template")},r.prototype.render=function(e){var t;if(null==e&&(e=!0),t=this.template().render({user:this.model.toJSON(),user_type:this.model.userType(),saved_searches:Ctesius.getSavedSearchesCollection().toLiquid(),saved_properties:Ctesius.getSavedPropertiesCollection().toJSON(),flash:Ctesius.getCurrentFlashMessage().toJSON()}),this.html=t,null!=Ctesius.router&&e)return Ctesius.router.refreshColorBox()},r.prototype.showTab=function(e,t){var r;if(r=null!=e&&""!==e?"profile_tab_"+e+"_content":"profile_tab_content",$(".profile_tab_content").each(function(e,t){return t.id===r?$(t).removeClass("hidden"):$(t).addClass("hidden")}),r=r.replace("_content",""),null==t&&$(".profile_tab_nav li").each(function(e,t){return t.id===r?$(t).addClass("active"):$(t).removeClass("active")}),"groups"===e)return Ctesius.getGroupsCollection().fetch(),Ctesiu
124s.getGroupsCollection().getOrCreateGroupsView().render()},r}(Backbone.View)}).call(this); 125(function(){var t=function(t,i){function n(){this.constructor=t}for(var r in i)e.call(i,r)&&(t[r]=i[r]);return n.prototype=i.prototype,t.prototype=new n,t.__super__=i.prototype,t},e={}.hasOwnProperty;Ctesius.Views.Disambiguation=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.initialize=function(){return this.setElement($("#disambiguation_view")),this.render(),Ctesius.kickEvent("disambiguation_rendered",this.model)},i.prototype.template=function(){return Ctesius.Template.load("disambiguation_template")},i.prototype.render=function(){var t;return t=this.template().render({places:this.buildjson()}),this.$el.html(t)},i.prototype.buildjson=function(){var t,e,i,n,r,o;for(i=[],o=Ctesius.getSearch().clone(),t=0,e=(r=this.model.slice(1)).length;t<e;t++)n=r[t],o.set("place_id",n[1]),i.push({name:n[0],url:o.link(),url_label:n[2]});return i},i}(Backbone.View)}).call(this); 126(function(){var e=function(e,o){function a(){this.constructor=e}for(var r in o)t.call(o,r)&&(e[r]=o[r]);return a.prototype=o.prototype,e.prototype=new a,e.__super__=o.prototype,e},t={}.hasOwnProperty;Ctesius.Views.Valuation=function(t){function o(){return o.__super__.constructor.apply(this,arguments)}return e(o,t),o.prototype.el="#valuation-render-section",o.prototype.template=function(){return _.template($("#valuation-template").html(),{})},o.prototype.events={"click input.next-step":"nextStep","click .valuations-modal-close":"closeModal","click #contact_form_link":"closeModal","click .let-switch":"lettingsPrice","click .sell-switch":"salesPrice","click .valuations-modal-back":"goBack","keyup #valuation_postcode":"countDownToGetAddress","paste #valuation_postcode":"countDownToGetAddress","change #valuation_postcode":"countDownToGetAddress","change #address_dropdown":"setHouseNumber","click .valuation_start_again":"startAgain"},o.prototype.render=function(){return this.$el.html(this.template()),$("#valuation-modal-background").fadeIn()},o.prototype.initialize=function(){var e;if(this.render(),this.typingTimer=0,this.typingInterval=1e3,_.bindAll(this,"addAddresses"),(e=$("#valuation_postcode").val())&&this.model.validatePostcode(e))return this.addAddresses()},o.prototype.countDownToGetAddress=function(){if(clearTimeout(this.typingTimer),this.model.validatePostcode($("#valuation_postcode").val()))return this.typingTimer=setTimeout(this.addAddresses,this.typingInterval)},o.prototype.findBranch=function(){return Ctesius.Actions.postcodeBranchLookup($("#valuation_postcode").val(),function(e){if(e)return $("#details-form").append('<input type="hidden" id="valuation_branch" name="lead[branch_id]" value="'+e.branch.id+'">'),$("#details-form").append('<input type="hidden" id="valuation_is_branch_lead" name="lead[is_branch_lead]" value="1">')})},o.prototype.addAddresses=function(){var e,t,o;return e=this,$("#address_dropdown").text(""),"BT"===(o=$("#valuation_postcode").val()).substring(0,2).toUpperCase()?(t="Unfortunately our Instant Valuation Tool does not cover the Northern Ireland area. Please contact us to arrange a valuation by one of our agents.",$("#valuation_not-found-message").html(t)):this.model.getAddresses(o).then(function(t){return $("#address_dropdown").append("<option disabled selected>Please select address</option>"),t.Addresses.each(function(t){return $("#address_dropdown").append(e.model.formatAddressOption(t))}),$("#address_dropdown").trigger("liszt:updated"),Ctesius.kickEvent("homeval_addresses_added")})},o.prototype.setHouseNumber=function(){if($("#address_dropdown").val())return $("#valuation_house-number").val($("#address_dropdown").val().split(" ")[0])},o.prototype.nextStep=function(){var e,t;for(e=document.querySelectorAll("input.next-step"),t=0;t<e.length;)e[t].disabled=!0,t++;switch(setTimeout(function(){for(t=0;t<e.length;)e[t].disabled=!1,t++},3e3),this.model.get("currentStep")){case 0:return this.step1();case 1:return this.step2();case 2:return this.step3()}},o.prototype.closeModal=function(){var e;return e=this,$("#valuation-modal-background").fadeOut(function(){return e.model.destroy(),e.$el.html(""),history.pushState("",document.title,window.location.pathname),Ctesius.router.navigate("",!0)})},o.prototype.goBack=function(){var e;e=this,1===this.model.get("currentStep")?($(".personal-details-container").fadeOut(function(){return $(".address-container").fadeIn()}),$(".valuations-modal-back").hide(),$(".valuation_start_again").hide(),this.model.decrementStep()):2===this.model.get("currentStep")?($("#similar-properties-form").fadeOut(function(){return $(".personal-details-container").fadeIn()}),this.model.decrementStep()):3===this.model.get("currentStep")&&($(".result-container").fadeOut(function(){return $("#similar-properties-form").fadeIn(),e.shrinkModal()}),this.model.decrementStep())},o.prototype.lettingsPrice=function(){var e,t,o;return $(".let-switch").addClass("active"),$(".sell-switch").removeClass("active"),o=this.model.lettingsPrice(this.model.get("price")),$("#price_1").html(this.model.formatLettingsPrice(o)),(e=Ctesius.getConfig("homeval_custom_lower_bound"))?$("#min_price_1").html(this.model.formatLettingsPrice(e*o)):$("#min_price_1").html(this.model.formatLettingsPrice(this.model.lettingsPrice(this.model.get("lower_bound")))),(t=Ctesius.getConfig("homeval_custom_upper_bound"))?$("#max_price_1").html(this.model.formatLettingsPrice(t*o)):$("#max_price_1").html(this.model.formatLettingsPrice(this.model.lettingsPrice(this.model.get("upper_bound"))))},o.prototype.salesPrice=function(){var e;
126return $(".sell-switch").addClass("active"),$(".let-switch").removeClass("active"),e=this.model.salesPrice(this.model.get("price")),$("#price_1").html(this.model.formatSalesPrice(e)),$("#min_price_1").html(this.model.formatSalesPrice(this.model.get("lower_bound"))),$("#max_price_1").html(this.model.formatSalesPrice(this.model.get("upper_bound")))},o.prototype.step1=function(){var e;return e=this,this.setHouseNumber(),this.postcodePresentAndValid()?$("#address_dropdown").val()?$("#valuation_bedrooms").val()?$("#valuation_property-type").val()?(Ctesius.getConfig("homeval_branch_leads")&&this.findBranch(),$(".address-container").fadeOut(function(){var t;return $(".personal-details-container").fadeIn(),Ctesius.getConfig("google_maps_api_key")?($("#valuation-map-no-streetview").hide(),t=$("<img>",{src:e.buildStreetViewImageSrc,alt:"Streetview Image"}).addClass("streetview-image"),$("#streetview-wrapper").html(t)):($("#streetview-wrapper").hide(),$("#valuation-map").hide()),$("#address-container").html(e.buildAddressString),$(".valuations-modal-back").show(),$(".valuation_start_again").show(),e.model.incrementStep()})):(alert("Please select a property type"),!1):(alert("Please select a number of bedrooms"),!1):(alert("Please select an address"),!1):(alert("Please enter a valid UK postcode (with a space)"),!1)},o.prototype.postcodePresentAndValid=function(){var e,t;return e=""!==$("#valuation_postcode").val(),t=this.model.validatePostcode($("#valuation_postcode").val()),e&&t},o.prototype.buildAddressString=function(){return $("#address_dropdown").val()},o.prototype.buildStreetViewImageSrc=function(){return"https://maps.googleapis.com/maps/api/streetview?size=900x900&location="+$("#address_dropdown").val()+","+$("#valuation_postcode").val()+"&key="+Ctesius.getConfig("google_maps_api_key")},o.prototype.step2=function(){var e,t,o;if(e=this,t=new RegExp("@"),o=new RegExp("^[0-9-.()/ +]{6,20}$"),this.personalDetailsValid()){if(t.test($("#valuation_email").val())){if(!o.test($("#valuation_phone").val()))return alert("Please enter a valid phone number"),!1;if(!this.termsAccepted())return alert("Please accept our terms and conditions"),!1;this.model.createMap(),$(".personal-details-container").fadeOut(function(){return $("#valuation_postcode").val(),$("#valuation_bedrooms").val(),"sales",$("#valuation_property-type").val(),e.step3()})}else alert("Please enter a valid email address");return event.preventDefault()}return alert("Please fill out the required fields"),!1},o.prototype.personalDetailsValid=function(){var e,t,o,a;return t=""!==$("#valuation_first_name").val(),o=""!==$("#valuation_last_name").val(),e=""!==$("#valuation_email").val(),a=""!==$("#valuation_phone").val(),t&&o&&e&&a},o.prototype.termsAccepted=function(){return!0===$('#valuation-section [name="marketing_preferences[opt_in_terms]"]').prop("checked")},o.prototype.step3=function(){var e;return e=this,$("#similar-properties-form").fadeOut(),$("#spinner-background").fadeIn(),this.addRecentSales(function(){return new RegExp("@"),e.model.getValuation(function(t,o){return e.model.incrementStep(),$("#spinner-background").fadeOut(function(){var t;return t=Ctesius.getConfig("homeval_custom_lower_bound"),e.model.get("price")?($("#no_results").hide(),$("#property_expert, #valuation-details ").show(),t?$("#min_price_1").html(e.model.salesPrice(e.model.get("price")*t)):$("#min_price_1").html(e.model.salesPrice(e.model.get("lower_bound")))):($("#no_results").show(),$("#property_expert, #valuation-details ").hide()),e.renderPrices(),Ctesius.kickEvent("valuation_successful"),$(".result-container").fadeIn(function(){var t;return e.model.get("valuationMap").setView([o.Latitude,o.Longitude],16),t=new L.featureGroup(e.model.get("valuationMarkerGroup")),e.model.get("valuationMap").fitBounds(t.getBounds())}),e.enlargeModal(),$("#valuation-section").scrollTop(0)})})})},o.prototype.renderPrices=function(){var e;return e=this,Ctesius.getConfig("valuations_lettings_price_default")?($("#max_price_1").html(e.model.lettingsPrice(e.model.get("upper_bound"))),$("#price_1").html(e.model.lettingsPrice(e.model.get("price"))),$(".let
126-switch").addClass("active"),$(".sell-switch").removeClass("active")):this.salesPrice()},o.prototype.enlargeModal=function(){if($(window).width()>768)return $("#valuation-section").animate({width:"80%",left:"10%",right:"10%"},200)},o.prototype.shrinkModal=function(){if($(window).width()>768)return $("#valuation-section").animate({width:"60%",left:"20%",right:"20%"},200)},o.prototype.addRecentSales=function(e){var t,o,a;return t=this,o=$("#valuation_postcode").val(),a=$("#valuation_property-type").val(),this.model.getRecentSales(o,a).then(function(o){return o.recent_sales&&o.recent_sales.each(function(e){var o;return $("#recently-sold-list").append(t.model.formatRecentSale(e)),o=L.marker([e.sale.latitude,e.sale.longitude]).addTo(t.model.get("valuationMap")),t.model.get("valuationMarkerGroup").push(o)}),e()})},o.prototype.startAgain=function(){var e;return this.model.destroy(),this.$el.html(""),e=new Ctesius.Models.Valuation,this.model=e,this.render()},o}(Backbone.View)}).call(this); 127(function(){var t=function(t,r){function o(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return o.prototype=r.prototype,t.prototype=new o,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.Groups=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.initialize=function(){return this.setElement($("#groups_view")),this.collection.on("add",this.groupAdded,this),this.collection.on("remove",this.groupRemoved,this),this.collection.on("reset",this.render,this),this.render()},r.prototype.template=function(){return Ctesius.Template.load("groups_template")},r.prototype.groupTemplate=function(){return Ctesius.Template.load("group_template")},r.prototype.render=function(){var t,e;return this.setElement($("#groups_view")),t=this.template(),this.$el.html(t.render({})),this.collection.each((e=this,function(t){return e.groupAdded(t)})),Ctesius.kickEvent("groups_view_rendered",this.collection)},r.prototype.renderGroup=function(t){var e;if(e=this.groupTemplate(),!_.isEmpty(t.attributes))return e.render({group:t.toJSON()})},r.prototype.groupAdded=function(t){var e;return e=this.renderGroup(t),$("#group_list").prepend(e),Ctesius.kickEvent("group_view_rendered",t,this.collection)},r.prototype.groupRemoved=function(){return this.render()},r}(Backbone.View)}).call(this); 128(function(){var e=function(e,n){function o(){this.constructor=e}for(var a in n)t.call(n,a)&&(e[a]=n[a]);return o.prototype=n.prototype,e.prototype=new o,e.__super__=n.prototype,e},t={}.hasOwnProperty;Ctesius.Views.BookingCalendar=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.initialize=function(){return Ctesius.getConfig("calendar_active")?(this.setElement($("#booking_calendar")),this.addBookingFields(),Ctesiu
128s.getConfig("custom_calendar_heading")?this.heading=Ctesius.getConfig("custom_calendar_heading"):this.heading="When is best for you?",this.options.asModal?(this.renderAsModal(),this.setCustomColours()):(this.render(),this.setCustomColours())):console.log("Calendar not enabled.")},n.prototype.closeModal=function(){return $("#fullcalendar_modal_background").fadeOut()},n.prototype.populateBookingFields=function(e,t){var n,o,a,l,i;if(i=e.get("year"),a=("0"+(e.get("month")+1)).slice(-2),o=("0"+e.get("date")).slice(-2),l=e.get("hour")+":"+("0"+e.get("minute")).slice(-2),$("#lead_booking\\[booking_year\\]").val(i),$("#lead_booking\\[booking_month\\]").val(a),$("#lead_booking\\[booking_day\\]").val(o),$("#lead_booking\\[booking_time\\]").val(l),$("#lead\\[starting\\]").val(moment(e).format()),$("#lead\\[ending\\]").val(moment(t).format()),this.options.asModal)return n="Preferred time/date: "+l+" "+o+"/"+a+"/"+i,$("#booking_calendar_modal_link").text(n)},n.prototype.unpopulateBookingFields=function(){return $("#lead_booking\\[booking_year\\]").val(""),$("#lead_booking\\[booking_month\\]").val(""),$("#lead_booking\\[booking_day\\]").val(""),$("#lead_booking\\[booking_time\\]").val(""),$("#lead\\[starting\\]").val(""),$("#lead\\[ending\\]").val("")},n.prototype.addBookingFields=function(){var e;return e='<input type="hidden" value="yes" id="lead_booking[book_viewing]" name="lead_booking[book_viewing]"> <input id="lead_booking[booking_time]" name="lead_booking[booking_time]" type="hidden"> <input id="lead_booking[booking_day]" name="lead_booking[booking_day]" type="hidden"> <input id="lead_booking[booking_month]" name="lead_booking[booking_month]" type="hidden"> <input id="lead_booking[booking_year]" name="lead_booking[booking_year]" type="hidden"> <input id="lead[starting]" name="lead[starting]" type="hidden" /> <input id="lead[ending]" name="lead[ending]" type="hidden" />',this.options.asModal?$("#booking_calendar_modal_link").after(e):$("#booking_calendar_link").replaceWith(e)},n.prototype.selectTime=function(e,t){return $(".fc-event").removeClass("selected"),e.addClass("selected"),this.model.set("selectedEventTime",t.start.format()),this.populateBookingFields(t.start,t.end)},n.prototype.render=function(){return this.$el.html($("<div>").attr("id","fullcalendar")),$("#fullcalendar").fullCalendar(this.fullCalendarSettings()).hide().fadeIn(),$(window).width()<514&&$("#fullcalendar").fullCalendar("changeView","agendaDay"),$("#fullcalendar").fullCalendar("gotoDate",this.model.get("firstEvent"))},n.prototype.renderAsModal=function(){var e,t;return t=this,$("#fullcalendar_modal_background").length?$("#fullcalendar_modal_background").fadeIn():((e=$('<div id="fullcalendar_modal_background">')).append('<div id="fullcalendar_modal">'),$("body").append(e),e.fadeIn(),$("#fullcalendar_modal").fullCalendar(this.fullCalendarModalSettings()).hide(),t.addCloseIcon(),t.addOKButton(),$(window).width()<514&&$("#fullcalendar_modal").fullCalendar("changeView","agendaDay"),$("#fullcalendar_modal").fadeIn(),$("#fullcalendar_modal").fullCalendar("gotoDate",this.model.get("firstEvent")))},n.prototype.setCustomColours=function(){var e,t;if(e=Ctesius.getConfig("custom_calendar_highlight_colour"))return t="<style>.fc-event {border-left: 3px solid "+e+"; border-bottom: 3px solid "+e+";} .fc-event:hover,.fc-event.selected,#fullcalendar_modal .fc-event:hover, #fullcalendar_modal .fc-event.selected{background-color: "+e+";}</style>",$("body").append(t)},n.prototype.viewRender=function(e){var t,n;return n=new Date,(t=new Date).setMonth(n.getMonth()+1),t.getTime()<e.end?($(".fc-next-button").hide(),!1):($(".fc-next-button").show(),e.start<n.getTime()?($(".fc-prev-button").hide(),!1):$(".fc-prev-button").show())},n.prototype.windowResize=function(){return $(window).width()<514?$("#fullcalendar_modal").fullCalendar("changeView","agendaDay"):$("#fullcalendar_modal").fullCalendar("changeView","agendaWeek")},n.prototype.eventRender=function(e,t){if(t.addClass(e.start.format()),t.hasClass(this.model.get("selectedEventTime")))return t.addClass("selected")},n.prototype.fullCalendarSettings=function(){var e;return{defaultView:"agendaWeek",allDaySlot:!1,height:420,minTime:"09:00:00",maxTime:"18:00:00",columnFormat:"ddd D/M",displayEventEnd:!1,events:(e=this).model.availableTimes(),timeFormat:"H:mm",titleFormat:"["+this.heading+"]",viewRender:function(t,n){return e.viewRender(t,n)},eventRender:function(t,n){return e.eventRender(t,n)},eventClick:function(t,n,o){return $(this).attr("class").indexOf("selected")>-1?($(this).removeClass("selected"),e.unpopulateBookingFields()):e.selectTime($(this),t,n,o)},windowResize:function(){return e.windowResize()}}},n.prototype.fullCalendarModalSettings=function(){var e;return{defaultView:"agendaWeek",allDaySlot:!1,minTime:"08:00:00",maxTime:"19:00:00",columnFormat:"ddd D/M",displayEventEnd:!1,events:(e=this).model.availableTimes(),timeFormat:"H:mm",titleFormat:"["+this.heading+"]",footer
128:{},viewRender:function(t,n){return e.viewRender(t,n),e.addOKButton()},eventRender:function(t,n){return e.eventRender(t,n)},eventClick:function(t,n,o){return $(this).attr("class").indexOf("selected")>-1?($(this).removeClass("selected"),e.unpopulateBookingFields(),$("#booking_calendar_modal_link").text("Request a specific time for your valuation"),$("#calendar-ok-button").prop("disabled",!0),e.model.unset("selectedEventTime")):(e.selectTime($(this),t,n,o),$("#calendar-ok-button").prop("disabled",!1))},windowResize:function(){return e.windowResize()}}},n.prototype.addOKButton=function(){var e,t;return t=this,(e=$("<button>",{id:"calendar-ok-button",html:"✔ Confirm"})).prop("disabled",!0),$(".fc-footer-toolbar .fc-right").html(e),t.model.get("selectedEventTime")&&e.prop("disabled",!1),e.click(function(){return t.closeModal()})},n.prototype.addHeaderText=function(e){return $(".fc-toolbar h2").text(e)},n.prototype.addCloseIcon=function(){var e,t,n;return n=this,t=$("<span>",{"class":"calendar-close-container"}),e=$("<img />",{"class":"calendar-modal-close",src:"/assets/grey_close_x.png",alt:"close",title:"close"}),t.append(e),$(".fc-header-toolbar .fc-button-group").append(t),e.click(function(){return n.closeModal()})},n}(Backbone.View)}).call(this); 129(function(){var t=function(t,r){function n(){this.constructor=t}for(var o in r)e.call(r,o)&&(t[o]=r[o]);return n.prototype=r.prototype,t.prototype=new n,t.__super__=r.prototype,t},e={}.hasOwnProperty;Ctesius.Views.InfiniteScrollArticles=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return t(r,e),r.prototype.template=function(){return Ctesius.Template.load("infinite_scroll_articles_template")},r.prototype.render=function(){var t,e;if(t=this.template(),(e=this.collection.toJSON()).length>0)return t.render({articles:e})},r}(Backbone.View)}).call(this); 130L.BingLayer=L.TileLayer.extend({options:{subdomains:[0,1,2,3],type:"Aerial",attribution:"Bing",culture:""},initialize:function(t,e){L.Util.setOptions(this,e),this._key=t,this._url=null,this.meta={},this.loadMetadata()},tile2quad:function(t,e,i){for(var a="",o=i;o>0;o--){var r=0,n=1<<o-1;0!=(t&n)&&(r+=1),0!=(e&n)&&(r+=2),a+=r}return a},getTileUrl:function(t,e){e=this._getZoomForUrl();var i=this.options.subdomains,a=this.options.subdomains[Math.abs((t.x+t.y)%i.length)];return this._url.replace("{subdomain}",a).replace("{quadkey}",this.tile2quad(t.x,t.y,e)).replace("{culture}",this.options.culture)},loadMetadata:function(){var t=this,e="_bing_metadata_"+L.Util.stamp(this);window[e]=function(i){t.meta=i,window[e]=undefined;var a=document.getElementById(e);a.parentNode.removeChild(a),i.errorDetails?alert("Got metadata"+i.errorDetails):t.initMetadata()};var i="http://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.options.type+"?include=ImageryProviders&jsonp="+e+"&key="+this._key,a=document.createElement("script");a.type="text/javascript",a.src=i,a.id=e,document.getElementsByTagName("head")[0].appendChild(a)},initMetadata:function(){var t=this.meta.resourceSets[0].resources[0];this.options.subdomains=t.imageUrlSubdomains,this._url=t.imageUrl,this._providers=[];for(var e=0;e<t.imageryProviders.length;e++)for(var i=t.imageryProviders[e],a=0;a<i.coverageAreas.length;a++){var o=i.coverageAreas[a],r={zoomMin:o.zoomMin,zoomMax:o.zoomMax,active:!1},n=new L.LatLngBounds(new L.LatLng(o.bbox[0]+.01,o.bbox[1]+.01),new L.LatLng(o.bbox[2]-.01,o.bbox[3]-.01));r.bounds=n,r.attrib=i.attribution,this._providers.push(r)}this._update()},_update:function(){null!=this._url&&this._map&&(this._update_attribution(),L.TileLayer.prototype._update.apply(this,[]))},_update_attribution:function(){for(var t=this._map.getBounds(),e=this._map.getZoom(),i=0;i<this._providers.length;i++){var a=this._providers[i];e<=a.zoomMax&&e>=a.zoomMin&&t.intersects(a.bounds)?(a.active||this._map.attributionControl.addAttribution(a.attrib),a.active=!0):(a.active&&this._map.attributionControl.removeAttribution(a.attrib),a.active=!1)}},onRemove:function(t){for(var e=0;e<this._providers.length;e++){var i=this._providers[e];i.active&&(this._map.attributionControl.removeAttribution(i.attrib),i.active=!1)}L.TileLayer.prototype.onRemove.apply(this,[t])}}); 131L.Google=L.Class.extend({includes:L.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1},initialize:function(t,e){L.Util.setOptions(this,e),"undefined"!=typeof google&&(this._ready=google.maps.Map!=undefined,this._ready||L.Google.asyncWait.push(this),this._type=t||"SATELLITE")},onAdd:function(t,e){this._map=t,this._insertAtTheBottom=e,this._initContainer(),this._initMapObject(),t.on("viewreset",this._resetCallback,this),this._limitedUpdate=L.Util.limitExecByInterval(this._update,150,this),t.on("move",this._update,this),t._controlCorners.bottomright.style.marginBottom="1em",this._reset(),this._update()},onRemove:function(t){this._map._container.removeChild(this._container),this._map.off("viewreset",this._resetCallback,this),this._map.off("move",this._update,this),t._controlCorners.bottomright.style.marginBottom="0em"},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._container,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},_initContainer:function(){var t=this._map._container,e=t.firstChild;this._container||(this._container=L.DomUtil.create("div","leaflet-google-layer leaflet-top leaflet-left"),this._container.id="_GMapContainer_"+L.Util.stamp(this),this._container.style.zIndex="auto"),t.insertBefore(this._container,e),this.setOpacity(this.options.opacity),this.setElementSize(this._container,this._map.getSize())},_initMapObject:function(){if(this._ready){this._google_center=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._container,{center:this._google_center,zoom:0,tilt:0,mapTypeId:google.maps.MapTypeId[this._type],disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1}),e=this;this._reposition=google.maps.event.addListenerOnce(t,"center_changed",function(){e.onReposition()}),t.backgroundColor="#ff0000",this._google=t}},_resetCallback:function(t){this._reset(t.hard)},_reset:function(){this._initContainer()},_update:function(){if(this._google){this._resize();
131var t=this._map.getBounds(),e=t.getNorthEast(),i=t.getSouthWest(),o=(new google.maps.LatLngBounds(new google.maps.LatLng(i.lat,i.lng),new google.maps.LatLng(e.lat,e.lng)),this._map.getCenter()),n=new google.maps.LatLng(o.lat,o.lng);this._google.setCenter(n),this._google.setZoom(this._map.getZoom())}},_resize:function(){var t=this._map.getSize();this._container.style.width==t.x&&this._container.style.height==t.y||(this.setElementSize(this._container,t),this.onReposition())},onReposition:function(){this._google&&google.maps.event.trigger(this._google,"resize")}}),L.Google.asyncWait=[],L.Google.asyncInitialize=function(){var t;for(t=0;t<L.Google.asyncWait.length;t++){var e=L.Google.asyncWait[t];e._ready=!0,e._container&&(e._initMapObject(),e._update())}L.Google.asyncWait=[]}; 132L.TileLayer.Grayscale=L.TileLayer.extend({options:{quotaRed:21,quotaGreen:71,quotaBlue:8,quotaDividerTune:0,quotaDivider:function(){return this.quotaRed+this.quotaGreen+this.quotaBlue+this.quotaDividerTune}},initialize:function(t,e){L.TileLayer.prototype.initialize.call(this,t,e),this.on("tileload",function(t){this._makeGrayscale(t.tile)})},_createTile:function(){var t=L.TileLayer.prototype._createTile.call(this);return t.crossOrigin="Anonymous",t},_makeGrayscale:function(t){if(!t.getAttribute("data-grayscaled")){t.crossOrigin="";var e=document.createElement("canvas");e.width=t.width,e.height=t.height;var a=e.getContext("2d");a.drawImage(t,0,0);for(var i=a.getImageData(0,0,e.width,e.height),r=i.data,o=0,n=r.length;o<n;o+=4)r[o]=r[o+1]=r[o+2]=(this.options.quotaRed*r[o]+this.options.quotaGreen*r[o+1]+this.options.quotaBlue*r[o+2])/this.options.quotaDivider();a.putImageData(i,0,0),t.setAttribute("data-grayscaled",!0),t.src=e.toDataURL()}}}),L.tileLayer.grayscale=function(t,e){return new L.TileLayer.Grayscale(t,e)}; 133L.Yandex=L.Class.extend({includes:L.Mixin.Events,options:{minZoom:0,maxZoom:18,attribution:"",opacity:1,traffic:!1},initialize:function(t,i){L.Util.setOptions(this,i),this._type="yandex#"+(t||"map")},onAdd:function(t,i){this._map=t,this._insertAtTheBottom=i,this._initContainer(),this._initMapObject(),t.on("viewreset",this._resetCallback,this),this._limitedUpdate=L.Util.limitExecByInterval(this._update,150,this),t.on("move",this._update,this),t._controlCorners.bottomright.style.marginBottom="3em",this._reset(),this._update(!0)},onRemove:function(t){this._map._container.removeChild(this._container),this._map.off("viewreset",this._resetCallback,this),this._map.off("move",this._update,this),t._controlCorners.bottomright.style.marginBottom="0em"},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._container,t)},setElementSize:function(t,i){t.style.width=i.x+"px",t.style.height=i.y+"px"},_initContainer:function(){var t=this._map._container,i=t.firstChild;this._container||(this._container=L.DomUtil.create("div","leaflet-yandex-layer leaflet-top leaflet-left"),this._container.id="_YMapContainer_"+L.Util.stamp(this),this._container.style.zIndex="auto"),this.options.overlay&&(i=(i=this._map._container.getElementsByClassName("leaflet-map-pane")[0]).nextSibling,L.Browser.opera&&(this._container.className+=" leaflet-objects-pane")),t.insertBefore(this._container,i),this.setOpacity(this.options.opacity),this.setElementSize(this._container,this._map.getSize())},_initMapObject:function(){if(!this._yandex){if(ymaps.Map===undefined)return console.debug("L.Yandex: Waiting on ymaps.load('package.map')"),ymaps.load(["package.map"],this._initMapObject,this);if(this.options.traffic&&(ymaps.control===undefined||ymaps.control.TrafficControl===undefined))return console.debug("L.Yandex: loading traffic and controls"),ymaps.load(["package.traffic","package.controls"],this._initMapObject,this);var t=new ymaps.Map(this._container,{center:[0,0],zoom:0,behaviors:[]});this.options.traffic&&t.controls.add(new ymaps.control.TrafficControl({shown:!0})),"yandex#null"==this._type&&(this._type=new ymaps.MapType("null",[]),t.container.getElement().style.background="transparent"),t.setType(this._type),this._yandex=t,this._update(!0)}},_resetCallback:function(t){this._reset(t.hard)},_reset:function(){this._initContainer()},_update:function(t){if(this._yandex){this._resize(t);var i=this._map.getCenter(),e=[i.lat,i.lng],n=this._map.getZoom();(t||this._yandex.getZoom()!=n)&&this._yandex.setZoom(n),this._yandex.panTo(e,{duration:0,delay:0})}},_resize:function(t){var i=this._map.getSize(),e=this._container.style;if(e.width!=i.x+"px"||e.height!=i.y+"px"||1==t){this.setElementSize(this._container,i);var n=this._map.getBounds();
133n.getSouthWest(),n.getNorthEast();this._yandex.container.fitToViewport()}}}); 134(function(){var e=function(e,s){function i(){this.constructor=e}for(var r in s)t.call(s,r)&&(e[r]=s[r]);return i.prototype=s.prototype,e.prototype=new i,e.__super__=s.prototype,e},t={}.hasOwnProperty;Ctesius.Router=function(t){function s(){return s.__super__.constructor.apply(this,arguments)}return e(s,t),s.prototype.initialize=function(){},s.prototype.routes={user:"user_profile","user/:id":"user_profile",home:"root",list:"root",map:"display_map","map-list":"display_map_with_list",grid:"grid_view","flash/:flash_type":"set_flash","tabs/:tab_name":"set_tab","":"no_root","disambiguate/:phrase":"disambiguate",valuation:"valuation"},s.prototype.valuation=function(){var e;return Ctesius.getConfig("paid_for_homeval")?(e=new Ctesius.Models.Valuation,new Ctesius.Views.Valuation({model:e})):console.log("Valuation not enabled.")},s.prototype.disambiguate=function(e){return e=e.replace("-"," "),$.ajax({url:Ctesius.getConfig("root_url")+"places",dataType:"json",data:{term:e},success:function(e){return new Ctesius.Views.Disambiguation({model:e})}})},s.prototype.set_flash=function(e){return Ctesius.kickEvent("before_redirection_flash_ready",e),this.homeflow_alert(Ctesius.getConfig("flash-message-"+e),this.alert_status(e),e)},s.prototype.no_root=function(){return Ctesius.kickEvent("no_root_view_displayed")},s.prototype.alert_status=function(e){switch(e){case"welcome-lead-sent-new-user":case"welcome-lead-sent":case"send-property-sent":case"user-create-successful":case"user-login-successful":return"success";case"send-property-invalid":case"lead-sending-error":case"file-upload-error":case"location-not-found":case"agent-or-location-not-found":case"lead-sending-error-validation":case"user-create-dupe":case"article-not-found-error":case"user-create-error":case"names-not-different":case"search-query-required":case"recaptcha-invalid":case"invalid-message-content":case"password-invalid":case"site-not-live":case"postcode-invalid":case"password-reset-link-invalid":return"error"}},s.prototype.homeflow_alert=function(e,t,s){return Ctesius.kickEvent("redirection_flash_ready",e,t,s)},s.prototype.set_tab=function(e){if(null!=e)return $(".togglable_area").each(function(t,s){return s.id==="togglable_"+e?($(s).removeClass("hidden"),$("#tab"+s.id.substring(9)).addClass("selected"),$("#tab"+s.id.substring(9)).addClass("active"),$("#tab"+s.id.substring(9)).blur()):($(s).addClass("hidden"),$("#tab"+s.id.substring(9)).removeClass("selected"),$("#tab"+s.id.substring(9)).removeClass("active"))}),Ctesius.kickEvent("render_tab",e)},s.prototype.grid_view=function(){return $(".togglable_area").each(function(e,t){return $(t).addClass("hidden")}),$("#"+Ctesius.getConfig("properties_grid_toggle_view")).removeClass("hidden"),Ctesius.kickEvent("properties_grid_toggle_view_displayed")},s.prototype.map_and_list=function(){return this.set_tab("map"),$("#"+Ctesius.getConfig("map_and_list_tiles_element")).removeClass("hidden")},s.prototype.togglable_areas=function(e){return $(".togglable_area").each(function(t,s){return s.id===e?$(s).removeClass("hidden"):$(s).addClass("hidden")})},s.prototype.display_map_with_line=function(e){return Ctesius.kickEvent("before_properties_map_toggle_view_displayed"),"undefined"!=typeof map&&null!==map||this.set_tab("map"),setTimeout((t=this,function(){return t.set_up_map(e),t._draggable_map.renderTiles(!1),Ctesius.kickEvent("properties_map_toggle_view_displayed",t._draggable_map)}),1e3);var t},s.prototype.display_map_with_list=function(){return Ctesius.kickEvent("before_properties_map_and_list_toggle_view_displayed"),this.map_and_list(),setTimeout((e=this,function(){return e.set_up_map(),e._draggable_map.renderTiles(!0),Ctesius.kickEvent("properties_map_and_list_toggle_view_displayed")}),1e3);var e},s.prototype.display_map=function(){return Ctesius.kickEvent("before_properties_map_toggle_view_displayed"),window.CanvasRenderingContext2D&&history.pushState||$.colorbox({className:"dam_disabled",width:"600px;",height:"300px",html:"<div id='dam_disabled'><h1>
134"+Ctesius.getConfig("no_draw_map_alert")+"</h1></div>"}),this.set_tab("map"),setTimeout((e=this,function(){return e.set_up_map(),e._draggable_map.renderTiles(!1),Ctesius.kickEvent("properties_map_toggle_view_displayed",e._draggable_map)}),1e3);var e},s.prototype.set_up_map=function(){if(Ctesius.getConfig("enable_draw_a_map")&&window.CanvasRenderingContext2D&&history.pushState){if(null==this._draggable_map)return this._draggable_map=new Ctesius.Views.DrawableMap({collection:Ctesius.getPropertiesCollection()})}else if(null==this._draggable_map)return this._draggable_map=new Ctesius.Views.DraggableMap({collection:Ctesius.getPropertiesCollection()})},s.prototype.user_profile=function(e){var t,s;return Ctesius.kickEvent("before_user_profile_lightview_rendered",Ctesius.getUser()),t=Ctesius.getUser().getOrCreateUserProfileView().getHtml(),Ctesius.hasEvent("user_view_render_handler_render")?Ctesius.kickEvent("user_view_render_handler_render",t,Ctesius.getUser(),e):$.colorbox({className:"profile_colorbox",html:t,onClosed:(s=this,function(){return s.navigate("home")})}),Ctesius.getUser().getOrCreateUserProfileView().render(!1),null==e&&Ctesius.getUser().getOrCreateUserProfileView().showTab(""),null!=e&&Ctesius.getUser().getOrCreateUserProfileView().showTab(e),Ctesius.kickEvent("user_profile_lightview_rendered",Ctesius.getUser())},s.prototype.root=function(){return Ctesius.kickEvent("before_togglable_list_displayed"),this.set_tab("list"),Ctesius.kickEvent("togglable_list_displayed"),this.closeColorBox()},s.prototype.list=function(){return Ctesius.kickEvent("before_togglable_list_displayed"),Ctesius.kickEvent("togglable_list_displayed")},s.prototype.closeColorBox=function(){return Ctesius.hasEvent("user_view_render_handler_close")?Ctesius.kickEvent("user_view_render_handler_close"):$.colorbox.close()},s.prototype.refreshColorBox=function(){var e;if(-1!==window.location.hash.indexOf("#user")||-1!==window.location.hash.indexOf("#/user"))return(e=Backbone.history.fragment.split("/")).length>1?this.user_profile(e[1]):this.user_profile()},s}(Backbone.Router)}).call(this); 135function submitRecaptchaForm(e){var t=$("<input>",{type:"hidden",name:"g-recaptcha-response",id:"g-recaptcha-response",value:e}),a=$(Ctesius.getConfig("submitted_form")[0]);try{Ctesius.kickEvent("after_successful_recaptcha",a[0])}catch(n){}a.append(t).submit()}function addRecaptcha(e){var t=Ctesius.getConfig("recaptcha_version")||3;"cloud"===t?addRecaptchaCloud(e):2===t?(console.log("Adding recaptchaVersion v2"),addRecaptchaV2(e)):(console.log("Adding recaptchaVersion v3"),addRecaptchaV3(e))}function loadRecaptchaScript(e,t){if(!document.getElementById("recaptcha-script")){var a=document.createElement("script");a.id="recaptcha-script",a.src=e,a.onload=t,document.body.appendChild(a)}}function showRecaptchaBadge(){$(".grecaptcha-badge").addClass("show")}function configureRecaptchaBadge(e){$(e+" input, "+e+" textarea").focus(function(){$(".grecaptcha-badge").addClass("show")}),$(e+" input, "+e+" textarea").blur(function(){$(".grecaptcha-badge").removeClass("show")})}function addRecaptchaV3(e){for(var t=0;t<e.length;t++)$("body").on("focus",e[t]+" input",function(){document.getElementById("recaptcha-script")||($("body").append('<script id="recaptcha-script" src="https://www.google.com/recaptcha/api.js?render=6LeKPOUUAAAAAEKNWIu2qkNwdOqVxH41v0D7fe-K">'),setTimeout(function(){$(".grecaptcha-badge").addClass("show")},2e3))}),configureRecaptchaBadge(e[t]),$(document).on("submit",e[t],function(e){return e.preventDefault(),$("#g-recaptcha-response").val()?e.target.submit():(Ctesius.addConfig("submitted_form",$(e.target)),grecaptcha.ready(function(){grecaptcha.execute("6LeKPOUUAAAAAEKNWIu2qkNwdOqVxH41v0D7fe-K",{action:"homepage"}).then(function(e){submitRecaptchaForm(e)})}),!1)})}function recaptchaCloudAction(e){var t=e.getAttribute("action")||"";return-1!==t.indexOf("form_submissions")?"form_submission":-1!==t.indexOf("send_to_friend")?"send_to_friend":-1!==t.indexOf("properties")?"property_enquiry":"sign_up"===e.id?"sign_up":"lead"}function addRecaptchaCloud(e){for(var t=0;t<e.length;t++)$("body").on("focus",e[t]+" input",function(){loadRecaptchaScript("https://www.google.com/recaptcha/enterprise.js?render="+RECAPTCHA_CLOUD_SITE_KEY,function(){gre
135captcha.enterprise.ready(showRecaptchaBadge)})}),configureRecaptchaBadge(e[t]),$(document).on("submit",e[t],function(e){if("undefined"!=typeof grecaptcha&&grecaptcha.enterprise)return e.preventDefault(),$(e.target).find('[name="g-recaptcha-response"]').val()?e.target.submit():(Ctesius.addConfig("submitted_form",$(e.target)),grecaptcha.enterprise.ready(function(){grecaptcha.enterprise.execute(RECAPTCHA_CLOUD_SITE_KEY,{action:recaptchaCloudAction(e.target)}).then(function(e){submitRecaptchaForm(e)})}),!1)})}function addRecaptchaV2(e){var t=$("<div>",{"class":"g-recaptcha","data-sitekey":"6Lf16S0UAAAAAL0YaWCLRhChd4Uk77b-4Ai0ZdRY","data-callback":"submitRecaptchaForm","data-size":"invisible"});$(e.join(", ")).append(t);for(var a=0;a<e.length;a++)$("body").on("focus",e[a]+" input",function(){document.getElementById("recaptcha-script")||($("body").append('<script id="recaptcha-script" src="https://www.google.com/recaptcha/api.js">'),setTimeout(function(){$(".grecaptcha-badge").addClass("show")},2e3))}),configureRecaptchaBadge(e[a]),$(document).on("submit",e[a],function(e){return $("#g-recaptcha-response").val()?e.target.submit():(Ctesius.addConfig("submitted_form",$(e.target)),"undefined"!=typeof grecaptcha&&grecaptcha.execute(),!1)})}function perform_homeflow_alert(e){switch(e){case"welcome-lead-sent-new-user":homeflow_alert("Thank you. We have sent your message and created you an account!","success");break;case"welcome-lead-sent":homeflow_alert("Thanks! We've sent an email to the agent!","success");break;case"lead-sending-error":homeflow_alert("There was an error in sending your email to the agent","error");break;case"postcode-invalid":homeflow_alert("Invalid postcode format","error");break;case"file-upload-error":homeflow_alert("File upload failed, please try again in a minute","error");break;case"location-not-found":homeflow_alert("Sorry, we couldn't find that location.","error");break;case"lead-sending-error-validation":homeflow_alert("Sorry, we couldn't create your lead. Only alphanumeric characters are allowed for First and Last name.","error");break;case"send-property-sent":homeflow_alert("This property has been shared successfully!","success");break;case"send-property-invalid":homeflow_alert("There was an error trying to share this property","error");break;case"user-create-dupe":homeflow_alert("There is already a user with that email address registered","error");break;case"user-create-successful":homeflow_alert("You have registered successfully and been logged in.","success");break;case"user-login-successful":homeflow_alert("You have been logged in successfully!","success");break;case"user-create-error":homeflow_alert("There was an error in registering you with the agent","error");break;case"names-not-different":homeflow_alert("First and last name must be different","error")}}function homeflow_alert(e,t){var a='<div class="alert alert-'+t+'"><a class="close" href="#" data-dismiss="alert">\xd7</a>'+e+"</div>";HOMEFLOW_CONFIG.alert_location.html(a)}function checkPass(){var e=document.getElementById("client[password]"),t=document.getElementById("client[password_confirmation]"),a=document.getElementById("match_message"),n="#C5E3BF",r="#ff6666";e.value==t.value&&""!=t.value?(e.style.backgroundColor=n,t.style.backgroundColor=n,a.style.color="#008000",a.innerHTML="Passwords match"):(t.style.backgroundColor="#CD9B9B",a.style.color=r,a.innerHTML="Passwords do not match")}function updateSearch(e){var t={alert_frequency:$(e).val().split("_")[1]};Ctesius.Actions.updateSavedSearch($(e).val().split("_")[0],t)}var map,user,user_view,user_profile_view,alternative_locations,search_view,HOMEFLOW_CONFIG={};Liquid.readTemplateFile=function(e){var t=$(e);return t?t.innerHTML:e+" can't be found."},$(function(){if(window.noRecaptcha)return null;var e=['form[action="/leads"]','form[action="/form_submissions"]','form[action*="properties"]',"form#sign_up"];addRecaptcha(e),Ctesius.registerEvent("recaptcha_form_opened",function(t){t.preventDefault(),addRecaptcha(e)})});var RECAPTCHA_CLOUD_SITE_KEY="6Lc5kLUtAAAAAKXRaUI9psr6Fyf6i4hWigA6E6Pp";$(window).load(function(){$("input#location").on("input keyup paste",function(){Ctesius.getSearch().set("q",$(this).val())}
135),Ctesius.getConfig("disable_autocomplete")||($("input#location").keypress(function(e){13==e.which&&$("input.autocomplete_location").blur()}),$("input#location").on("input keyup paste",function(){0==$.trim(this.value).length&&Ctesius.getSearch().clear()}),$("input#location").autocomplete({select:function(e,t){Ctesius.getSearch().set("place",new Ctesius.Models.Place({place_id:t.item.place_id})),$(this).closest("form").find("#place_id").val(t.item.place_id)},change:function(e,t){null==t.item&&""==$(this).val()&&(Ctesius.getSearch().clear(),$("#place_id").val(""))},minLength:2,source:function(e,t){$.ajax({url:Ctesius.getConfig("root_url")+"places",dataType:"json",data:{term:e.term.toLowerCase()},success:function(e){t($.map(e,function(e){return{label:e[0],place_id:e[1]}}))}})}})),$("input.autocomplete_location").autocomplete({select:function(e,t){$(this).closest("form").find(".autocomplete_location_result").val(t.item.place_id),$(this).closest("form").find(".autocomplete_location_lat").val(t.item.lat),$(this).closest("form").find(".autocomplete_location_lng").val(t.item.lng)},change:function(e,t){null==t.item&&($("input.autocomplete_location_result").val(""),$("input.autocomplete_location_lat").val(""),$("input.autocomplete_location_lng").val(""))},minLength:2,source:function(e,t){$.ajax({url:Ctesius.getConfig("root_url")+"places",dataType:"json",data:{term:e.term.toLowerCase()},success:function(e){t($.map(e,function(e){return{label:e[0],place_id:e[1],lat:e[3],lng:e[4]}}))}})}}),$("input.autocomplete_location").keypress(function(e){13==e.which&&$("input.autocomplete_location").blur()})}),jQuery.fn.serializeObject=function(){var e,t;return e=this.serializeArray(),t={},$.each(e,function(){var e;e=null!=this.value?this.value:"",null!=t[this.name]?(t[this.name].push||(t[this.name]=[t[this.name]]),t[this.name].push(e)):t[this.name]=e}),t},Number.prototype.formatMoney=function(e,t,a){var n=this,r=(e=isNaN(e=Math.abs(e))?2:e,t=t==undefined?",":t,a=a==undefined?".":a,n<0?"-":""),i=parseInt(n=Math.abs(+n||0).toFixed(e))+"",o=(o=i.length)>3?o%3:0;return r+(o?i.substr(0,o)+a:"")+i.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+a)+(e?t+Math.abs(n-i).toFixed(e).slice(2):"")},$(document).ready(function(){Ctesius.getConfig("disable_legacy_cookie_directive")||$.cookie("cookie_directive")||($("#cookie_directive").show(0).delay(12e3).fadeOut("slow"),$.cookie("cookie_directive","seen",{expires:365,path:"/"}))}),$(document).ready(function(){if($("#print_link").length>0){var e=window.location.href.replace("/sales","/sales/print").replace("/lettings","/lettings/print");$("#print_link").attr("href",e)}}),function(){function e(e,t){var a=XdUtils.extend(t,d);a.id=e,parent.postMessage(JSON.stringify(a),"*")}function t(t,a){e(t,{key:a,value:localStorage.getItem(a)})}function a(t,a,n){localStorage.setItem(a,n),e(t,{success:localStorage.getItem(a)===n})}function n(t,a){localStorage.removeItem(a),e(t,{})}function r(t,a){e(t,{key:localStorage.key(a)})}function i(t){e(t,{size:JSON.stringify(localStorage).length})}function o(t){e(t,{length:localStorage.length})}function s(t){localStorage.clear(),e(t,{})}function c(e){var c;try{c=JSON.parse(e.data)}catch(l){}c&&c.namespace===u&&("set"===c.action?a(c.id,c.key,c.value):"get"===c.action?t(c.id,c.key):"remove"===c.action?n(c.id,c.key):"key"===c.action?r(c.id,c.key):"size"===c.action?i(c.id):"length"===c.action?o(c.id):"clear"===c.action&&s(c.id))}function l(){var e={namespace:u,id:"iframe-ready"};parent.postMessage(JSON.stringify(e),"*")}var u="cross-domain-local-message",d={namespace:u};window.addEventListener?window.addEventListener("message",c,!1):window.attachEvent("onmessage",c),l()}(),$(function(){$("#booking_calendar_link").click(function(){Ctesius.createBookingCalendar()}),$("#booking_calendar_modal_link").click(function(){Ctesius.createBookingCalendarModal(),$("#fullcalendar_modal_background").click(function(){$(this).fadeOut()}),$("#fullcalendar_modal").click(function(e){e.stopPropagation()})});var e=$('[action="/form_submissions"]');if(e.length){optInLabel=$('[for="opt_in_marketing"]').first(),hiddenOptInFields=[["opt_in_marketing_statement",optInLabel.text()],["opt_in_marketing_url",window.location.href]];var t=_(hiddenOptInFields).map(function(e){return"<input type='hidden' name='marketing_preferences["+e[0]+"]' value='"+e[1]+"'/>"}).join("");e.append(t)}}),function(e){if("function"==typeof define&&define.amd)define(["jquery"],e);
135else if("object"==typeof exports){var t=require("jquery");module.exports=e(t)}else e(window.jQuery||window.Zepto||window.$)}(function(e){"use strict";e.fn.serializeJSON=function(t){var a,n,r,i,o,s,c,l,u,d,p,f;return a=e.serializeJSON,n=this,r=a.setupOpts(t),i=n.serializeArray(),a.readCheckboxUncheckedValues(i,r,n),o={},e.each(i,function(e,t){s=t.name,c=t.value,u=a.extractTypeAndNameWithNoType(s),d=u.nameWithNoType,(p=u.type)||(p=a.attrFromInputWithName(n,s,"data-value-type")),a.validateType(s,p,r),"skip"!==p&&(f=a.splitInputNameIntoKeysArray(d),l=a.parseValue(c,s,p,r),!l&&a.shouldSkipFalsy(n,s,d,p,r)||a.deepSet(o,f,l,r))}),o},e.serializeJSON={defaultOptions:{checkboxUncheckedValue:undefined,parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,skipFalsyValuesForTypes:[],skipFalsyValuesForFields:[],customTypes:{},defaultTypes:{string:function(e){return String(e)},number:function(e){return Number(e)},boolean:function(e){return-1===["false","null","undefined","","0"].indexOf(e)},"null":function(e){return-1===["false","null","undefined","","0"].indexOf(e)?e:null},array:function(e){return JSON.parse(e)},object:function(e){return JSON.parse(e)},auto:function(t){return e.serializeJSON.parseValue(t,null,null,{parseNumbers:!0,parseBooleans:!0,parseNulls:!0})},skip:null},useIntKeysAsArrayIndex:!1},setupOpts:function(t){var a,n,r,i,o,s;for(a in s=e.serializeJSON,null==t&&(t={}),r=s.defaultOptions||{},n=["checkboxUncheckedValue","parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","skipFalsyValuesForTypes","skipFalsyValuesForFields","customTypes","defaultTypes","useIntKeysAsArrayIndex"],t)if(-1===n.indexOf(a))throw new Error("serializeJSON ERROR: invalid option '"+a+"'. Please use one of "+n.join(", "));return o=(i=function(e){return!1!==t[e]&&""!==t[e]&&(t[e]||r[e])})("parseAll"),{checkboxUncheckedValue:i("checkboxUncheckedValue"),parseNumbers:o||i("parseNumbers"),parseBooleans:o||i("parseBooleans"),parseNulls:o||i("parseNulls"),parseWithFunction:i("parseWithFunction"),skipFalsyValuesForTypes:i("skipFalsyValuesForTypes"),skipFalsyValuesForFields:i("skipFalsyValuesForFields"),typeFunctions:e.extend({},i("defaultTypes"),i("customTypes")),useIntKeysAsArrayIndex:i("useIntKeysAsArrayIndex")}},parseValue:function(t,a,n,r){var i,o;return i=e.serializeJSON,o=t,r.typeFunctions&&n&&r.typeFunctions[n]?o=r.typeFunctions[n](t):r.parseNumbers&&i.isNumeric(t)?o=Number(t):!r.parseBooleans||"true"!==t&&"false"!==t?r.parseNulls&&"null"==t?o=null:r.typeFunctions&&r.typeFunctions.string&&(o=r.typeFunctions.string(t)):o="true"===t,r.parseWithFunction&&!n&&(o=r.parseWithFunction(o,a)),o},isObject:function(e){return e===Object(e)},isUndefined:function(e){return void 0===e},isValidArrayIndex:function(e){return/^[0-9]+$/.test(String(e))},isNumeric:function(e){return e-parseFloat(e)>=0},optionKeys:function(e){if(Object.keys)return Object.keys(e);var t,a=[];for(t in e)a.push(t);return a},readCheckboxUncheckedValues:function(t,a,n){var r,i,o;null==a&&(a={}),e.serializeJSON,r="input[type=checkbox][name]:not(:checked):not([disabled])",n.find(r).add(n.filter(r)).each(function(n,r){if(i=e(r),null==(o=i.attr("data-unchecked-value"))&&(o=a.checkboxUncheckedValue),null!=o){if(r.name&&-1!==r.name.indexOf("[]["))throw new Error("serializeJSON ERROR: checkbox unchecked values are not supported on nested arrays of objects like '"+r.name+"'. See https://github.com/marioizquierdo/jquery.serializeJSON/issues/67");t.push({name:r.name,value:o})}})},extractTypeAndNameWithNoType:function(e){var t;return(t=e.match(/(.*):([^:]+)$/))?{nameWithNoType:t[1],type:t[2]}:{nameWithNoType:e,type:null}},shouldSkipFalsy:function(t,a,n,r,i){var o=e.serializeJSON.attrFromInputWithName(t,a,"data-skip-falsy");if(null!=o)return"false"!==o;var s=i.skipFalsyValuesForFields;if(s&&(-1!==s.indexOf(n)||-1!==s.indexOf(a)))return!0;var c=i.skipFalsyValuesForTypes;return null==r&&(r="string"),!(!c||-1===c.indexOf(r))},attrFromInputWithName:function(e,t,a){var n;return n='[name="'+t.replace(/(:|\.|\[|\]|\s)/g,"\\$1")+'"]',e.find(n).add(e.filter(n)).attr(a)},validateType:function(t,a,n){var r,i;if(r=(i=e.serializeJSON).optionKeys(n?n.typeFunctions:i.defaultOptions.defaultTypes),a&&-1===r.indexOf(a))throw new Error("seri
135alizeJSON ERROR: Invalid type "+a+" found in input name '"+t+"', please use one of "+r.join(", "));return!0},splitInputNameIntoKeysArray:function(t){var a;return e.serializeJSON,a=t.split("["),""===(a=e.map(a,function(e){return e.replace(/\]/g,"")}))[0]&&a.shift(),a},deepSet:function(t,a,n,r){var i,o,s,c,l,u;if(null==r&&(r={}),(u=e.serializeJSON).isUndefined(t))throw new Error("ArgumentError: param 'o' expected to be an object or array, found undefined");if(!a||0===a.length)throw new Error("ArgumentError: param 'keys' expected to be an array with least one element");i=a[0],1===a.length?""===i?t.push(n):t[i]=n:(o=a[1],""===i&&(l=t[c=t.length-1],i=u.isObject(l)&&(u.isUndefined(l[o])||a.length>2)?c:c+1),""===o?!u.isUndefined(t[i])&&e.isArray(t[i])||(t[i]=[]):r.useIntKeysAsArrayIndex&&u.isValidArrayIndex(o)?!u.isUndefined(t[i])&&e.isArray(t[i])||(t[i]=[]):!u.isUndefined(t[i])&&u.isObject(t[i])||(t[i]={}),s=a.slice(1),u.deepSet(t[i],s,n,r))}}}); 136!function(t){function i(t,i){return i++,Math.floor(Math.random()*(i-t))+t}t.fn.photostack=function(e){var s={speed:200,captionOffset:75,padding:45,photostackClass:"photostack",float:"none",overlay:"true",overlay_msg:"Click to view",caption_clr:"transparent",caption_txt:"#000000"};return e&&t.extend(s,e),this.each(function(){var e=t(this).find("img").height()+s.captionOffset,a=t(this).find("img").width();t(this).addClass(s.photostackClass).css({height:e+s.padding,width:a+s.padding,float:s.float,cursor:"pointer"}),t(this).find("img").wrap('<div class="photo"></div>'),(s.overlay="true")&&(t(this).append('<span class="playbtn visible" style="display:block; zoom:1; position:absolute; left:-30px; background-color:#FFFFFF; opacity:0.5; filter:alpha(opacity=50); text-align:center; font-weight:bold; font-size:16px; padding:15px 0px; z-index:1000000000; top:30%;">'+s.overlay_msg+"</span>"),t(".playbtn").css({width:a+s.padding+40}));var h=t(this).find("div.photo"),n=h.length,r=new Array,o=n-1;t(this).append('<div class="caption"></div>');var l=t(this).find(".caption");l.css({top:e+"px","background-color":s.overlay_clr,color:s.overlay_txt,"-moz-border-radius":"10px"}),h.each(function(e){t(this).css({"z-index":e+15e3,top:i(-10,10),left:i(-10,10)}),e==o?t(this).find("img").rotate({angle:i(-8,8),preservePosition:!1,bind:[{mouseover:function(){t(this).rotateAnimation(2)}},{mouseout:function(){t(this).rotateAnimation(-2)}},{click:function(){t(this).unbind("mouseover").unbind("mouseout").rotateAnimation(i(-10,10))}}]}):t(this).find("img").rotate({angle:i(-8,8),preservePosition:!1,bind:[{click:function(){t(this).rotateAnimation(i(-10,10))}}]});var s=t(this).next("p");t(s).remove(),s.length>0?(s.find("a").addClass("noflip"),r.push(t(s).html())):r.push("")}),t(document).ready(function(){l.html(r[o])}),t(this).click(function(e){t(e.target).hasClass("noflip")?window.location=e.target.attr("href"):(t(".playbtn").hasClass("visible")&&t(".playbtn").hide().removeClass("visible").addClass("hidden"),t(h[o]).animate({top:-100,left:150},s.speed,function(){t(this).animate({top:i(-10,10),left:i(-10,10)},s.speed);var e=t(this).css("z-index");t(this).css("z-index",e-n),o<0&&(o=n-1)}),o--,l.stop().animate({opacity:0}
136,100,function(){o<0?l.html(r[n-1]):l.html(r[o]),t(this).animate({opacity:1},200)}))})}),this}}(jQuery),function(t){for(var i,e=document.getElementsByTagName("head")[0].style,s="transformProperty WebkitTransform OTransform".split(" "),a=0;a<s.length;a++)e[s[a]]!==undefined&&(i=s[a]);var h,n=!1;jQuery.fn.extend({ImageRotate:function(i){if(!this.Wilq32||!this.Wilq32.PhotoEffect){var e=t.extend(!0,{},i);return new Wilq32.PhotoEffect(this.get(0),e)._temp}},rotate:function(i){if(0!==this.length&&void 0!==i){"number"==typeof i&&(i={angle:i});for(var e=[],s=0,a=this.length;s<a;s++){var h=this.get(s);"undefined"==typeof h.Wilq32?e.push(t(t(h).ImageRotate(i))):h.Wilq32.PhotoEffect._rotate(i.angle)}return e}},rotateAnimation:function(i){if(0!==this.length&&void 0!==i){"number"==typeof i&&(i={animateAngle:i});for(var e=[],s=0,a=this.length;s<a;s++){var h=this.get(s);"undefined"==typeof h.Wilq32?e.push(t(t(h).ImageRotate(i))):h.Wilq32.PhotoEffect.rotateAnimation(i)}return e}}}),Wilq32=window.Wilq32||{},Wilq32.PhotoEffect=function(){function t(t,i){this._img=t,this._parameters=i||{},this._parameters.angle=this._angle=i.angle||0,this._parameters.animateAngle="number"==typeof i.animateAngle?i.animateAngle:this._angle}return i?function(i,e){t.call(this,i,e),i.Wilq32={PhotoEffect:this},this._temp=this._img,this._BindEvents(i,this._parameters.bind),this._rotate(this._parameters.angle),this._parameters.angle!=this._parameters.animateAngle&&this.rotateAnimation(this._parameters)}:function(i,e){if(t.call(this,i,e),this._parameters.className=i.className,this._parameters.id=i.getAttribute("id"),this._temp=document.createElement("span"),this._temp.style.display="inline-block",this._temp.Wilq32={PhotoEffect:this},i.parentNode.insertBefore(this._temp,i),i.complete)this._Loader();else{var s=this;jQuery(this._img).bind("load",function(){s._Loader()})}}}(),Wilq32.PhotoEffect.prototype={rotateAnimation:function(t){this._parameters.animateAngle=t.animateAngle,this._parameters.callback=t.callback||this._parameters.callback||function(){},this._animateStart()},_BindEvents:function(t,i){if(i)for(var e in i)if(i.hasOwnProperty(e))for(var s in i[e])i[e].hasOwnProperty(s)&&jQuery(t).bind(s,i[e][s])},_Loader:function(){function t(){this._rotate(this._parameters.angle),this._parameters.angle!=this._parameters.animateAngle&&this.rotateAnimation(this._parameters)}return n?function(){var i=this._img.width,e=this._img.height;this._img.parentNode.removeChild(this._img),this._vimage=this.createVMLNode("image"),this._vimage.src=this._img.src,this._vimage.style.height=e+"px",this._vimage.style.width=i+"px",this._vimage.style.position="absolute",this._vimage.style.top="0px",this._vimage.style.left="0px",this._rect=this.createVMLNode("rect"),this._rect.style.height=e+20+"px",this._rect.style.width=i+20+"px",this._rect.style.position="absolute",this._rect.style.top="-10px",this._rect.style.left="-10px",this._container=this.createVMLNode("group"),this._container.style.width=i,this._container.style.height=e,this._container.style.position="absolute",this._container.setAttribute("coordsize",i-1+","+(e-1)),this._container.appendChild(this._rect),this._container.appendChild(this._vimage),this._temp.appendChild(this._container),this._temp.style.position="relative",this._temp.style.width=i+"px",this._temp.style.height=e+"px",this._temp.setAttribute("id",this._parameters.id),this._temp.className=this._parameters.className,this._BindEvents(this._temp,this._parameters.bind),t.call(this)}:function(){this._temp.setAttribute("id",this._parameters.id),this._temp.className=this._parameters.className,this._width=this._img.width,this._height=this._img.height,this._widthHalf=this._width/2,this._heightHalf=this._height/2;var i=Math.sqrt(this._height*this._height+this._width*this._width);this._widthAdd=i-this._width,this._heightAdd=i-this._height,this._widthAddHalf=this._widthAdd/2,this._heightAddHalf=this._heightAdd/2,this._img.parentNode.removeChild(this._img),this._canvas=document.createElement("canvas"),this._canvas.setAttribute("width",this._width),this._canvas.style.position="relative",this._canvas.style.left=-this._widthAddHalf+"px",this._canvas.style.top=-this._heightAddHalf+"px",this._canvas.Wilq32=this._temp.Wilq32,this._temp.appendChild(this._canvas),this._temp.style.width=this._width+"px",this._temp.style.height=this._height+"px",this._BindEvents(this._canvas,this._parameters.bind),this._cnv=this._canvas.getContext("2d"),t.call(this)}}(),_animateStart:function(){this._timer&&clearTimeout(this._timer),this._animate()},_animate:function(){var t=0==!!Math.round(100*this._angle-100*this._parameters.animateAngle)&&!!this._timer;if(this._parameters.callback&&t&&this._parameters.callback(),t&&!this._parameters.animatedGif)clearTimeout(this._timer);else{(this._canvas||this._vimage||this._img)&&(this._angle-=.1*(this._angle-this._parameters.animateAngle),"undefined"!=typeof this._parameters.minAngle&&(this._angle=Math.max(this._angle,this._parameters.minAngle)),"undefined"!=typeof this._parameters.maxAngle&&(this._angle=Math.min(this._angle,this._parameters.maxAngle)),this._rotate(~~(10*this._angle)/10));var i=this;this._timer=setTimeout(function(){i._animate.call(i)},10)}},_rotate:(h=Math.PI/180,n?function(t){this._container.style.rotation=t+"deg"}:i?function(t){this._img.style[i]="rotate("+t+"deg)"}:function(t){this._img.width&&"number"==typeof t&&(t=t%360*h,this._canvas.width=this._width+this._widthAdd,this._canvas.height=this._height+this._heightAdd,this._cnv.translate(this._widthAddHalf,this._heightAddHalf),this._cnv.translate(this._widthHalf,this._heightHalf),this._cnv.rotate(t),this._cnv.translate(-this._widthHalf,-this._heightHalf),this._cnv.fillStyle="#CCC",this._cnv.fillRect(-12,-12,this._width+24,this._height+24),this._cnv.fillStyle="rgb(255,255,255)",this._cnv.fillRect(-10,-10,this._width+20,this._height+20),this._cnv.drawImage(this._img,0,0))})},n&&(Wilq32.PhotoEffect.prototype.createVMLNode=function(){document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{return!document.namespaces.rvml&&document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<rvml:"+t+' class="rvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}())}(jQuery); 137"document"in self&&("classList"in document.createElement("_")?function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1}
137,a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;i<s;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],f=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return-1!==c(this,t+="")},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",-1===c(this,t)&&(this.push(t),s=!0)}while(++n<i);s&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do{for(t=n[i]+"",e=c(this,t);-1!==e;)this.splice(e,1),r=!0,e=c(this,t)}while(++i<s);r&&this._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},u.toString=function(){return this.join(" ")},s.defineProperty){var h={get:f,enumerable:!0,configurable:!0};try{s.defineProperty(i,e,h)}catch(d){-2146823252===d.number&&(h.enumerable=!1,s.defineProperty(i,e,h))}}else s[n].__defineGetter__&&i.__defineGetter__(e,f)}}(self)); 138!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function e(){return _s.apply(null,arguments)}function t(e){_s=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){var t;for(t in e)return!1;return!0}function r(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function o(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,s){return gt(e,t,n,s,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function c(e){return null==e._pf&&(e._pf=h()),e._pf}function f(e){if(null==e._isValid){var t=c(e),n=ys.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&t.bigHour===undefined),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function m(e){var t=d(NaN);return null!=e?l(c(t),e):c(t).userInvalidated=!0,t}function _(e){return void 0===e}function y(e,t){var n,s,i;if(_(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),_(t._i)||(e._i=t._i),_(t._f)||(e._f=t._f),_(t._l)||(e._l=t._l),_(t._strict)||(e._strict=t._strict),_(t._tzm)||(e._tzm=t._tzm),_(t._isUTC)||(e._isUTC=t._isUTC),_(t._offset)||(e._offset=t._offset),_(t._pf)||(e._pf=c(t)),_(t._locale)||(e._locale=t._locale),gs.length>0)for(n in gs)_(i=t[s=gs[n]])||(e[s]=i);return e}function g(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===ps&&(ps=!0,e.updateOffset(this),ps=!1)}function p(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function v(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function S(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&v(e[s])!==v(t[s]))&&a++;return a+r}function M(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function k(t,n){var s=!0;return l(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),s){for(var i,r=[],a=0;a<arguments.length;a++){if(i="","object"==typeof arguments[a]){for(var o in i+="\n["+a+"] ",arguments[0])i+=o+": "+arguments[0][o]+", ";i=i.slice(0,-2)}else i=arguments[a];r.push(i)}M(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),s=!1}return n.apply(this,arguments)},n)}function D(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),ws[t]||(M(n),ws[t]=!0)}function Y(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)Y(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function x(e,t){var n,i=l({},e);for(n in t)u(t,n)&&(s(e[n])&&s(t[n])?(i[n]={},l(i[n],e[n]),l(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)u(e,n)&&!u(t,n)&&s(e[n])&&(i[n]=l({},i[n]));return i}function T(e){null!=e&&this.set(e)}function b(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return Y(s)?s.call(t,n):s}function P(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function W(){return this._invalidDate}function R(e){return this._ordinal.replace("%d",e)}function U(e,t,n,s){var i=this._relativeTime[n];return Y(i)?i(e,t,n,s):i.replace(/%d/i,e)}function C(e,t){var n=this._relativeTime[e>0?"future":"past"];return Y(n)?n(t):n.replace(/%s/i,t)}function F(e,t){var n=e.toLowerCase();xs[n]=xs[n+"s"]=xs[t]=e}function H(e){return"string"==typeof e?xs[e]||xs[e.toLowerCase()]:undefined}function L(e){var t,n,s={};for(n in e)u(e,n)&&(t=H(n))&&(s[t]=e[n]);return s}function G(e,t){Ts[e]=t}function V(e){var t=[];for(var n in e)t.push({unit:n,priority:Ts[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function j(t,n){return function(s){return null!=s?(A(this,t,s),e.updateOffset(this,n),this):N(this,t)}}function N(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function A(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function E(e){return Y(this[e=H(e)])?this[e]():this}function I(e,t){if("object"==typeof e)for(var n=V(e=L(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(Y(this[e=H(e)]))return this[e](t);return this}function z(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}function Z(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(Rs[e]=i),t&&(Rs[t[0]]=function(){return z(i.apply(this,arguments),t[1],t[2])}),n&&(Rs[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function $(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q(e){var t,n,s=e.match(bs);for(t=0,n=s.length;t<n;t++)Rs[s[t]]?s[t]=Rs[s[t]]:s[t]=$(s[t]);return function(t){var i,r="";for(i=0;i<n;i++)r+=s[i]instanceof Function?s[i].call(t,e):s[i];return r}}function B(e,t){return e.isValid()?(t=J(t,e.localeData()),Ws[t]=Ws[t]||q(t),Ws[t](e)):e.localeData().invalidDate()}function J(e,t){function n(e){return t.longDateFormat(e)||e}var s=5;for(Ps.lastIndex=0;s>=0&&Ps.test(e);)e=e.replace(Ps,n),Ps.lastIndex=0,s-=1;return e}function Q(e,t,n){Js[e]=Y(t)?t:function(e){return e&&n?n:t}}function X(e,t){return u(Js,e)?Js[e](t._strict,t._locale):new RegExp(K(e))}function K(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,s=t;
vendor: 11,247 bytes, line 138
138for("string"==typeof e&&(e=[e]),r(t)&&(s=function(e,n){n[t]=v(e)}),n=0;n<e.length;n++)Qs[e[n]]=s}function ne(e,t){te(e,function(e,n,s,i){s._w=s._w||{},t(e,s._w,s,i)})}function se(e,t,n){null!=t&&u(Qs,e)&&Qs[e](t,n._a,n,e)}function ie(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function re(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ui).test(t)?"format":"standalone"][e.month()]:this._months}function ae(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ui.test(t)?"format":"standalone"][e.month()]:this._monthsShort}function oe(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=d([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=oi.call(this._shortMonthsParse,a))?i:null:-1!==(i=oi.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=oi.call(this._shortMonthsParse,a))?i:-1!==(i=oi.call(this._longMonthsParse,a))?i:null:-1!==(i=oi.call(this._longMonthsParse,a))?i:-1!==(i=oi.call(this._shortMonthsParse,a))?i:null}function ue(e,t,n){var s,i,r;if(this._monthsParseExact)return oe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=d([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}}function le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=v(t);else if(!r(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),ie(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function de(t){return null!=t?(le(this,t),e.updateOffset(this,!0),this):N(this,"Month")}function he(){return ie(this.year(),this.month())}function ce(e){return this._monthsParseExact?(u(this,"_monthsRegex")||me.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=hi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function fe(e){return this._monthsParseExact?(u(this,"_monthsRegex")||me.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=ci),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function me(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=d([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=ee(s[t]),i[t]=ee(i[t]);for(t=0;t<24;t++)r[t]=ee(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function _e(e){return ye(e)?366:365}function ye(e){return e%4==0&&e%100!=0||e%400==0}function ge(){return ye(this.year())}function pe(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&e>=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}function we(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ve(e,t,n){var s=7+t-n;return-((7+we(e,0,s).getUTCDay()-t)%7)+s-1}function Se(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+ve(e,s,i);return o<=0?a=_e(r=e-1)+o:o>_e(e)?(r=e+1,a=o-_e(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Me(e,t,n){var s,i,r=ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+ke(i=e.year()-1,t,n):a>ke(e.year(),t,n)?(s=a-ke(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function ke(e,t,n){var s=ve(e,t,n),i=ve(e+1,t,n);return(_e(e)-s+i)/7}function De(e){return Me(e,this._week.dow,this._week.doy).week}function Ye(){return this._week.dow}function Oe(){return this._week.doy}function xe(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Te(e){var t=Me(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function be(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Pe(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function We(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Re(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ue(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ce(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=d([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=oi.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=oi.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=oi.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=oi.call(this._weekdaysParse,a))?i:-1!==(i=oi.call(this._shortWeekdaysParse,a))?i:-1!==(i=oi.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=oi.call(this._shortWeekdaysParse,a))?i:-1!==(i=oi.call(this._weekdaysParse,a))?i:-1!==(i=oi.call(this._minWeekdaysParse,a))?i:null:-1!==(i=oi.call(this._minWeekdaysParse,a))?i:-1!==(i=oi.call(this._weekdaysParse,a))?i:-1!==(i=oi.call(this._shortWeekdaysParse,a))?i:null}function Fe(e,t,n){var s,i,r;if(this._weekdaysParseExact)return Ce.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=d([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}}function He(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=be(e,this.localeData()),this.add(e-t,"d")):t}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ge(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Pe(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ve(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ae.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=pi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function je(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ae.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ne(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ae.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=vi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ae(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=ee(o[t]),u[t]=ee(u[t]),l[t]=ee(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ee(){return this.hours()%12||12}function Ie(){return this.hours()||24}function ze(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ze(e,t){return t._meridiemParse}function $e(e){return"p"===(e+"").toLowerCase().charAt(0)}function qe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Be(e){return e?e.toLowerCase().replace("_","-"):e}function Je(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=Be(e[r]).split("-")).length,n=(n=Be(e[r+1]))?n.split("-"):null;t>0;){if(s=Qe(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&S(i,n,!0)>=t-1)break;t--}r++}return null}function Qe(e){var t=null;if(!Yi[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Si._abbr,require("./locale/"+e),Xe(t)}catch(n){}return Yi[e]}function Xe(e,t){var n;return e&&(n=_(t)?tt(e):Ke(e,t))&&(Si=n),Si._abbr}function Ke(e,t){if(null!==t){var n=Di;if(t.abbr=e,null!=Yi[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Yi[e]._config;else if(null!=t.parentLocale){if(null==Yi[t.parentLocale])return Oi[t.parentLocale]||(Oi[t.parentLocale]=[]),Oi[t.parentLocale].push({name:e,config:t}),null;n=Yi[t.parentLocale]._config}return Yi[e]=new T(x(n,t)),Oi[e]&&Oi[e].forEach(function(e){Ke(e.name,e.config)}),Xe(e),Yi[e]}return delete Yi[e],null}function et(e,t){if(null!=t){var n,s=Di;null!=Yi[e]&&(s=Yi[e]._config),(n=new T(t=x(s,t))).parentLocale=Yi[e],Yi[e]=n,Xe(e)}else null!=Yi[e]&&(null!=Yi[e].parentLocale?Yi[e]=Yi[e].parentLocale:null!=Yi[e]&&delete Yi[e]);return Yi[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Si;if(!n(e)){if(t=Qe(e))return t;e=[e]}return Je(e)}function nt(){return vs(Yi)}function st(e){var t,n=e._a;return n&&-2===c(e).overflow&&(t=n[Ks]<0||n[Ks]>11?Ks:n[ei]<1||n[ei]>ie(n[Xs],n[Ks])?ei:n[ti]<0||n[ti]>24||24===n[ti]&&(0!==n[ni]||0!==n[si]||0!==n[ii])?ti:n[ni]<0||n[ni]>59?ni:n[si]<0||n[si]>59?si:n[ii]<0||n[ii]>999?ii:-1,c(e)._overflowDayOfYear&&(t<Xs||t>
vendor: 5,253 bytes, line 138
138ei)&&(t=ei),c(e)._overflowWeeks&&-1===t&&(t=ri),c(e)._overflowWeekday&&-1===t&&(t=ai),c(e).overflow=t),e}function it(e){var t,n,s,i,r,a,o=e._i,u=xi.exec(o)||Ti.exec(o);if(u){for(c(e).iso=!0,t=0,n=Pi.length;t<n;t++)if(Pi[t][1].exec(u[1])){i=Pi[t][0],s=!1!==Pi[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=Wi.length;t<n;t++)if(Wi[t][1].exec(u[3])){r=(u[2]||" ")+Wi[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!bi.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),dt(e)}else e._isValid=!1}function rt(t){var n=Ri.exec(t._i);null===n?(it(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t))):t._d=new Date(+n[1])}function at(e,t,n){return null!=e?e:null!=t?t:n}function ot(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ut(e){var t,n,s,i,r=[];if(!e._d){for(s=ot(e),e._w&&null==e._a[ei]&&null==e._a[Ks]&<(e),e._dayOfYear&&(i=at(e._a[Xs],s[Xs]),e._dayOfYear>_e(i)&&(c(e)._overflowDayOfYear=!0),n=we(i,0,e._dayOfYear),e._a[Ks]=n.getUTCMonth(),e._a[ei]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ti]&&0===e._a[ni]&&0===e._a[si]&&0===e._a[ii]&&(e._nextDay=!0,e._a[ti]=0),e._d=(e._useUTC?we:pe).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ti]=24)}}function lt(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=at(t.GG,e._a[Xs],Me(pt(),1,4).year),s=at(t.W,1),((i=at(t.E,1))<1||i>7)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Me(pt(),r,a);n=at(t.gg,e._a[Xs],l.year),s=at(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r}s<1||s>ke(n,r,a)?c(e)._overflowWeeks=!0:null!=u?c(e)._overflowWeekday=!0:(o=Se(n,s,i,r,a),e._a[Xs]=o.year,e._dayOfYear=o.dayOfYear)}function dt(t){if(t._f!==e.ISO_8601){t._a=[],c(t).empty=!0;var n,s,i,r,a,o=""+t._i,u=o.length,l=0;for(i=J(t._f,t._locale).match(bs)||[],n=0;n<i.length;n++)r=i[n],(s=(o.match(X(r,t))||[])[0])&&((a=o.substr(0,o.indexOf(s))).length>0&&c(t).unusedInput.push(a),o=o.slice(o.indexOf(s)+s.length),l+=s.length),Rs[r]?(s?c(t).empty=!1:c(t).unusedTokens.push(r),se(r,s,t)):t._strict&&!s&&c(t).unusedTokens.push(r);c(t).charsLeftOver=u-l,o.length>0&&c(t).unusedInput.push(o),t._a[ti]<=12&&!0===c(t).bigHour&&t._a[ti]>0&&(c(t).bigHour=undefined),c(t).parsedDateParts=t._a.slice(0),c(t).meridiem=t._meridiem,t._a[ti]=ht(t._locale,t._a[ti],t._meridiem),ut(t),st(t)}else it(t)}function ht(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function ct(e){var t,n,s,i,r;if(0===e._f.length)return c(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)r=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],dt(t),f(t)&&(r+=c(t).charsLeftOver,r+=10*c(t).unusedTokens.length,c(t).score=r,(null==s||r<s)&&(s=r,n=t));l(e,n||t)}function ft(e){if(!e._d){var t=L(e._i);e._a=o([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ut(e)}}function mt(e){var t=new g(st(_t(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=undefined),t}function _t(e){var t=e._i,s=e._f;return e._locale=e._locale||tt(e._l),null===t||s===undefined&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),p(t)?new g(st(t)):(a(t)?e._d=t:n(s)?ct(e):s?dt(e):yt(e),f(e)||(e._d=null),e))}function yt(t){var s=t._i;s===undefined?t._d=new Date(e.now()):a(s)?t._d=new Date(s.valueOf()):"string"==typeof s?rt(t):n(s)?(t._a=o(s.slice(0),function(e){return parseInt(e,10)}),ut(t)):"object"==typeof s?ft(t):r(s)?t._d=new Date(s):e.createFromInputFallback(t)}function gt(e,t,r,a,o){var u={};return!0!==r&&!1!==r||(a=r,r=undefined),(s(e)&&i(e)||n(e)&&0===e.length)&&(e=undefined),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=r,u._i=e,u._f=t,u._strict=a,mt(u)}function pt(e,t,n,s){return gt(e,t,n,s,!1)}function wt(e,t){var s,i;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return pt();for(s=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](s)||(s=t[i]);return s}function vt(){return wt("isBefore",[].slice.call(arguments,0))}function St(){return wt("isAfter",[].slice.call(arguments,0))}function Mt(e){var t=L(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=tt(),this._bubble()}function kt(e){return e instanceof Mt}function Dt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Yt(e,t){Z(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+z(~~(e/60),2)+t+z(~~e%60,2)})}function Ot(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Hi)||["-",0,0],i=60*s[1]+v(s[2]);return 0===i?0:"+"===s[0]?i:-i}function xt(t,n){var s,i;return n._isUTC?(s=n.clone(),i=(p(t)||a(t)?t.valueOf():pt(t).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),e.updateOffset(s,!1),s):pt(t).local()}
138function Tt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function bt(t,n){var s,i=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ot($s,t)))return this}else Math.abs(t)<16&&(t*=60);return!this._isUTC&&n&&(s=Tt(this)),this._offset=t,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==t&&(!n||this._changeInProgress?zt(this,jt(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Tt(this)}function Pt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Wt(e){return this.utcOffset(0,e)}function Rt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Tt(this),"m")),this}function Ut(){if(null!=this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var e=Ot(Zs,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ct(e){return!!this.isValid()&&(e=e?pt(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Ft(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ht(){if(!_(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=_t(e))._a){var t=e._isUTC?d(e._a):pt(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Lt(){return!!this.isValid()&&!this._isUTC}function Gt(){return!!this.isValid()&&this._isUTC}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function jt(e,t){var n,s,i,a=e,o=null;return kt(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:r(e)?(a={},t?a[t]=e:a.milliseconds=e):(o=Li.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:v(o[ei])*n,h:v(o[ti])*n,m:v(o[ni])*n,s:v(o[si])*n,ms:v(Dt(1e3*o[ii]))*n}):(o=Gi.exec(e))?(n="-"===o[1]?-1:1,a={y:Nt(o[2],n),M:Nt(o[3],n),w:Nt(o[4],n),d:Nt(o[5],n),h:Nt(o[6],n),m:Nt(o[7],n),s:Nt(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Et(pt(a.from),pt(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),s=new Mt(a),kt(e)&&u(e,"_locale")&&(s._locale=e._locale),s}function Nt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function At(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Et(e,t){var n;return e.isValid()&&t.isValid()?(t=xt(t,e),e.isBefore(t)?n=At(e,t):((n=At(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function It(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),zt(this,jt(n="string"==typeof n?+n:n,s),e),this}}function zt(t,n,s,i){var r=n._milliseconds,a=Dt(n._days),o=Dt(n._months);t.isValid()&&(i=null==i||i,r&&t._d.setTime(t._d.valueOf()+r*s),a&&A(t,"Date",N(t,"Date")+a*s),o&&le(t,N(t,"Month")+o*s),i&&e.updateOffset(t,a||o))}function Zt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function $t(t,n){var s=t||pt(),i=xt(s,this).startOf("day"),r=e.calendarFormat(this,i)||"sameElse",a=n&&(Y(n[r])?n[r].call(this,s):n[r]);return this.format(a||this.localeData().calendar(r,this,pt(s)))}function qt(){return new g(this)}function Bt(e,t){var n=p(e)?e:pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(_(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Jt(e,t){var n=p(e)?e:pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(_(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Qt(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))}function Xt(e,t){var n,s=p(e)?e:pt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=H(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Kt(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function en(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function tn(e,t,n){var s,i,r,a;return this.isValid()&&(s=xt(e,this)).isValid()?(i=6e4*(s.utcOffset()-this.utcOffset()),"year"===(t=H(t))||"month"===t||"quarter"===t?(a=nn(this,s),"quarter"===t?a/=3:"year"===t&&(a/=12)):(r=this-s,a="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-i)/864e5:"week"===t?(r-i)/6048e5:r),n?a:w(a)):NaN}function nn(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function sn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function rn(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?Y(Date.prototype.toISOString)?this.toDate().toISOString():B(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):B(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}
138function an(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",r=t+'[")]';return this.format(n+s+i+r)}function on(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=B(this,t);return this.localeData().postformat(n)}function un(e,t){return this.isValid()&&(p(e)&&e.isValid()||pt(e).isValid())?jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ln(e){return this.from(pt(),e)}function dn(e,t){return this.isValid()&&(p(e)&&e.isValid()||pt(e).isValid())?jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function hn(e){return this.to(pt(),e)}function cn(e){var t;return e===undefined?this._locale._abbr:(null!=(t=tt(e))&&(this._locale=t),this)}function fn(){return this._locale}function mn(e){switch(e=H(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function _n(e){return(e=H(e))===undefined||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function yn(){return this._d.valueOf()-6e4*(this._offset||0)}function gn(){return Math.floor(this.valueOf()/1e3)}function pn(){return new Date(this.valueOf())}function wn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function vn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Sn(){return this.isValid()?this.toISOString():null}function Mn(){return f(this)}function kn(){return l({},c(this))}function Dn(){return c(this).overflow}function Yn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function On(e,t){Z(0,[e,e.length],0,t)}function xn(e){return Wn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Tn(e){return Wn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function bn(){return ke(this.year(),1,4)}function Pn(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function Wn(e,t,n,s,i){var r;return null==e?Me(this,s,i).year:(t>(r=ke(e,s,i))&&(t=r),Rn.call(this,e,t,n,s,i))}function Rn(e,t,n,s,i){var r=Se(e,t,n,s,i),a=we(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Un(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Cn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Fn(e,t){t[ii]=v(1e3*("0."+e))}function Hn(){return this._isUTC?"UTC":""}function Ln(){return this._isUTC?"Coordinated Universal Time":""}function Gn(e){return pt(1e3*e)}function Vn(){return pt.apply(null,arguments).parseZone()}function jn(e){return e}function Nn(e,t,n,s){var i=tt(),r=d().set(s,t);return i[n](r,e)}function An(e,t,n){if(r(e)&&(t=e,e=undefined),e=e||"",null!=t)return Nn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=Nn(e,s,n,"month");return i}function En(e,t,n,s){"boolean"==typeof e?(r(t)&&(n=t,t=undefined),t=t||""):(n=t=e,e=!1,r(t)&&(n=t,t=undefined),t=t||"");var i,a=tt(),o=e?a._week.dow:0;if(null!=n)return Nn(t,(n+o)%7,s,"day");var u=[];for(i=0;i<7;i++)u[i]=Nn(t,(i+o)%7,s,"day");return u}function In(e,t){return An(e,t,"months")}function zn(e,t){return An(e,t,"monthsShort")}function Zn(e,t,n){return En(e,t,n,"weekdays")}function $n(e,t,n){return En(e,t,n,"weekdaysShort")}function qn(e,t,n){return En(e,t,n,"weekdaysMin")}function Bn(){var e=this._data;return this._milliseconds=Bi(this._milliseconds),this._days=Bi(this._days),this._months=Bi(this._months),e.milliseconds=Bi(e.milliseconds),e.seconds=Bi(e.seconds),e.minutes=Bi(e.minutes),e.hours=Bi(e.hours),e.months=Bi(e.months),e.years=Bi(e.years),this}function Jn(e,t,n,s){var i=jt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()} 139function Qn(e,t){return Jn(this,e,t,1)}function Xn(e,t){return Jn(this,e,t,-1)}function Kn(e){return e<0?Math.floor(e):Math.ceil(e)}function es(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*Kn(ns(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=w(r/1e3),u.seconds=e%60,t=w(e/60),u.minutes=t%60,n=w(t/60),u.hours=n%24,o+=i=w(ts(a+=w(n/24))),a-=Kn(ns(i)),s=w(o/12),o%=12,u.days=a,u.months=o,u.years=s,this}function ts(e){return 4800*e/146097}function ns(e){return 146097*e/4800}function ss(e){var t,n,s=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+s/864e5,n=this._months+ts(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ns(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function is(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function rs(e){return function(){return this.as(e)}}function as(e){return this[(e=H(e))+"s"]()}function os(e){return function(){return this._data[e]}}function us(){return w(this.days()/7)}function ls(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}function ds(e,t,n){var s=jt(e).abs(),i=hr(s.as("s")),r=hr(s.as("m")),a=hr(s.as("h")),o=hr(s.as("d")),u=hr(s.as("M")),l=hr(s.as("y")),d=i<cr.s&&["s",i]||r<=1&&["m"]||r<cr.m&&["mm",r]||a<=1&&["h"]||a<cr.h&&["hh",a]||o<=1&&["d"]||o<cr.d&&["dd",o]||u<=1&&["M"]||u<cr.M&&["MM",u]||l<=1&&["y"]||["yy",l];return d[2]=t,d[3]=+e>0,d[4]=n,ls.apply(null,d)}function hs(e){return e===undefined?hr:"function"==typeof e&&(hr=e,!0)}function cs(e,t){return cr[e]!==undefined&&(t===undefined?cr[e]:(cr[e]=t,!0))}function fs(e){var t=this.localeData(),n=ds(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function ms(){var e,t,n=fr(this._milliseconds)/1e3,s=fr(this._days),i=fr(this._months);t=w((e=w(n/60))/60),n%=60,e%=60;var r=w(i/12),a=i%=12,o=s,u=t,l=e,d=n,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(o?o+"D":"")+(u||l||d?"T":"")+(u?u+"H":"")+(l?l+"M":"")+(d?d+"S":""):"P0D"}var _s,ys=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},gs=e.momentProperties=[],ps=!1,ws={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var vs=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n},Ss={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ms={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},ks="Invalid date",Ds="%d",Ys=/\d{1,2}/,Os={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},xs={},Ts={},bs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 8,048 bytes, line 139
139|x|X|zz?|ZZ?|.)/g,Ps=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ws={},Rs={},Us=/\d/,Cs=/\d\d/,Fs=/\d{3}/,Hs=/\d{4}/,Ls=/[+-]?\d{6}/,Gs=/\d\d?/,Vs=/\d\d\d\d?/,js=/\d\d\d\d\d\d?/,Ns=/\d{1,3}/,As=/\d{1,4}/,Es=/[+-]?\d{1,6}/,Is=/\d+/,zs=/[+-]?\d+/,Zs=/Z|[+-]\d\d:?\d\d/gi,$s=/Z|[+-]\d\d(?::?\d\d)?/gi,qs=/[+-]?\d+(\.\d{1,3})?/,Bs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Js={},Qs={},Xs=0,Ks=1,ei=2,ti=3,ni=4,si=5,ii=6,ri=7,ai=8,oi=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),F("month","M"),G("month",8),Q("M",Gs),Q("MM",Gs,Cs),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),te(["M","MM"],function(e,t){t[Ks]=v(e)-1}),te(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[Ks]=i:c(n).invalidMonth=e});var ui=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,li="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),di="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),hi=Bs,ci=Bs;Z("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),F("year","y"),G("year",1),Q("Y",zs),Q("YY",Gs,Cs),Q("YYYY",As,Hs),Q("YYYYY",Es,Ls),Q("YYYYYY",Es,Ls),te(["YYYYY","YYYYYY"],Xs),te("YYYY",function(t,n){n[Xs]=2===t.length?e.parseTwoDigitYear(t):v(t)}),te("YY",function(t,n){n[Xs]=e.parseTwoDigitYear(t)}),te("Y",function(e,t){t[Xs]=parseInt(e,10)}),e.parseTwoDigitYear=function(e){return v(e)+(v(e)>68?1900:2e3)};var fi=j("FullYear",!0);Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),G("week",5),G("isoWeek",5),Q("w",Gs),Q("ww",Gs,Cs),Q("W",Gs),Q("WW",Gs,Cs),ne(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=v(e)});var mi={dow:0,doy:6};Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),G("day",11),G("weekday",11),G("isoWeekday",11),Q("d",Gs),Q("e",Gs),Q("E",Gs),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:c(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,s){t[s]=v(e)});var _i="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),yi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),gi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pi=Bs,wi=Bs,vi=Bs;Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Ee),Z("k",["kk",2],0,Ie),Z("hmm",0,0,function(){return""+Ee.apply(this)+z(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Ee.apply(this)+z(this.minutes(),2)+z(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+z(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+z(this.minutes(),2)+z(this.seconds(),2)}),ze("a",!0),ze("A",!1),F("hour","h"),G("hour",13),Q("a",Ze),Q("A",Ze),Q("H",Gs),Q("h",Gs),Q("HH",Gs,Cs),Q("hh",Gs,Cs),Q("hmm",Vs),Q("hmmss",js),Q("Hmm",Vs),Q("Hmmss",js),te(["H","HH"],ti),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[ti]=v(e),c(n).bigHour=!0}),te("hmm",function(e,t,n){var s=e.length-2;t[ti]=v(e.substr(0,s)),t[ni]=v(e.substr(s)),c(n).bigHour=!0}),te("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ti]=v(e.substr(0,s)),t[ni]=v(e.substr(s,2)),t[si]=v(e.substr(i)),c(n).bigHour=!0}),te("Hmm",function(e,t){var n=e.length-2;t[ti]=v(e.substr(0,n)),t[ni]=v(e.substr(n))}),te("Hmmss",function(e,t){var n=e.length-4,s=e.length-2;t[ti]=v(e.substr(0,n)),t[ni]=v(e.substr(n,2)),t[si]=v(e.substr(s))});var Si,Mi=/[ap]\.?m?\.?/i,ki=j("Hours",!0),Di={calendar:Ss,longDateFormat:Ms,invalidDate:ks,ordinal:Ds,ordinalParse:Ys,relativeTime:Os,months:li,monthsShort:di,week:mi,weekdays:_i,weekdaysMin:gi,weekdaysShort:yi,meridiemParse:Mi},Yi={},Oi={},xi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ti=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bi=/Z|[+-]\d\d(?::?\d\d)?/,Pi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Wi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ri=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=k("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){};var Ui=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=pt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()}),Ci=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=pt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}),Fi=function(){return Date.now?Date.now():+new Date};Yt("Z",":"),Yt("ZZ",""),Q("Z",$s),Q("ZZ",$s),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ot($s,e)});var Hi=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Li=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;jt.fn=Mt.prototype;var Vi=It(1,"add"),ji=It(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ni=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===undefined?this.localeData():this.locale(e)});Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),On("gggg","weekYear"),On("ggggg","weekYear"),On("GGGG","isoWeekYear"),On("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),G("weekYear",1),G("isoWeekYear",1),Q("G",zs),Q("g",zs),Q("GG",Gs,Cs),Q("gg",Gs,Cs),Q("GGGG",As,Hs),Q("gggg",As,Hs),Q("GGGGG",Es,Ls),Q("ggggg",Es,Ls),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=v(e)}),ne(["gg","GG"],function(t,n,s,i){n[i]=e.parseTwoDigitYear(t)}),Z("Q",0,"Qo","quarter"),F("quarter","Q"),G("quarter",7),Q("Q",Us),te("Q",function(e,t){t[Ks]=3*(v(e)-1)}),Z("D",["DD",2],"Do","date"),F("date","D"),G("date",9),Q("D",Gs),Q("DD",Gs,Cs),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],ei),te("Do",function(e,t){t[ei]=v(e.match(Gs)[0],10)});var Ai=j("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),G("dayOfYear",4),Q("DDD",Ns),Q("DDDD",Fs),te(["DD
139D","DDDD"],function(e,t,n){n._dayOfYear=v(e)}),Z("m",["mm",2],0,"minute"),F("minute","m"),G("minute",14),Q("m",Gs),Q("mm",Gs,Cs),te(["m","mm"],ni);var Ei=j("Minutes",!1);Z("s",["ss",2],0,"second"),F("second","s"),G("second",15),Q("s",Gs),Q("ss",Gs,Cs),te(["s","ss"],si);var Ii,zi=j("Seconds",!1);for(Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),G("millisecond",16),Q("S",Ns,Us),Q("SS",Ns,Cs),Q("SSS",Ns,Fs),Ii="SSSS";Ii.length<=9;Ii+="S")Q(Ii,Is);for(Ii="S";Ii.length<=9;Ii+="S")te(Ii,Fn);var Zi=j("Milliseconds",!1);Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");var $i=g.prototype;$i.add=Vi,$i.calendar=$t,$i.clone=qt,$i.diff=tn,$i.endOf=_n,$i.format=on,$i.from=un,$i.fromNow=ln,$i.to=dn,$i.toNow=hn,$i.get=E,$i.invalidAt=Dn,$i.isAfter=Bt,$i.isBefore=Jt,$i.isBetween=Qt,$i.isSame=Xt,$i.isSameOrAfter=Kt,$i.isSameOrBefore=en,$i.isValid=Mn,$i.lang=Ni,$i.locale=cn,$i.localeData=fn,$i.max=Ci,$i.min=Ui,$i.parsingFlags=kn,$i.set=I,$i.startOf=mn,$i.subtract=ji,$i.toArray=wn,$i.toObject=vn,$i.toDate=pn,$i.toISOString=rn,$i.inspect=an,$i.toJSON=Sn,$i.toString=sn,$i.unix=gn,$i.valueOf=yn,$i.creationData=Yn,$i.year=fi,$i.isLeapYear=ge,$i.weekYear=xn,$i.isoWeekYear=Tn,$i.quarter=$i.quarters=Un,$i.month=de,$i.daysInMonth=he,$i.week=$i.weeks=xe,$i.isoWeek=$i.isoWeeks=Te,$i.weeksInYear=Pn,$i.isoWeeksInYear=bn,$i.date=Ai,$i.day=$i.days=He,$i.weekday=Le,$i.isoWeekday=Ge,$i.dayOfYear=Cn,$i.hour=$i.hours=ki,$i.minute=$i.minutes=Ei,$i.second=$i.seconds=zi,$i.millisecond=$i.milliseconds=Zi,$i.utcOffset=bt,$i.utc=Wt,$i.local=Rt,$i.parseZone=Ut,$i.hasAlignedHourOffset=Ct,$i.isDST=Ft,$i.isLocal=Lt,$i.isUtcOffset=Gt,$i.isUtc=Vt,$i.isUTC=Vt,$i.zoneAbbr=Hn,$i.zoneName=Ln,$i.dates=k("dates accessor is deprecated. Use date instead.",Ai),$i.months=k("months accessor is deprecated. Use month instead",de),$i.years=k("years accessor is deprecated. Use year instead",fi),$i.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Pt),$i.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ht);var qi=T.prototype;qi.calendar=b,qi.longDateFormat=P,qi.invalidDate=W,qi.ordinal=R,qi.preparse=jn,qi.postformat=jn,qi.relativeTime=U,qi.pastFuture=C,qi.set=O,qi.months=re,qi.monthsShort=ae,qi.monthsParse=ue,qi.monthsRegex=fe,qi.monthsShortRegex=ce,qi.week=De,qi.firstDayOfYear=Oe,qi.firstDayOfWeek=Ye,qi.weekdays=We,qi.weekdaysMin=Ue,qi.weekdaysShort=Re,qi.weekdaysParse=Fe,qi.weekdaysRegex=Ve,qi.weekdaysShortRegex=je,qi.weekdaysMinRegex=Ne,qi.isPM=$e,qi.meridiem=qe,Xe("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===v(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Xe),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",tt);var Bi=Math.abs,Ji=rs("ms"),Qi=rs("s"),Xi=rs("m"),Ki=rs("h"),er=rs("d"),tr=rs("w"),nr=rs("M"),sr=rs("y"),ir=os("milliseconds"),rr=os("seconds"),ar=os("minutes"),or=os("hours"),ur=os("days"),lr=os("months"),dr=os("years"),hr=Math.round,cr={s:45,m:45,h:22,d:26,M:11},fr=Math.abs,mr=Mt.prototype;return mr.abs=Bn,mr.add=Qn,mr.subtract=Xn,mr.as=ss,mr.asMilliseconds=Ji,mr.asSeconds=Qi,mr.asMinutes=Xi,mr.asHours=Ki,mr.asDays=er,mr.asWeeks=tr,mr.asMonths=nr,mr.asYears=sr,mr.valueOf=is,mr._bubble=es,mr.get=as,mr.milliseconds=ir,mr.seconds=rr,mr.minutes=ar,mr.hours=or,mr.days=ur,mr.weeks=us,mr.months=lr,mr.years=dr,mr.humanize=fs,mr.toISOString=ms,mr.toString=ms,mr.toJSON=ms,mr.locale=cn,mr.localeData=fn,mr.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ms),mr.lang=Ni,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),Q("x",zs),Q("X",qs),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(v(e))}),e.version="2.17.1",t(pt),e.fn=$i,e.min=vt,e.max=St,e.now=Fi,e.utc=d,e.unix=Gn,e.months=In,e.isDate=a,e.locale=Xe,e.invali
139d=m,e.duration=jt,e.isMoment=p,e.weekdays=Zn,e.parseZone=Vn,e.localeData=tt,e.isDuration=kt,e.monthsShort=zn,e.weekdaysMin=qn,e.defineLocale=Ke,e.updateLocale=et,e.locales=nt,e.weekdaysShort=$n,e.normalizeUnits=H,e.relativeTimeRounding=hs,e.relativeTimeThreshold=cs,e.calendarFormat=Zt,e.prototype=$i,e}); 140!function(t){"function"==typeof define&&define.amd?define(["jquery","moment"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment")):t(jQuery,moment)}(function(t,e){function n(t){return q(t,Vt)}function i(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function r(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function s(){t("body").addClass("fc-not-allowed")}function o(){t("body").removeClass("fc-not-allowed")}function l(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],l=[],u=[],c=0;a(e),e.each(function(n,i){var a=n===e.length-1?s:r,d=t(i).outerHeight(!0);d<a?(o.push(i),l.push(d),u.push(t(i).height())):c+=d}),i&&(n-=c,r=Math.floor(n/o.length),s=Math.floor(n-r*(o.length-1))),t(o).each(function(e,n){var i=e===o.length-1?s:r,a=l[e],c=i-(a-u[e]);a<i&&t(n).height(c)})}function a(t){t.height("")}function u(e){var n=0;return e.find("> *").each(function(e,i){var r=t(i).outerWidth();r>n&&(n=r)}),n++,e.width(n),n}function c(t,e){var n,i=t.add(e);return i.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),i.css({position:"",left:""}),n}function d(e){var n=e.css("position"),i=e.parents().filter(function(){var e=t(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:t(e[0].ownerDocument||document)}function h(t,e){var n=t.offset(),i=n.left-(e?e.left:0),r=n.top-(e?e.top:0);return{left:i,right:i+t.outerWidth(),top:r,bottom:r+t.outerHeight()}}function f(t,e){var n=t.offset(),i=p(t),r=n.left+S(t,"border-left-width")+i.left-(e?e.left:0),s=n.top+S(t,"border-top-width")+i.top-(e?e.top:0);return{left:r,right:r+t[0].clientWidth,top:s,bottom:s+t[0].clientHeight}}function g(t,e){var n=t.offset(),i=n.left+S(t,"border-left-width")+S(t,"padding-left")-(e?e.left:0),r=n.top+S(t,"border-top-width")+S(t,"padding-top")-(e?e.top:0);return{left:i,right:i+t.width(),top:r,bottom:r+t.height()}}function p(t){var e,n=t.innerWidth()-t[0].clientWidth,i=t.innerHeight()-t[0].clientHeight;return n=v(n),e={left:0,right:0,top:0,bottom:i=v(i)},m()&&"rtl"==t.css("direction")?e.left=n:e.right=n,e}function v(t){return t=Math.max(0,t),t=Math.round(t)}function m(){return null===Pt&&(Pt=y()),Pt}function y(){var e=t("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=e.children().offset().left>e.offset().left;return e.remove(),n}function S(t,e){return parseFloat(t.css(e))||0}function w(t){return 1==t.which&&!t.ctrlKey}function E(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageX:t.pageX}function b(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageY:t.pageY}function D(t){return/^touch/.test(t.type)}function T(t){t.addClass("fc-unselectable").on("selectstart",H)}function C(t){t.removeClass("fc-unselectable").off("selectstart",H)}function H(t){t.preventDefault()}function x(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function R(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function I(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function k(t,e){return{left:t.left-e.left,top:t.top-e.top}}function L(e){var n,i,r=[],s=[];for("string"==typeof e?s=e.split(/\s*,\s*/):"function"==typeof e?s=[e]:t.isArray(e)&&(s=e),n=0;n<s.length;n++)"string"==typeof(i=s[n])?r.push("-"==i.charAt(0)?{field:i.substring(1),order:-1}:{field:i,order:1}):"function"==typeof i&&r.push({func:i});return r}function M(t,e,n){var i,r;for(i=0;i<n.length;i++)if(r=B(t,e,n[i]))return r;return 0}function B(t,e,n){return n.func?n.func(t,e):N(t[n.field],e[n.field])*(n.order||1)}function N(e,n){return e||n?null==n?-1:null==e?1:"string"===t.type(e)||"string"===t.type(n)?String(e).localeCompare(String(n)):e-n:0}function F(t,e){var n,i,r,s,o=t.start,l=t.end,a=e.start,u=e.end;if(l>a&&o<u)return o>=a?(n=o.clone(),r=!0):(n=a.clone(),r=!1),l<=u?(i=l.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}}function z(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function G(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days")})}function O(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function A(t,e){var n,i,r;for(n=0;n<Yt.length&&!((r=V(i=Yt[n],t,e))>=1&&ot(r));n++);return i}function V(t,n,i){return null!=i?i.diff(n,t,!0):e.isDuration(n)?n.as(t):n.end.diff(n.start,t,!0)}function P(t,e,n){var i;return W(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&ot(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function _(t,e){var n,i;return W(t)||W(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&ot(n)&&Math.abs(i)>=1&&ot(i)?n/i:t.asDays()/e.asDays())}function Y(t,n){var i;return W(t)?e.duration(t*n):(i=t.asMonths(),Math.abs(i)>=1&&ot(i)?e.duration({months:i*n}):e.duration({days:t.asDays()*n}))}function W(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function U(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function j(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function q(t,e){var n,i,r,s,o,l,a={};if(e)for(n=0;n<e.length;n++){for(i=e[n],r=[],s=t.length-1;s>=0;s--)if("object"==typeof(o=t[s][i]))r.unshift(o);else if(o!==undefined){a[i]=o;break}r.length&&(a[i]=q(r))}for(n=t.length-1;n>=0;n--)for(i in l=t[n])i in a||(a[i]=l[i]);return a}function Z(t){var e=function(){};return e.prototype=t,new e}
140function $(t,e){for(var n in t)Q(t,n)&&(e[n]=t[n])}function Q(t,e){return Wt.call(t,e)}function X(e){return/undefined|null|boolean|number|string/.test(t.type(e))}function K(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;r<e.length;r++)s=e[r].apply(n,i)||s;return s}}function J(){for(var t=0;t<arguments.length;t++)if(arguments[t]!==undefined)return arguments[t]}function tt(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")}function et(t){return t.replace(/&.*?;/g,"")}function nt(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function it(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+'="'+tt(e)+'"')}),n.join(" ")}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function st(t,e){return t-e}function ot(t){return t%1==0}function lt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function at(t,e,n){var i,r,s,o,l,a=function(){var u=+new Date-o;u<e?i=setTimeout(a,e-u):(i=null,n||(l=t.apply(s,r),s=r=null))};return function(){s=this,r=arguments,o=+new Date;var u=n&&!i;return i||(i=setTimeout(a,e)),u&&(l=t.apply(s,r),s=r=null),l}}function ut(n,i,r){var s,o,l,a,u=n[0],c=1==n.length&&"string"==typeof u;return e.isMoment(u)||U(u)||u===undefined?a=e.apply(null,n):(s=!1,o=!1,c?Ut.test(u)?(n=[u+="-01"],s=!0,o=!0):(l=jt.exec(u))&&(s=!l[5],o=!0):t.isArray(u)&&(o=!0),a=i||s?e.utc.apply(e,n):e.apply(null,n),s?(a._ambigTime=!0,a._ambigZone=!0):r&&(o?a._ambigZone=!0:c&&a.utcOffset(u))),a._fullCalendar=!0,a}function ct(){}function dt(t,e){var n;return Q(e,"constructor")&&(n=e.constructor),"function"!=typeof n&&(n=e.constructor=function(){t.apply(this,arguments)}),n.prototype=Z(t.prototype),$(e,n.prototype),$(t,n),n}function ht(t,e){$(e,t.prototype)}function ft(e){var n=t.Deferred(),i=n.promise();if("function"==typeof e&&e(function(t){ft.immediate&&(i._value=t),n.resolve(t)},function(){n.reject()}),ft.immediate){var r=i.then;i.then=function(t,e){var n=i.state();if("resolved"===n){if("function"==typeof t)return ft.resolve(t(i._value))}else if("rejected"===n&&"function"==typeof e)return e(),i;return r.call(i,t,e)}}return i}function gt(t){function e(t){return new ft(function(e){var i=function(){ft.resolve(t()).then(e).then(function(){n.shift(),n.length&&n[0]()})};n.push(i),1===n.length&&i()})}var n=[];this.add="number"==typeof t?at(e,t):e,this.addQuickly=e}function pt(t,e){return!t&&!e||!(!t||!e)&&(t.component===e.component&&vt(t,e)&&vt(e,t))}function vt(t,e){for(var n in t)if(!/^(component|left|right|top|bottom)$/.test(n)&&t[n]!==e[n])return!1;return!0}function mt(t){return{start:t.start.clone(),end:t.end?t.end.clone():null,allDay:t.allDay}}function yt(t){var e=wt(t);return"background"===e||"inverse-background"===e}function St(t){return"inverse-background"===wt(t)}function wt(t){return J((t.source||{}).rendering,t.rendering)}function Et(t){var e,n,i={};for(e=0;e<t.length;e++)(i[(n=t[e])._id]||(i[n._id]=[])).push(n);return i}function bt(t,e){return t.start-e.start}function Dt(n){var i,r,s,o,l=Ot.dataAttrPrefix;return l&&(l+="-"),(i=n.data(l+"event")||null)&&(null==(r=(i="object"==typeof i?t.extend({},i):{}).start)&&(r=i.time),s=i.duration,o=i.stick,delete i.start,delete i.time,delete i.duration,delete i.stick),null==r&&(r=n.data(l+"start")),null==r&&(r=n.data(l+"time")),null==s&&(s=n.data(l+"duration")),null==o&&(o=n.data(l+"stick")),{eventProps:i,startTime:r=null!=r?e.duration(r):null,duration:s=null!=s?e.duration(s):null,stick:o=Boolean(o)}}function Tt(t,e){var n,i;for(n=0;n<e.length;n++)if((i=e[n]).leftCol<=t.rightCol&&i.rightCol>=t.leftCol)return!0;return!1}function Ct(t,e){return t.leftCol-e.leftCol}function Ht(t){var e,n,i,r=[];for(e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&It(n,r[i]).length;i++);n.level=i,(r[i]||(r[i]=[])).push(n)}return r}function xt(t){var e,n,i,r,s;for(e=0;e<t.length;e++)for(n=t[e],i=0;i<n.length;i++)for((r=n[i]).forwardSegs=[],s=e+1;s<t.length;s++)It(r,t[s],r.forwardSegs)}function Rt(t){var e,n,i=t.forwardSegs,r=0;if(t.forwardPressure===undefined){for(e=0;e<i.length;e++)Rt(n=i[e]),r=Math.max(r,1+n.forwardPressure);t.forwardPressure=r}}function It(t,e,n){n=n||[];for(var i=0;i<e.length;i++)kt(t,e[i])&&n.push(e[i]);return n}function kt(t,e){return t.bottom>e.top&&t.top<e.bottom}function Lt(t){this.items=t||[]}function Mt(e,n){function i(t){n=t}function r(){var i=n.layout;p=e.options.theme?"ui":"fc",i?(f?f.empty():f=this.el=t("<div class='fc-toolbar "+n.extraClasse
140s+"'/>"),f.append(o("left")).append(o("right")).append(o("center")).append('<div class="fc-clear"/>')):s()}function s(){f&&(f.remove(),f=g.el=null)}function o(i){var r=t('<div class="fc-'+i+'"/>'),s=n.layout[i];return s&&t.each(s.split(" "),function(){var n,i=t(),s=!0;t.each(this.split(","),function(n,r){var o,l,a,u,c,d,h,f,g;"title"==r?(i=i.add(t("<h2> </h2>")),s=!1):((o=(e.options.customButtons||{})[r])?(a=function(t){o.click&&o.click.call(g[0],t)},u="",c=o.text):(l=e.getViewSpec(r))?(a=function(){e.changeView(r)},v.push(r),u=l.buttonTextOverride,c=l.buttonTextDefault):e[r]&&(a=function(){e[r]()},u=(e.overrides.buttonText||{})[r],c=e.options.buttonText[r]),a&&(d=o?o.themeIcon:e.options.themeButtonIcons[r],h=o?o.icon:e.options.buttonIcons[r],f=u?tt(u):d&&e.options.theme?"<span class='ui-icon ui-icon-"+d+"'></span>":h&&!e.options.theme?"<span class='fc-icon fc-icon-"+h+"'></span>":tt(c),g=t('<button type="button" class="'+["fc-"+r+"-button",p+"-button",p+"-state-default"].join(" ")+'">'+f+"</button>").click(function(t){g.hasClass(p+"-state-disabled")||(a(t),(g.hasClass(p+"-state-active")||g.hasClass(p+"-state-disabled"))&&g.removeClass(p+"-state-hover"))}).mousedown(function(){g.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-down")}).mouseup(function(){g.removeClass(p+"-state-down")}).hover(function(){g.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-hover")},function(){g.removeClass(p+"-state-hover").removeClass(p+"-state-down")}),i=i.add(g)))}),s&&i.first().addClass(p+"-corner-left").end().last().addClass(p+"-corner-right").end(),i.length>1?(n=t("<div/>"),s&&n.addClass("fc-button-group"),n.append(i),r.append(n)):r.append(i)}),r}function l(t){f&&f.find("h2").text(t)}function a(t){f&&f.find(".fc-"+t+"-button").addClass(p+"-state-active")}function u(t){f&&f.find(".fc-"+t+"-button").removeClass(p+"-state-active")}function c(t){f&&f.find(".fc-"+t+"-button").prop("disabled",!0).addClass(p+"-state-disabled")}function d(t){f&&f.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(p+"-state-disabled")}function h(){return v}var f,g=this;g.setToolbarOptions=i,g.render=r,g.removeElement=s,g.updateTitle=l,g.activateButton=a,g.deactivateButton=u,g.disableButton=c,g.enableButton=d,g.getViewsWithButtons=h,g.el=null;var p,v=[]}function Bt(n,i){function r(t){t._locale=_}function s(){q?a()&&(f(),u()):o()}function o(){n.addClass("fc"),n.on("click.fc","a[data-goto]",function(e){var n=t(this).data("goto"),i=Y.moment(n.date),r=n.type,s=$.opt("navLink"+rt(r)+"Click");"function"==typeof s?s(i,e):("string"==typeof s&&(r=s),B(i,r))}),Y.bindOption("theme",function(t){t?"ui":"fc",n.toggleClass("ui-widget",t),n.toggleClass("fc-unthemed",!t)}),Y.bindOptions(["isRTL","locale"],function(t){n.toggleClass("fc-ltr",!t),n.toggleClass("fc-rtl",t)}),q=t("<div class='fc-view-container'/>").prependTo(n);var e=y();W=new Lt(e),U=Y.header=e[0],j=Y.footer=e[1],E(),b(),u(Y.options.defaultView),Y.options.handleWindowResize&&(X=at(v,Y.options.windowResizeDelay),t(window).resize(X))}function l(){$&&$.removeElement(),W.proxyCall("removeElement"),q.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),n.off(".fc"),X&&t(window).unbind("resize",X),ae.unneeded()}function a(){return n.is(":visible")}function u(e,n){et++;var i=$&&e&&$.type!==e;i&&(F(),c()),!$&&e&&(($=Y.view=tt[e]||(tt[e]=Y.instantiateView(e))).setElement(t("<div class='fc-view fc-"+e+"-view' />").appendTo(q)),W.proxyCall("activateButton",e)),$&&(K=$.massageCurrentDate(K),$.isDateSet&&K>=$.intervalStart&&K<$.intervalEnd||a()&&(n&&$.captureInitialScroll(n),$.setDate(K,n),n&&$.releaseScroll(),D())),i&&z(),et--}function c(){W.proxyCall("deactivateButton",$.type),$.removeElement(),$=Y.view=null}function d(){et++,F();var t=$.type,e=$.queryScroll();c(),f(),u(t,e),z(),et--}function h(t){if(a())return t&&g(),et++,$.updateSize(!0),et--,!0}function f(){a()&&g()}function g(){var t=Y.options.contentHeight,e=Y.options.height;Q="number"==typeof t?t:"function"==typeof t?t():"number"==typeof e?e-p():"function"==typeof e?e()-p():"parent"===e?n.parent().height()-p():Math.round(q.width()/Math.max(Y.options.aspectRatio,.5))}function p(){return W.items.reduce(function(t,e){return t+(e.el?e.el.outerHeight(!0):0)},0)}function v(t){!et&&t.target===window&&$.start&&h(!0)&&$.publiclyTrigger("windowResize",J)}function m(){a()&&Y.reportEventChange()}function y(){return[new Mt(Y,S()),new Mt(Y,w())]}
140function S(){return{extraClasses:"fc-header-toolbar",layout:Y.options.header}}function w(){return{extraClasses:"fc-footer-toolbar",layout:Y.options.footer}}function E(){U.setToolbarOptions(S()),U.render(),U.el&&n.prepend(U.el)}function b(){j.setToolbarOptions(w()),j.render(),j.el&&n.append(j.el)}function D(){var t=Y.getNow();t>=$.intervalStart&&t<$.intervalEnd?W.proxyCall("disableButton","today"):W.proxyCall("enableButton","today")}function T(){$.select(Y.buildSelectSpan.apply(Y,arguments))}function C(){$&&$.unselect()}function H(){K=$.computePrevDate(K),u()}function x(){K=$.computeNextDate(K),u()}function R(){K.add(-1,"years"),u()}function I(){K.add(1,"years"),u()}function k(){K=Y.getNow(),u()}function L(t){K=Y.moment(t).stripZone(),u()}function M(t){K.add(e.duration(t)),u()}function B(t,e){var n;e=e||"day",n=Y.getViewSpec(e)||Y.getUnitViewSpec(e),K=t.clone(),u(n?n.type:null)}function N(){return Y.applyTimezone(K)}function F(){nt++||q.css({width:"100%",height:q.height(),overflow:"hidden"})}function z(){--nt||q.css({width:"",height:"",overflow:""})}function G(){return Y}function O(){return $}function A(t,e){var n;if("string"==typeof t){if(e===undefined)return Y.options[t];(n={})[t]=e,V(n)}else"object"==typeof t&&V(t)}function V(t){var e,n=0;for(e in t)Y.dynamicOverrides[e]=t[e];for(e in Y.viewSpecCache={},Y.populateOptionsHash(),t)Y.triggerOptionHandlers(e),n++;if(1===n){if("height"===e||"contentHeight"===e||"aspectRatio"===e)return void h(!0);if("defaultDate"===e)return;if("businessHours"===e)return void($&&($.unrenderBusinessHours(),$.renderBusinessHours()));if("timezone"===e)return Y.rezoneArrayEventSources(),void Y.refetchEvents()}E(),b(),tt={},d()}function P(t,e){var n=Array.prototype.slice.call(arguments,2);if(e=e||J,this.triggerWith(t,e,n),Y.options[t])return Y.options[t].apply(e,n)}var _,Y=this;ae.needed(),Y.render=s,Y.destroy=l,Y.rerenderEvents=m,Y.changeView=u,Y.select=T,Y.unselect=C,Y.prev=H,Y.next=x,Y.prevYear=R,Y.nextYear=I,Y.today=k,Y.gotoDate=L,Y.incrementDate=M,Y.zoomTo=B,Y.getDate=N,Y.getCalendar=G,Y.getView=O,Y.option=A,Y.publiclyTrigger=P,Y.dynamicOverrides={},Y.viewSpecCache={},Y.optionHandlers={},Y.overrides=t.extend({},i),Y.populateOptionsHash(),Y.bindOptions(["locale","monthNames","monthNamesShort","dayNames","dayNamesShort","firstDay","weekNumberCalculation"],function(t,e,n,i,s,o,l){if("iso"===l&&(l="ISO"),_=Z(Ft(t)),e&&(_._months=e),n&&(_._monthsShort=n),i&&(_._weekdays=i),s&&(_._weekdaysShort=s),null==o&&"ISO"===l&&(o=1),null!=o){var a=Z(_._week);a.dow=o,_._week=a}"ISO"!==l&&"local"!==l&&"function"!=typeof l||(_._fullCalendar_weekCalc=l),K&&r(K)}),Y.defaultAllDayEventDuration=e.duration(Y.options.defaultAllDayEventDuration),Y.defaultTimedEventDuration=e.duration(Y.options.defaultTimedEventDuration),Y.moment=function(){var t;return"local"===Y.options.timezone?(t=Ot.moment.apply(null,arguments)).hasTime()&&t.local():t="UTC"===Y.options.timezone?Ot.moment.utc.apply(null,arguments):Ot.moment.parseZone.apply(null,arguments),r(t),t},Y.localizeMoment=r,Y.getIsAmbigTimezone=function(){return"local"!==Y.options.timezone&&"UTC"!==Y.options.timezone},Y.applyTimezone=function(t){if(!t.hasTime())return t.clone();var e,n=Y.moment(t.toArray()),i=t.time()-n.time();return i&&(e=n.clone().add(i),t.time()-e.time()==0&&(n=e)),n},Y.getNow=function(){var t=Y.options.now;return"function"==typeof t&&(t=t()),Y.moment(t).stripZone()},Y.getEventEnd=function(t){return t.end?t.end.clone():Y.getDefaultEventEnd(t.allDay,t.start)},Y.getDefaultEventEnd=function(t,e){var n=e.clone();return t?n.stripTime().add(Y.defaultAllDayEventDuration):n.add(Y.defaultTimedEventDuration),Y.getIsAmbigTimezone()&&n.stripZone(),n},Y.humanizeDuration=function(t){return t.locale(Y.options.locale).humanize()},zt.call(Y);var W,U,j,q,$,Q,X,K,J=n[0],tt={},et=0;K=null!=Y.options.defaultDate?Y.moment(Y.options.defaultDate).stripZone():Y.getNow(),Y.getSuggestedViewHeight=function(){return Q===undefined&&f(),Q},Y.isHeightAuto=function(){return"auto"===Y.options.contentHeight||"auto"===Y.options.height},Y.setToolbarsTitle=function(t){W.proxyCall("updateTitle",t)},Y.freezeContentHeight=F,Y.thawContentHeight=z;var nt=0;Y.initialize()}function Nt(e){t.each(we,function(t,n){null==e[t]&&(e[t]=n(e))})}function Ft(t){return e.localeData(t)||e.localeData("en")}function zt(){function n(t,e){return!U.options.lazyFetching||s(t,e)?o(t,e):ft.resolve($)}function i(){$=r(nt),U.trigger("eventsReset",$)}function r(t){var e,n,i=[];for(e=0;e<t.length;e++)(n=t[e]).start.clone().stripZone()<Z&&U.getEventEnd(n).stripZone()>q&&i.push(n);return i}function s(t,e){return!q||t<q||e>Z}function o(t,e){return q=t,Z=e,l()}function l(){return u(tt,"reset")}function a(t){return u(E(t))}function u(t,e){var n,i;for("reset"===e?nt=[]:"add"!==e&&(nt=C(nt,t)),n=0;n<t.length;n++)"pending"!==(i=t[n])._status&&et++,i._fetchId=(i._fetchId||0)+1,i._status="pending";for(n=0;n<t.length;n++)c(i=t[n],i._fetchId);return et?new ft(function(t){U.one("eventsReceived",t)}):ft.resolve($)}function c(e,n){f(e,function(i){var r,s,o,l=t.isArray(e.events);if(n===e._fetchId&&"rejected"!==e._status){if(e._status="resolved",i)for(r=0;r<i.length;r++)s=i[r],(o=l?s:F(s,e))&&nt.push.apply(nt,_(o));h()}})}function d(t){var e="pending"===t._status;t._status="rejected",e&&h()}function h(){--et||(i(nt),U.trigger("eventsReceived",$))}function f(e,n){var i,r,s=Ot.sourceFetchers;for(i=0;i<s.length;i++){if(!0===(r=s[i].call(U,e,q.clone(),Z.clone(),U.options.timezone,n)))return;if("object"==typeof r)return void f(r,n)}var o=e.events;if(o)t.isFunction(o)?(U.pushLoading(),o.call(U,q.clone(),Z.clone(),U.options.timezone,function(t){n(t),U.popLoading()})):t.isArray(o)?n(o):n();else if(e.url){var l,a=e.success,u=e.error,c=e.complete;
140l=t.isFunction(e.data)?e.data():e.data;var d=t.extend({},l||{}),h=J(e.startParam,U.options.startParam),g=J(e.endParam,U.options.endParam),p=J(e.timezoneParam,U.options.timezoneParam);h&&(d[h]=q.format()),g&&(d[g]=Z.format()),U.options.timezone&&"local"!=U.options.timezone&&(d[p]=U.options.timezone),U.pushLoading(),t.ajax(t.extend({},Ee,e,{data:d,success:function(e){e=e||[];var i=K(a,this,arguments);t.isArray(i)&&(e=i),n(e)},error:function(){K(u,this,arguments),n()},complete:function(){K(c,this,arguments),U.popLoading()}}))}else n()}function g(t){var e=p(t);e&&(tt.push(e),u([e],"add"))}function p(e){var n,i,r=Ot.sourceNormalizers;if(t.isFunction(e)||t.isArray(e)?n={events:e}:"string"==typeof e?n={url:e}:"object"==typeof e&&(n=t.extend({},e)),n){for(n.className?"string"==typeof n.className&&(n.className=n.className.split(/\s+/)):n.className=[],t.isArray(n.events)&&(n.origArray=n.events,n.events=t.map(n.events,function(t){return F(t,n)})),i=0;i<r.length;i++)r[i].call(U,n);return n}}function v(t){y(b(t))}function m(t){null==t?y(tt,!0):y(E(t))}function y(e,n){var r;for(r=0;r<e.length;r++)d(e[r]);n?(tt=[],nt=[]):(tt=t.grep(tt,function(t){for(r=0;r<e.length;r++)if(t===e[r])return!1;return!0}),nt=C(nt,e)),i()}function S(){return tt.slice(1)}function w(e){return t.grep(tt,function(t){return t.id&&t.id===e})[0]}function E(e){e?t.isArray(e)||(e=[e]):e=[];var n,i=[];for(n=0;n<e.length;n++)i.push.apply(i,b(e[n]));return i}function b(e){var n,i;for(n=0;n<tt.length;
140n++)if((i=tt[n])===e)return[i];return(i=w(e))?[i]:t.grep(tt,function(t){return D(e,t)})}function D(t,e){return t&&e&&T(t)==T(e)}function T(t){return("object"==typeof t?t.origArray||t.googleCalendarId||t.url||t.events:null)||t}function C(e,n){return t.grep(e,function(t){for(var e=0;e<n.length;e++)if(t.source===n[e])return!1;return!0})}function H(t){x([t])}function x(t){var e,n;for(e=0;e<t.length;e++)(n=t[e]).start=U.moment(n.start),n.end?n.end=U.moment(n.end):n.end=null,Y(n,R(n));i()}function R(e){var n={};return t.each(e,function(t,e){I(t)&&e!==undefined&&X(e)&&(n[t]=e)}),n}function I(t){return!/^_|^(id|allDay|start|end)$/.test(t)}function k(t,e){return L([t],e)}function L(t,e){var n,r,s,o,l,a=[];for(s=0;s<t.length;s++)if(r=F(t[s])){for(n=_(r),o=0;o<n.length;o++)(l=n[o]).source||(e&&(Q.events.push(l),l.source=Q),nt.push(l));a=a.concat(n)}return a.length&&i(),a}function M(e){var n,r;for(null==e?e=function(){return!0}:t.isFunction(e)||(n=e+"",e=function(t){return t._id==n}),nt=t.grep(nt,e,!0),r=0;r<tt.length;r++)t.isArray(tt[r].events)&&(tt[r].events=t.grep(tt[r].events,e,!0));i()}function B(e){return t.isFunction(e)?t.grep(nt,e):null!=e?(e+="",t.grep(nt,function(t){return t._id==e})):nt}function N(t){t.start=U.moment(t.start),t.end&&(t.end=U.moment(t.end)),Gt(t)}function F(n,i){var r,s,o,l={};if(U.options.eventDataTransform&&(n=U.options.eventDataTransform(n)),i&&i.eventDataTransform&&(n=i.eventDataTransform(n)),t.extend(l,n),i&&(l.source=i),l._id=n._id||(n.id===undefined?"_fc"+be++:n.id+""),n.className?"string"==typeof n.className?l.className=n.className.split(/\s+/):l.className=n.className:l.className=[],r=n.start||n.date,s=n.end,j(r)&&(r=e.duration(r)),j(s)&&(s=e.duration(s)),n.dow||e.isDuration(r)||e.isDuration(s))l.start=r?e.duration(r):null,l.end=s?e.duration(s):null,l._recurring=!0;else{if(r&&!(r=U.moment(r)).isValid())return!1;s&&((s=U.moment(s)).isValid()||(s=null)),(o=n.allDay)===undefined&&(o=J(i?i.allDayDefault:undefined,U.options.allDayDefault)),A(r,s,o,l)}return U.normalizeEvent(l),l}function A(t,e,n,i){i.start=t,i.end=e,i.allDay=n,V(i),Gt(i)}function V(t){P(t),t.end&&!t.end.isAfter(t.start)&&(t.end=null),t.end||(U.options.forceEventDuration?t.end=U.getDefaultEventEnd(t.allDay,t.start):t.end=null)}function P(t){null==t.allDay&&(t.allDay=!(t.start.hasTime()||t.end&&t.end.hasTime())),t.allDay?(t.start.stripTime(),t.end&&t.end.stripTime()):(t.start.hasTime()||(t.start=U.applyTimezone(t.start.time(0))),t.end&&!t.end.hasTime()&&(t.end=U.applyTimezone(t.end.time(0))))}function _(e,n,i){var r,s,o,l,a,u,c,d,h,f=[];if(n=n||q,i=i||Z,e)if(e._recurring){if(s=e.dow)for(r={},o=0;o<s.length;o++)r[s[o]]=!0;for(l=n.clone().stripTime();l.isBefore(i);)r&&!r[l.day()]||(a=e.start,u=e.end,c=l.clone(),d=null,a&&(c=c.time(a)),u&&(d=l.clone().time(u)),A(c,d,!a&&!u,h=t.extend({},e)),f.push(h)),l.add(1,"days")}else f.push(e);return f}function Y(e,n,i){function r(t,e){return i?O(t,e,i):n.allDay?G(t,e):z(t,e)}var s,o,l,a,u={};return(n=n||{}).start||(n.start=e.start.clone()),n.end===undefined&&(n.end=e.end?e.end.clone():null),null==n.allDay&&(n.allDay=e.allDay),V(n),V(s={start:e._start.clone(),end:e._end?e._end.clone():U.getDefaultEventEnd(e._allDay,e._start),allDay:n.allDay}),o=null!==e._end&&null===n.end,l=r(n.start,s.start),a=n.end?r(n.end,s.end).subtract(l):null,t.each(n,function(t,e){I(t)&&e!==undefined&&(u[t]=e)}),{dateDelta:l,durationDelta:a,undo:W(B(e._id),o,n.allDay,l,a,u)}}function W(e,n,i,r,s,o){var l=U.getIsAmbigTimezone(),a=[];return r&&!r.valueOf()&&(r=null),s&&!s.valueOf()&&(s=null),t.each(e,function(e,u){var c,d;c={start:u.start.clone(),end:u.end?u.end.clone():null,allDay:u.allDay},t.each(o,function(t){c[t]=u[t]}),V(d={start:u._start,end:u._end,allDay:i}),n?d.end=null:s&&!d.end&&(d.end=U.getDefaultEventEnd(d.allDay,d.start)),r&&(d.start.add(r),d.end&&d.end.add(r)),s&&d.end.add(s),l&&!d.allDay&&(r||s)&&(d.start.stripZone(),d.end&&d.end.stripZone()),t.extend(u,o,d),Gt(u),a.push(function(){t.extend(u,c),Gt(u)})}),function(){for(var t=0;t<a.length;t++)a[t]()}}var U=this;U.requestEvents=n,U.reportEventChange=i,U.isFetchNeeded=s,U.fetchEvents=o,U.fetchEventSources=u,U.refetchEvents=l,U.refetchEventSources=a,U.getEventSources=S,U.getEventSourceById=w,U.addEventSource=g,U.removeEventSource=v,U.removeEventSources=m,U.updateEvent=H,U.updateEvents=x,U.renderEvent=k,U.renderEvents=L,U.removeEvents=M,U.clientEvents=B,U.mutateEvent=Y,U.normalizeEventDates=V,U.normalizeEventTimes=P;var q,Z,$,Q={events:[]},tt=[Q],et=0,nt=[];t.each((U.options.events?[U.options.events]:[]).concat(U.options.eventSources||[]),function(t,e){var n=p(e);n&&tt.push(n)}),U.getEventCache=function(){return nt},U.getPrunedEventCache=function(){return $},U.rezoneArrayEventSources=function(){var e,n,i;for(e=0;e<tt.length;e++)if(n=tt[e].events,t.isArray(n))for(i=0;i<n.length;i++)N(n[i])},U.buildEventFromInput=F,U.expandEvent=_}function Gt(t){t._allDay=t.allDay,t._start=t.start.clone(),t._end=t.end?t.end.clone():null}var Ot=t.fullCalendar={version:"3.2.0",internalApiVersion:8},At=Ot.views={};t.fn.fullCalendar=function(e){var n=Array.prototype.slice.call(arguments,1
140),i=this;return this.each(function(r,s){var o,l=t(s),a=l.data("fullCalendar");"string"==typeof e?a&&t.isFunction(a[e])&&(o=a[e].apply(a,n),r||(i=o),"destroy"===e&&l.removeData("fullCalendar")):a||(a=new ve(l,e),l.data("fullCalendar",a),a.render())}),i};var Vt=["header","footer","buttonText","buttonIcons","themeButtonIcons"];Ot.intersectRanges=F,Ot.applyAll=K,Ot.debounce=at,Ot.isInt=ot,Ot.htmlEscape=tt,Ot.cssToStr=nt,Ot.proxy=lt,Ot.capitaliseFirstLetter=rt,Ot.getOuterRect=h,Ot.getClientRect=f,Ot.getContentRect=g,Ot.getScrollbarWidths=p;var Pt=null;Ot.preventDefault=H,Ot.intersectRects=x,Ot.parseFieldSpecs=L,Ot.compareByFieldSpecs=M,Ot.compareByFieldSpec=B,Ot.flexibleCompare=N,Ot.computeIntervalUnit=A,Ot.divideRangeByDuration=P,Ot.divideDurationByDuration=_,Ot.multiplyDuration=Y,Ot.durationHasTime=W;var _t=["sun","mon","tue","wed","thu","fri","sat"],Yt=["year","month","week","day","hour","minute","second","millisecond"];Ot.log=function(){var t=window.console;if(t&&t.log)return t.log.apply(t,arguments)},Ot.warn=function(){var t=window.console;return t&&t.warn?t.warn.apply(t,arguments):Ot.log.apply(Ot,arguments)};var Wt={}.hasOwnProperty;Ot.createObject=Z;var Ut=/^\s*\d{4}-\d\d$/,jt=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,qt=e.fn,Zt=t.extend({},qt),$t=e.momentProperties;$t.push("_fullCalendar"),$t.push("_ambigTime"),$t.push("_ambigZone"),Ot.moment=function(){return ut(arguments)},Ot.moment.utc=function(){var t=ut(arguments,!0);return t.hasTime()&&t.utc(),t},Ot.moment.parseZone=function(){return ut(arguments,!0,!0)},qt.week=qt.weeks=function(t){var e=this._locale._fullCalendar_weekCalc;return null==t&&"function"==typeof e?e(this):"ISO"===e?Zt.isoWeek.apply(this,arguments):Zt.week.apply(this,arguments)},qt.time=function(t){if(!this._fullCalendar)return Zt.time.apply(this,arguments);if(null==t)return e.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,e.isDuration(t)||e.isMoment(t)||(t=e.duration(t));var n=0;return e.isDuration(t)&&(n=24*Math.floor(t.asDays())),this.hours(n+t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds())},qt.stripTime=function(){return this._ambigTime||(this.utc(!0),this.set({hours:0,minutes:0,seconds:0,ms:0}),this._ambigTime=!0,this._ambigZone=!0),this},qt.hasTime=function(){return!this._ambigTime},qt.stripZone=function(){var t;return this._ambigZone||(t=this._ambigTime,this.utc(!0),this._ambigTime=t||!1,this._ambigZone=!0),this},qt.hasZone=function(){return!this._ambigZone},qt.local=function(t){return Zt.local.call(this,this._ambigZone||t),this._ambigTime=!1,this._ambigZone=!1,this},qt.utc=function(t){return Zt.utc.call(this,t),this._ambigTime=!1,this._ambigZone=!1,this},qt.utcOffset=function(t){return null!=t&&(this._ambigTime=!1,this._ambigZone=!1),Zt.utcOffset.apply(this,arguments)},qt.format=function(){return this._fullCalendar&&arguments[0]?Qt(this,arguments[0]):this._ambigTime?Kt(this,"YYYY-MM-DD"):this._ambigZone?Kt(this,"YYYY-MM-DD[T]HH:mm:ss"):Zt.format.apply(this,arguments)},qt.toISOString=function(){return this._ambigTime?Kt(this,"YYYY-MM-DD"):this._ambigZone?Kt(this,"YYYY-MM-DD[T]HH:mm:ss"):Zt.toISOString.apply(this,arguments)},function(){function t(t,e){return c(r(e).fakeFormatString,t)}function e(t,e){return Zt.format.call(t,e)}function n(t,e,n,s,o){return t=Ot.moment.parseZone(t),e=Ot.moment.parseZone(e),i(r(n=t.localeData().longDateFormat(n)||n),t,e,s||" - ",o)}function i(t,e,n,i,r){var s,o,l,a=t.sameUnits,u=e.clone().stripZone(),c=n.clone().stripZone(),f=d(t.fakeFormatString,e),g=d(t.fakeFormatString,n),p="",v="",m="",y="",S="";for(s=0;s<a.length&&(!a[s]||u.isSame(c,a[s]));s++)p+=f[s];for(o=a.length-1;o>s&&(!a[o]||u.isSame(c,a[o]))&&(o-1!==s||"."!==f[o]);o--)v=f[o]+v;for(l=s;l<=o;l++)m+=f[l],y+=g[l];return(m||y)&&(S=r?y+i+m:m+i+y),h(p+S+v)}function r(t){return w[t]||(w[t]=s(t))}function s(t){var e=o(t);return{fakeFormatString:a(e),sameUnits:u(e)}}function o(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push.apply(n,l(e[1])):e[2]?n.push({maybe:o(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push.apply(n,l(e[5]));return n}function l(t){return". "===t?["."," "]:[t]}function a(t){var e,n,i=[];for(e=0;e<t.length;e++)"string"==typeof(n=t[e])?i.push("["+n+"]"):n.token?n.token in y?i.push(p+"["+n.token+"]"):i.push(n.token):n.maybe&&i.push(v+a(n.maybe)+v);return i.join(g)}function u(t){var e,n,i,r=[];for(e=0;e<t.length;e++)(n=t[e]).token?(i=S[n.token.charAt(0)],r.push(i?i.unit:"second")):n.maybe?r.push.apply(r,u(n.maybe)):r.push(null);return r}function c(t,e){return h(d(t,e).join(""))}function d(t,n){var i,r,s=[],o=e(n,t).split(g);for(i=0;i<o.length;i++)(r=o[i]).charAt(0)===p?s.push(y[r.substring(1)](n)):s.push(r);return s}function h(t){return t.replace(m,function(t,e){return e.match(/[1-9]/)?e:""})}function f(t){var e,n,i,r,s=o(t);for(e=0;e<s.length;e++)(n=s[e]).token&&(i=S[n.token.charAt(0)])&&(!r||i.value>r.value)&&(r=i);return r?r.unit:null}Ot.formatDate=t,Ot.formatRange=n,Ot.oldMomentFormat=e,Ot.queryMostGranularFormatUnit=f;var g="\x0B",p="\x1f",v="\x1e",m=new RegExp(v+"([^"+v+"]*)"+v,"g"),y={t:function(t){return e(t,"a").charAt(0)},T:function(t){return e(t,"A").charAt(0)}},S={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}},w={}}();var Qt=Ot.formatDate,Xt=Ot.formatRange,Kt=Ot.oldMomentFormat;Ot.Class=ct,ct.extend=function(){var t,e,n=arguments.length;for(t=0;t<n;t++)e=arguments[t],t<n-1&&ht(this,e);return dt(this,e||{})},ct.mixin=function(t){ht(this,t)},Ot.Promise=ft,ft.immediate=!0, 141ft.resolve=function(e){if(e&&"function"==typeof e.resolve)return e.promise();if(e&&"function"==typeof e.then)return e;var n=t.Deferred().resolve(e).promise();if(ft.immediate){var i=n.then;n._value=e,n.then=function(t,r){return"function"==typeof t?ft.resolve(t(e)):i.
141call(n,t,r)}}return n},ft.reject=function(){return t.Deferred().reject().promise()},ft.all=function(e){var n,i,r,s=!1;if(ft.immediate)for(s=!0,n=[],i=0;i<e.length;i++)if((r=e[i])&&"function"==typeof r.state&&"resolved"===r.state()&&"_value"in r)n.push(r._value);else{if(r&&"function"==typeof r.then){s=!1;break}n.push(r)}return s?ft.resolve(n):t.when.apply(t.when,e).then(function(){return t.when(t.makeArray(arguments))})},Ot.TaskQueue=gt;var Jt,te=Ot.EmitterMixin={on:function(e,n){return t(this).on(e,this._prepareIntercept(n)),this},one:function(e,n){return t(this).one(e,this._prepareIntercept(n)),this},_prepareIntercept:function(e){var n=function(t,n){return e.apply(n.context||this,n.args||[])};return e.guid||(e.guid=t.guid++),n.guid=e.guid,n},off:function(e,n){return t(this).off(e,n),this},trigger:function(e){var n=Array.prototype.slice.call(arguments,1);return t(this).triggerHandler(e,{args:n}),this},triggerWith:function(e,n,i){return t(this).triggerHandler(e,{context:n,args:i}),this}},ee=Ot.ListenerMixin=(Jt=0,{listenerId:null,listenTo:function(e,n,i){if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&this.listenTo(e,r,n[r]);else"string"==typeof n&&e.on(n+"."+this.getListenerNamespace(),t.proxy(i,this))},stopListeningTo:function(t,e){t.off((e||"")+"."+this.getListenerNamespace())},getListenerNamespace:function(){return null==this.listenerId&&(this.listenerId=Jt++),"_listener"+this.listenerId}}),ne=ct.extend(ee,{isHidden:!0,options:null,el:null,margin:10,constructor:function(t){this.options=t||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var e=this,n=this.options;this.el=t('<div class="fc-popover"/>').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),n.autoHide&&this.listenTo(t(document),"mousedown",this.documentMousedown)},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(t(document),"mousedown")},position:function(){var e,n,i,r,s,o=this.options,l=this.el.offsetParent().offset(),a=this.el.outerWidth(),u=this.el.outerHeight(),c=t(window),h=d(this.el);r=o.top||0,s=o.left!==undefined?o.left:o.right!==undefined?o.right-a:0,h.is(window)||h.is(document)?(h=c,e=0,n=0):(e=(i=h.offset()).top,n=i.left),e+=c.scrollTop(),n+=c.scrollLeft(),!1!==o.viewportConstrain&&(r=Math.min(r,e+h.outerHeight()-u-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,n+h.outerWidth()-a-this.margin),s=Math.max(s,n+this.margin)),this.el.css({top:r-l.top,left:s-l.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),ie=Ot.CoordCache=ct.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(e){this.els=t(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?t(e.offsetParent):null},build:function(){var t=this.forcedOffsetParentEl;!t&&this.els.length>0&&(t=this.els.eq(0).offsetParent()),this.origin=t?t.offset():null,this.boundingRect=this.queryBoundingRect
141(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().left,l=s.outerWidth();e.push(o),n.push(o+l)}),this.lefts=e,this.rights=n},buildElVerticals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().top,l=s.outerHeight();e.push(o),n.push(o+l)}),this.tops=e,this.bottoms=n},getHorizontalIndex:function(t){this.ensureBuilt();var e,n=this.lefts,i=this.rights,r=n.length;for(e=0;e<r;e++)if(t>=n[e]&&t<i[e])return e},getVerticalIndex:function(t){this.ensureBuilt();var e,n=this.tops,i=this.bottoms,r=n.length;for(e=0;e<r;e++)if(t>=n[e]&&t<i[e])return e},getLeftOffset:function(t){return this.ensureBuilt(),this.lefts[t]},getLeftPosition:function(t){return this.ensureBuilt(),this.lefts[t]-this.origin.left},getRightOffset:function(t){return this.ensureBuilt(),this.rights[t]},getRightPosition:function(t){return this.ensureBuilt(),this.rights[t]-this.origin.left},getWidth:function(t){return this.ensureBuilt(),this.rights[t]-this.lefts[t]},getTopOffset:function(t){return this.ensureBuilt(),this.tops[t]},getTopPosition:function(t){return this.ensureBuilt(),this.tops[t]-this.origin.top},getBottomOffset:function(t){return this.ensureBuilt(),this.bottoms[t]},getBottomPosition:function(t){return this.ensureBuilt(),this.bottoms[t]-this.origin.top},getHeight:function(t){return this.ensureBuilt(),this.bottoms[t]-this.tops[t]},queryBoundingRect:function(){var t;return this.els.length>0&&!(t=d(this.els.eq(0))).is(document)?f(t):null},isPointInBounds:function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},isLeftInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.left&&t<this.boundingRect.right},isTopInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.top&&t<this.boundingRect.bottom}}),re=Ot.DragListener=ct.extend(ee,{options:null,subjectEl:null,originX:null,originY:null,scrollEl:null,isInteracting:!1,isDistanceSurpassed:!1,isDelayEnded:!1,isDragging:!1,isTouch:!1,delay:null,delayTimeoutId:null,minDistance:null,shouldCancelTouchScroll:!0,scrollAlwaysKills:!1,constructor:function(t){this.options=t||{}},startInteraction:function(e,n){var i=D(e);if("mousedown"===e.type){if(ae.get().shouldIgnoreMouse())return;if(!w(e))return;e.preventDefault()}this.isInteracting||(n=n||{},this.delay=J(n.delay,this.options.delay,0),this.minDistance=J(n.distance,this.options.distance,0),this.subjectEl=this.options.subjectEl,T(t("body")),this.isInteracting=!0,this.isTouch=i,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.originX=E(e),this.originY=b(e),this.scrollEl=d(t(e.target)),this.bindHandlers(),this.initAutoScroll(),this.handleInteractionStart(e),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e))},handleInteractionStart:function(t){this.trigger("interactionStart",t)},endInteraction:function(e,n){this.isInteracting&&(this.endDrag(e),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null),this.destroyAutoScroll(),this.unbindHandlers(),this.isInteracting=!1,this.handleInteractionEnd(e,n),C(t("body")))},handleInteractionEnd:function(t,e){this.trigger("interactionEnd",t,e||!1)},bindHandlers:function(){var t=ae.get();this.isTouch?this.listenTo(t,{touchmove:this.handleTouchMove,touchend:this.endInteraction,scroll:this.handleTouchScroll}):this.listenTo(t,{mousemove:this.handleMouseMove,mouseup:this.endInteraction}),this.listenTo(t,{selectstart:H,contextmenu:H})},unbindHandlers:function(){this.stopListeningTo(ae.get())},startDrag:function(t,e){this.startInteraction(t,e),this.isDragging||(this.isDragging=!0,this.handleDragStart(t))},handleDragStart:function(t){this.trigger("dragStart",t)},handleMove:function(t){var e=E(t)-this.originX,n=b(t)-this.originY,i=this.minDistance;this.isDistanceSurpassed||e*e+n*n>=i*i&&this.handleDistanceSurpassed(t),this.isDragging&&this.handleDrag(e,n,t)},handleDrag:function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},endDrag:function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},handleDragEnd:function(t){this.trigger("dragEnd",t)},startDelay:function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},handleDelayEnd:function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},handleDistanceSurpassed:function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},handleTouchMove:function(t){this.isDragging&&this.shouldCancelTouchScroll&&t.preventDefault(),this.handleMove(t)},handleMouseMove:function(t){this.handleMove(t)},handleTouchScroll:function(t){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(t,!0)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1
141)),this["_"+t]&&this["_"+t].apply(this,Array.prototype.slice.call(arguments,1))}});re.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var t=this.scrollEl;this.isAutoScroll=this.options.scroll&&t&&!t.is(window)&&!t.is(document),this.isAutoScroll&&this.listenTo(t,"scroll",at(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=h(this.scrollEl))},updateAutoScroll:function(t){var e,n,i,r,s=this.scrollSensitivity,o=this.scrollBounds,l=0,a=0;o&&(e=(s-(b(t)-o.top))/s,n=(s-(o.bottom-b(t)))/s,i=(s-(E(t)-o.left))/s,r=(s-(o.right-E(t)))/s,e>=0&&e<=1?l=e*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?a=i*this.scrollSpeed*-1:r>=0&&r<=1&&(a=r*this.scrollSpeed)),this.setScrollVel(l,a)},setScrollVel:function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(lt(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var se=re.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){re.call(this,e),this.component=t},handleInteractionStart:function(t){var e,n,i,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),t?(i=n={left:E(t),top:b(t)},r&&(i=R(i,e=h(r))),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(e=x(this.origHit,e)||e),i=I(e)),this.coordAdjust=k(i,n)):(this.origHit=null,this.coordAdjust=null),re.prototype.handleInteractionStart.apply(this,arguments)},handleDragStart:function(t){var e;re.prototype.handleDragStart.apply(this,arguments),(e=this.queryHit(E(t),b(t)))&&this.handleHitOver(e)},handleDrag:function(t,e,n){var i;re.prototype.handleDrag.apply(this,arguments),pt(i=this.queryHit(E(n),b(n)),this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),re.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(t){var e=pt(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){re.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},handleScrollEnd:function(){re.prototype.handleScrollEnd.apply(this,arguments),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},queryHit:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)}});Ot.touchMouseIgnoreWait=500;var oe,le,ae=ct.extend(ee,te,{isTouching:!1,mouseIgnoreDepth:0,handleScrollProxy:null,bind:function(){var e=this;this.listenTo(t(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(n){e.handleTouchMove(t.Event(n))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(n){e.handleScroll(t.Event(n))},!0)},unbind:function(){this.stopListeningTo(t(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},handleTouchStart:function(t){this.stopTouch(t,!0),this.isTouching=!0,this.trigger("touchstart",t)},handleTouchMove:function(t){this.isTouching&&this.trigger("touchmove",t)},handleTouchCancel:function(t){this.isTouching&&(this.trigger("touchcancel",t),this.stopTouch(t))},handleTouchEnd:function(t){this.stopTouch(t)},handleMouseDown:function(t){this.shouldIgnoreMouse()||this.trigger("mousedown",t)},handleMouseMove:function(t){this.shouldIgnoreMouse()||this.trigger("mousemove",t)},handleMouseUp:function(t){this.shouldIgnoreMouse()||this.trigger("mouseup",t)},handleClick:function(t){this.shouldIgnoreMouse()||this.trigger("click",t)},handleSelectStart:function(t){this.trigger("selectstart",t)},handleContextMenu:function(t){this.trigger("contextmenu",t)},handleScroll:function(t){this.trigger("scroll",t)},stopTouch:function(t,e){this.isTouching&&(this.isTouching=!1,this.trigger("touchend",t),e||this.startTouchMouseIgnore())},startTouchMouseIgnore:function(){var t=this,e=Ot.touchMouseIgnoreWait;e&&(this.mouseIgnoreDepth++,setTimeout(function(){t.mouseIgnoreDepth--},e))},shouldIgnoreMouse:function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)}});oe=null,le=0,ae.get=function(){return oe||(oe=new ae).bind(),oe},ae.needed=function(){ae.get(),le++},ae.unneeded=function(){--le||(oe.unbind(),oe=null)};var ue=ct.extend(ee,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,n){this.options=n=n||{},this.sourceEl=e,this.parentEl=n.parentEl?t(n.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.y0=b(e),this.x0=E(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),D(e)?this.listenTo(t(document),"touchmove",this.handleMove):this.listenTo(t(document),"mousemove",this.handleMove))},stop:function(e,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}
141var r=this,s=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(t(document)),e&&s&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:s,complete:i})):i())},getEl:function(){var t=this.el;return t||((t=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex})).addClass("fc-unselectable"),t.appendTo(this.parentEl)),t},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(t){this.topDelta=b(t)-this.y0,this.leftDelta=E(t)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),ce=Ot.Grid=ct.extend(ee,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayClickListener:null,daySelectListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={}
141,this.dayClickListener=this.buildDayClickListener(),this.daySelectListener=this.buildDaySelectListener()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){this.start=t.start.clone(),this.end=t.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var t,e,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),null==(t=n.opt("displayEventTime"))&&(t=this.computeDisplayEventTime()),null==(e=n.opt("displayEventEnd"))&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(){},diffDates:function(t,e){return this.largeUnit?O(t,e,this.largeUnit):z(t,e)},hitsNeededDepth:0,hitsNeeded:function(){this.hitsNeededDepth++||this.prepareHits()},hitsNotNeeded:function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits()},prepareHits:function(){},releaseHits:function(){},queryHit:function(){},getHitSpan:function(){},getHitEl:function(){},setElement:function(t){this.el=t,this.hasDayInteractions&&(T(t),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(e,n){var i=this;this.el.on(e,function(e){if(!t(e.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,e)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(t(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(t(document))},dayMousedown:function(t){var e=this.view;e.isSelected||e.selectedEvent||(this.dayClickListener.startInteraction(t),e.opt("selectable")&&this.daySelectListener.startInteraction(t,{distance:e.opt("selectMinDistance")}))},dayTouchStart:function(t){var e,n=this.view;n.isSelected||n.selectedEvent||(null==(e=n.opt("selectLongPressDelay"))&&(e=n.opt("longPressDelay")),this.dayClickListener.startInteraction(t),n.opt("selectable")&&this.daySelectListener.startInteraction(t,{delay:e}))},buildDayClickListener:function(){var t,e=this,n=this.view,i=new se(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=i.origHit}
141,hitOver:function(e,n){n||(t=null)},hitOut:function(){t=null},interactionEnd:function(i,r){!r&&t&&n.triggerDayClick(e.getHitSpan(t),e.getHitEl(t),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},buildDaySelectListener:function(){var t,e=this,n=this.view;return new se(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=null},dragStart:function(){n.unselect()},hitOver:function(n,i,r){r&&((t=e.computeSelection(e.getHitSpan(r),e.getHitSpan(n)))?e.renderSelection(t):!1===t&&s())},hitOut:function(){t=null,e.unrenderSelection()},hitDone:function(){o()},interactionEnd:function(e,i){!i&&t&&n.reportSelection(t,e)}})},clearDragListeners:function(){this.dayClickListener.endInteraction(),this.daySelectListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);return this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?Z(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),e||(n.editable=!1),n},renderHelper:function(){},unrenderHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(t,e){var n=this.computeSelectionSpan(t,e);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(st),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(){},unrenderNowIndicator:function(){},renderFill:function(){},unrenderFill:function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},renderFillSegEls:function(e,n){var i,r=this,s=this[e+"SegEl"],o="",l=[];if(n.length){for(i=0;i<n.length;i++)o+=this.fillSegHtml(e,n[i]);t(o).each(function(e,i){var o=n[e],a=t(i);s&&(a=s.call(r,o,a)),a&&(a=t(a)).is(r.fillSegTag)&&(o.el=a,l.push(o))})}return l},fillSegTag:"div",fillSegHtml:function(t,e){var n=this[t+"SegClasses"],i=this[t+"SegCss"],r=n?n.call(this,e):[],s=nt(i?i.call(this,e):{});return"<"+this.fillSegTag+(r.length?' class="'+r.join(" ")+'"':"")+(s?' style="'+s+'"':"")+" />"},getDayClasses:function(t,e){var n=this.view,i=n.calendar.getNow(),r=["fc-"+_t[t.day()]];return 1==n.intervalDuration.as("months")&&t.month()!=n.intervalStart.month()&&r.push("fc-other-month"),t.isSame(i,"day")?(r.push("fc-today"),!0!==e&&r.push(n.highlightStateClass)):t<i?r.push("fc-past"):r.push("fc-future"),r}});ce.mixin({segSelector:".fc-event-container > *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExter
141nal:!1,segs:null,renderEvents:function(t){var e,n=[],i=[];for(e=0;e<t.length;e++)(yt(t[e])?n:i).push(t[e]);this.segs=[].concat(this.renderBgEvents(n),this.renderFgEvents(i))},renderBgEvents:function(t){var e=this.eventsToSegs(t);return this.renderBgSegs(e)||e},renderFgEvents:function(t){var e=this.eventsToSegs(t);return this.renderFgSegs(e)||e},unrenderEvents:function(){this.handleSegMouseout(),this.clearDragListeners(),this.unrenderFgSegs(),this.unrenderBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(){},unrenderFgSegs:function(){},renderFgSegEls:function(e,n){var i,r=this.view,s="",o=[];if(e.length){for(i=0;i<e.length;i++)s+=this.fgSegHtml(e[i],n);t(s).each(function(n,i){var s=e[n],l=r.resolveEventEl(s.event,t(i));l&&(l.data("fc-seg",s),s.el=l,o.push(s))})}return o},fgSegHtml:function(){},renderBgSegs:function(t){return this.renderFill("bgEvent",t)},unrenderBgSegs:function(){this.unrenderFill("bgEvent")},bgEventSegEl:function(t,e){return this.view.resolveEventEl(t.event,e)},bgEventSegClasses:function(t){var e=t.event,n=e.source||{};return["fc-bgevent"].concat(e.className,n.className||[])},bgEventSegCss:function(t){return{"background-color":this.getSegSkinCss(t)["background-color"]}},businessHoursSegClasses:function(){return["fc-nonbusiness","fc-bgevent"]},buildBusinessHourSegs:function(t,e){return this.eventsToSegs(this.buildBusinessHourEvents(t,e))},buildBusinessHourEvents:function(e,n){var i,r=this.view.calendar;return null==n&&(n=r.options.businessHours),!(i=r.computeBusinessHourEvents(e,n)).length&&n&&(i=[t.extend({},De,{start:this.view.end,end:this.view.end,dow:null})]),i},bindSegHandlers:function(){this.bindSegHandlersToEl(this.el)},bindSegHandlersToEl:function(t){this.bindSegHandlerToEl(t,"touchstart",this.handleSegTouchStart),this.bindSegHandlerToEl(t,"mouseenter",this.handleSegMouseover),this.bindSegHandlerToEl(t,"mouseleave",this.handleSegMouseout),this.bindSegHandlerToEl(t,"mousedown",this.handleSegMousedown),this.bindSegHandlerToEl(t,"click",this.handleSegClick)},bindSegHandlerToEl:function(e,n,i){var r=this;e.on(n,this.segSelector,function(e){var n=t(this).data("fc-seg");if(n&&!r.isDraggingSeg&&!r.isResizingSeg)return i.call(r,n,e)})},handleSegClick:function(t,e){!1===this.view.publiclyTrigger("eventClick",t.el[0],t.event,e)&&e.preventDefault()},handleSegMouseover:function(t,e){ae.get().shouldIgnoreMouse()||this.mousedOverSeg||(this.mousedOverSeg=t,this.view.isEventResizable(t.event)&&t.el.addClass("fc-allow-mouse-resize"),this.view.publiclyTrigger("eventMouseover",t.el[0],t.event,e))},handleSegMouseout:function(t,e){e=e||{},this.mousedOverSeg&&(t=t||this.mousedOverSeg,this.mousedOverSeg=null,this.view.isEventResizable(t.event)&&t.el.removeClass("fc-allow-mouse-resize"),this.view.publiclyTrigger("eventMouseout",t.el[0],t.event,e))},handleSegMousedown:function(t,e){!this.startSegResize(t,e,{distance:5})&&this.view.isEventDraggable(t.event)&&this.buildSegDragListener(t).startInteraction(e,{distance:5})},handleSegTouchStart:function(t,e){var n,i=this.view,r=t.event,s=i.isEventSelected(r),o=i.isEventDraggable(r),l=i.isEventResizable(r),a=!1;s&&l&&(a=this.startSegResize(t,e)),a||!o&&!l||(null==(n=i.opt("eventLongPressDelay"))&&(n=i.opt("longPressDelay")),(o?this.buildSegDragListener(t):this.buildSegSelectListener(t)).startInteraction(e,{delay:s?0:n}))},startSegResize:function(e,n,i){return!!t(n.target).is(".fc-resizer")&&(this.buildSegResizeListener(e,t(n.target).is(".fc-start-resizer")).startInteraction(n,i),!0)},buildSegDragListener:function(t){var e,n,i,r=this,l=this.view,a=l.calendar,u=t.el,c=t.event;if(this.segDragListener)return this.segDragListener;var d=this.segDragListener=new se(l,{scroll:l.opt("dragScroll"),subjectEl:u,subjectCenter:!0,interactionStart:function(i){t.component=r,e=!1,(n=new ue(t.el,{additionalClass:"fc-dragging",parentEl:l.el,opacity:d.isTouch?null:l.opt("dragOpacity"),revertDuration:l.opt("dragRevertDuration"),zIndex:2})).hide(),n.start(i)},dragStart:function(n){d.isTouch&&!l.isEventSelected(c)&&l.selectEvent(c),e=!0,r.handleSegMouseout(t,n),r.segDragStart(t,n),l.hideEvent(c)},hitOver:function(e,o,u){var h;t.hit&&(u=t.hit),(i=r.computeEventDrop(u.component.getHitSpan(u),e.component.getHitSpan(e),c))&&!a.isEventSpanAllowed(r.eventToSpan(i),c)&&(s(),i=null),i&&(h=l.renderDrag(i,t))?(h.addClass("fc-dragging"),d.isTouch||r.applyDragOpacity(h),n.hide()):n.show(),o&&(i=null)},hitOut:function(){l.unrenderDrag(),n.show(),i=null},hitDone:function(){o()},interactionEnd:function(s){delete t.component,n.stop(!i,function(){e&&(l.unrenderDrag(),r.segDragStop(t,s)),i?l.reportSegDrop(t,i,r.largeUnit,u,s):l.showEvent(c)}),r.segDragListener=null}});return d},buildSegSelectListener:function(t){var e=this,n=this.view,i=t.event;if(this.segDragListener)return this.segDragListener;var r=this.segDragListener=new re({dragStart:function(){r.isTouch&&!n.isEventSelected(i)&&n.selectEvent(i)},interactionEnd:function(){e.segDragListener=null}});return r},segDragStart:function(t,e){this.isDraggingSeg=!0,this.view.publiclyTrigger("eventDragStart",t.el[0],t.event,e,{})},segDragStop:function(t,e){this.isDraggingSeg=!1,this.view.publiclyTrigger("eventDragStop",t.el[0],t.event,e,{})},computeEventDrop:function(t,e,n){var i,r,s=this.view.calendar,o=t.start,l=e.start;return o.hasTime()===l.hasTime()?(i=this.diffDates(l,o),n.allDay&&W(i)?(r={start:n.start.clone(),end:s.getEventEnd(n),allDay:!1},s.normalizeEventTimes(r)):r=mt(n),r.start.add(i),r.end&&r.end.add(i)):r={start:l.clone(),end:null,allDay:!l.hasTime()},r},applyDragOpacity:function(t){var e=this.view.opt("dragOpacity");null!=e&&t.css("opacity",e)},externalDragStart:function(e,n){var i,r,s=this.view;s.opt("droppable")&&(i=t((n?n.item:null)||e.target),r=s.opt("dropAccept"),(t.isFunction(r)?r.call(i[0],i):i.is(r))&&(this.isDraggingExter
141nal||this.listenToExternalDrag(i,e,n)))},listenToExternalDrag:function(t,e,n){var i,r=this,l=this.view.calendar,a=Dt(t);(r.externalDragListener=new se(this,{interactionStart:function(){r.isDraggingExternal=!0},hitOver:function(t){(i=r.computeExternalDrop(t.component.getHitSpan(t),a))&&!l.isExternalSpanAllowed(r.eventToSpan(i),i,a.eventProps)&&(s(),i=null),i&&r.renderDrag(i)},hitOut:function(){i=null},hitDone:function(){o(),r.unrenderDrag()},interactionEnd:function(e){i&&r.view.reportExternalDrop(a,i,t,e,n),r.isDraggingExternal=!1,r.externalDragListener=null}})).startDrag(e)},computeExternalDrop:function(t,e){var n={start:this.view.calendar.applyTimezone(t.start),end:null};return e.startTime&&!n.start.hasTime()&&n.start.time(e.startTime),e.duration&&(n.end=n.start.clone().add(e.duration)),n},renderDrag:function(){},unrenderDrag:function(){},buildSegResizeListener:function(t,e){var n,i,r=this,l=this.view,a=l.calendar,u=t.el,c=t.event,d=a.getEventEnd(c);return this.segResizeListener=new se(this,{scroll:l.opt("dragScroll"),subjectEl:u,interactionStart:function(){n=!1},dragStart:function(e){n=!0,r.handleSegMouseout(t,e),r.segResizeStart(t,e)},hitOver:function(n,o,u){var h=r.getHitSpan(u),f=r.getHitSpan(n);(i=e?r.computeEventStartResize(h,f,c):r.computeEventEndResize(h,f,c))&&(a.isEventSpanAllowed(r.eventToSpan(i),c)?i.start.isSame(c.start.clone().stripZone())&&i.end.isSame(d.clone().stripZone())&&(i=null):(s(),i=null)),i&&(l.hideEvent(c),r.renderEventResize(i,t))},hitOut:function(){i=null,l.showEvent(c)},hitDone:function(){r.unrenderEventResize(),o()},interactionEnd:function(e){n&&r.segResizeStop(t,e),i?l.reportSegResize(t,i,r.largeUnit,u,e):l.showEvent(c),r.segResizeListener=null}})},segResizeStart:function(t,e){this.isResizingSeg=!0,this.view.publiclyTrigger("eventResizeStart",t.el[0],t.event,e,{})},segResizeStop:function(t,e){this.isResizingSeg=!1,this.view.publiclyTrigger("eventResizeStop",t.el[0],t.event,e,{})},computeEventStartResize:function(t,e,n){return this.computeEventResize("start",t,e,n)},computeEventEndResize:function(t,e,n){return this.computeEventResize("end",t,e,n)},computeEventResize:function(t,e,n,i){var r,s,o=this.view.calendar,l=this.diffDates(n[t],e[t]);return(r={start:i.start.clone(),end:o.getEventEnd(i),allDay:i.allDay}).allDay&&W(l)&&(r.allDay=!1,o.normalizeEventTimes(r)),r[t].add(l),r.start.isBefore(r.end)||(s=this.minResizeDuration||(i.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration),"start"==t?r.start=r.end.clone().subtract(s):r.end=r.start.clone().add(s)),r},renderEventResize:function(){},unrenderEventResize:function(){},getEventTimeText:function(t,e,n){return null==e&&(e=this.eventTimeFormat),null==n&&(n=this.displayEventEnd),this.displayEventTime&&t.start.hasTime()?n&&t.end?this.view.formatRange(t,e):t.start.format(e):""},getSegClasses:function(t,e,n){var i=this.view,r=["fc-event",t.isStart?"fc-start":"fc-not-start",t.isEnd?"fc-end":"fc-not-end"].concat(this.getSegCustomClasses(t));return e&&r.push("fc-draggable"),n&&r.push("fc-resizable"),i.isEventSelected(t.event)&&r.push("fc-selected"),r},getSegCustomClasses:function(t){var e=t.event;return[].concat(e.className,e.source?e.source.className:[])},getSegSkinCss:function(t){return{"background-color":this.getSegBackgroundColor(t),"border-color":this.getSegBorderColor(t),color:this.getSegTextColor(t)}},getSegBackgroundColor:function(t){return t.event.backgroundColor||t.event.color||this.getSegDefaultBackgroundColor(t)},getSegDefaultBackgroundColor:function(t){var e=t.event.source||{};return e.backgroundColor||e.color||this.view.opt("eventBackgroundColor")||this.view.opt("eventColor")},getSegBorderColor:function(t){return t.event.borderColor||t.event.color||this.getSegDefaultBorderColor(t)},getSegDefaultBorderColor:function(t){var e=t.event.source||{};return e.borderColor||e.color||this.view.opt("eventBorderColor")||this.view.opt("eventColor")},getSegTextColor:function(t){return t.event.textColor||this.getSegDefaultTextColor(t)},getSegDefaultTextColor:function(t){return(t.event.source||{}).textColor||this.view.opt("eventTextColor")},eventToSegs:function(t){return this.eventsToSegs([t])},eventToSpan:function(t){return this.eventToSpans(t)[0]}, 142eventToSpans:function(t){var e=this.eventToRange(t);return this.eventRangeToSpans(e,t)},eventsToSegs:function(e,n){var i=this,r=Et(e),s=[];return t.each(r,function(t,e){var r,o=[];for(r=0;r<e.length;r++)o.push(i.eventToRange(e[r]));if(St(e[0]))for(o=i.invertRanges(o),r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[0],n));else for(r=0;r<o.length;r++)s.push.apply(s,i.eventRangeToSegs(o[r],e[r],n))}),s},eventToRange:function(t){var e=this.view.calendar,n=t.start.clone().stripZone(),i=(t.end?t.end.clone():e.getDefaultEventEnd(null!=t.allDay?t.allDay:!t.start.hasTime(),t.start)).stripZone();return e.localizeMoment(n),e.localizeMoment(i),{start:n,end:i}},eventRangeToSegs:function(t,e,n){var i,r=this.eventRangeToSpans(t,e),s=[];for(i=0;i<r.length;i++)s.push.apply(s,this.eventSpanToSegs(r[i],e,n));return s},eventRangeToSpans:function(e){return[t.extend({},e)]},eventSpanToSegs:function(t,e,n){var i,r,s=n?n(t):this.spanToSegs(t);for(i=0;i<s.length;i++)(r=s[i]).event=e,r.eventStartMS=+t.start,r.eventDurationMS=t.end-t.start;return s},invertRanges:function(t){var e,n,i=this.view,r=i.start.clone(),s=i.end.clone(),o=[],l=r;
142for(t.sort(bt),e=0;e<t.length;e++)(n=t[e]).start>l&&o.push({start:l,end:n.start}),l=n.end;return l<s&&o.push({start:l,end:s}),o},sortEventSegs:function(t){t.sort(lt(this,"compareEventSegs"))},compareEventSegs:function(t,e){return t.eventStartMS-e.eventStartMS||e.eventDurationMS-t.eventDurationMS||e.event.allDay-t.event.allDay||M(t.event,e.event,this.view.eventOrderSpecs)}}),Ot.pluckEventDateProps=mt,Ot.isBgEvent=yt,Ot.dataAttrPrefix="";var de=Ot.DayTableMixin={breakOnWeeks:!1,dayDates:null,dayIndices:null,daysPerRow:null,rowCnt:null,colCnt:null,colHeadFormat:null,updateDayTable:function(){for(var t,e,n,i=this.view,r=this.start.clone(),s=-1,o=[],l=[];r.isBefore(this.end);)i.isHiddenDay(r)?o.push(s+.5):(s++,o.push(s),l.push(r.clone())),r.add(1,"days");if(this.breakOnWeeks){for(e=l[0].day(),t=1;t<l.length&&l[t].day()!=e;t++);n=Math.ceil(l.length/t)}else n=1,t=l.length;this.dayDates=l,this.dayIndices=o,this.daysPerRow=t,this.rowCnt=n,this.updateDayTableCols()},updateDayTableCols:function(){this.colCnt=this.computeColCnt(),this.colHeadFormat=this.view.opt("columnFormat")||this.computeColHeadFormat()},computeColCnt:function(){return this.daysPerRow},getCellDate:function(t,e){return this.dayDates[this.getCellDayIndex(t,e)].clone()},getCellRange:function(t,e){var n=this.getCellDate(t,e);return{start:n,end:n.clone().add(1,"days")}},getCellDayIndex:function(t,e){return t*this.daysPerRow+this.getColDayIndex(e)},getColDayIndex:function(t){return this.isRTL?this.colCnt-1-t:t},getDateDayIndex:function(t){var e=this.dayIndices,n=t.diff(this.start,"days");return n<0?e[0]-1:n>=e.length?e[e.length-1]+1:e[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(t){var e,n,i,r,s,o=this.daysPerRow,l=this.view.computeDayRange(t),a=this.getDateDayIndex(l.start),u=this.getDateDayIndex(l.end.clone().subtract(1,"days")),c=[];for(e=0;e<this.rowCnt;e++)i=(n=e*o)+o-1,r=Math.max(a,n),s=Math.min(u,i),(r=Math.ceil(r))<=(s=Math.floor(s))&&c.push({row:e,firstRowDayIndex:r-n,lastRowDayIndex:s-n,isStart:r===a,isEnd:s===u});return c},sliceRangeByDay:function(t){var e,n,i,r,s,o,l=this.daysPerRow,a=this.view.computeDayRange(t),u=this.getDateDayIndex(a.start),c=this.getDateDayIndex(a.end.clone().subtract(1,"days")),d=[];for(e=0;e<this.rowCnt;e++)for(i=(n=e*l)+l-1,r=n;r<=i;r++)s=Math.max(u,r),o=Math.min(c,r),(s=Math.ceil(s))<=(o=Math.floor(o))&&d.push({row:e,firstRowDayIndex:s-n,lastRowDayIndex:o-n,isStart:s===u,isEnd:o===c});return d},renderHeadHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.renderHeadTrHtml()+"</thead></table></div>"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return"<tr>"+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+"</tr>"},renderHeadDateCellsHtml:function(){var t,e,n=[];for(t=0;t<this.colCnt;t++)e=this.getCellDate(0,t),n.push(this.renderHeadDateCellHtml(e));return n.join("")},renderHeadDateCellHtml:function(t,e,n){var i=this.view,r=["fc-day-header",i.widgetHeaderClass];return 1===this.rowCnt?r=r.concat(this.getDayClasses(t,!0)):r.push("fc-"+_t[t.day()]),'<th class="'+r.join(" ")+'"'+(1===this.rowCnt?' data-date="'+t.format("YYYY-MM-DD")+'"':"")+(e>1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+i.buildGotoAnchorHtml({date:t,forceOff:this.rowCnt>1||1===this.colCnt},tt(t.format(this.colHeadFormat)))+"</th>"},renderBgTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+"</tr>"},renderBgIntroHtml:function(){return this.renderIntroHtml()},renderBgCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderBgCellHtml(n));return i.join("")},renderBgCellHtml:function(t,e){var n=this.view,i=this.getDayClasses(t);return i.unshift("fc-day",n.widgetContentClass),'<td class="'+i.join(" ")+'" data-date="'+t.format("YYYY-MM-DD")+'"'+(e?" "+e:"")+"></td>"},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},he=Ot.DayGrid=ce.extend(de,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(t){var e,n,i=this.view,r=this.rowCnt,s=this.colCnt,o="";for(e=0;e<r;e++)o+=this.renderDayRowHtml(e,t);for(this.el.html(o),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new ie({els:this.rowEls,isVertical:!0}),this.colCoordCache=new ie({els:this.cellEls.slice(0,this.colCnt),isHorizontal:!0}),e=0;e<r;e++)for(n=0;n<s;n++)i.publiclyTrigger("dayRender",null,this.getCellDate(e,n),this.getCellEl(e,n))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var t=this.buildBusinessHourSegs(!0);this.renderFill("businessHours",t,"bgevent")},unrenderBusinessHours:function(){this.unrenderFill("businessHours")},renderDayRowHtml:function(t,e){var n=["fc-row","fc-week",this.view.widgetContentClass];return e&&n.push("fc-rigid"),'<div class="'+n.join(" ")+'"><div class="fc-bg"><table>'+this.renderBgTrHtml(t)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.renderNumberTrHtml(t)+"</thead>":"")+"</table></div></div>"},renderNumberTrHtml:function(t){return"<tr>"+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+"</tr>"},renderNumberIntroHtml:function(){return this.renderIntroHtml()},renderNumberCellsHtml:function(t){var e,n,i=[];for(e=0;e<this.colCnt;e++)n=this.getCellDate(t,e),i.push(this.renderNumberCellHtml(n));return i.join("")},renderNumberCellHtml:function(t){var e,n,i="";return this.view.dayNumbersVisible||this.view.cellWeekNumbersVisible?((e=this.getDayClasses(t)).unshift("fc-day-top"),this.view.cellWeekNumbersVisible&&(n="ISO"===t._locale._fullCalendar_weekCalc?1:t._locale.firstDayOfWeek()),i+='<td class="'+e.join(" ")+'" data-date="'+t.format()+'">',this.view.cellWeekNumbersVisible&&t.day()==n&&(i+=this.view.buildGotoAnchorHtml({date:t,type:"week"},{"class":"fc-week-number"},t.format("w"))),this.view.dayNumbersVisible&&(i+=this.view.buildGotoAnchorHtml(t,{"class":"fc-day-number"},t.date())),i+="</td>"):"<td/>"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(t){var e,n,i=this.sliceRangeByRow(t);for(e=0;e<i.length;e++)n=i[e],this.isRTL?(n.leftCol=this.daysPerRow-1-n.lastRowDayIndex,n.rightCol=this.daysPerRow-1-n.firstRowDayIndex):(n.leftCol=n.firstRowDayIndex,n.rightCol=n.lastRowDayIndex);return i},prepareHits:function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},releaseHits:function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},queryHit:function(t,e){if(this.colCoordCache.isLeftInBounds(t)&&this.rowCoordCache.isTopInBounds(e)){var n=this.colCoordCache.getHorizontalIndex(t),i=this.rowCoordCache.getVerticalIndex(e);if(null!=i&&null!=n)return this.getCellHit(i,n)}},getHitSpan:function(t){return this.getCellRange(t.row,t.col)},getHitEl:function(t){return this.getCellEl(t.row,t.col)},getCellHit:function(t,e){return{row:t,col:e,component:this,left:this.colCoordCache.getLeftOffset(e),right:this.colCoordCache.getRightOffset(e),top:this.rowCoordCache.getTopOffset(t),bottom:this.rowCoordCache.getBottomOffset(t)}},getCellEl:function(t,e){return this.cellEls.eq(t*this.colCnt+e)},renderDrag:function(t,e){if(this.renderHighlight(this.eventToSpan(t)),e&&e.component!==this)return this.renderEventLocationHelper(t,e)},unrenderDrag:function(){this.unrenderHighlight(),this.unrenderHelper()},renderEventResize:function(t,e){return this.renderHighlight(this.eventToSpan(t)),this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHighlight(),this.unrenderHelper()},renderHelper:function(e,n){var i,r=[],s=this.eventToSegs(e);return s=this.renderFgSegEls(s),i=this.renderSegRows(s),this.rowEls.each(function(e,s){var o,l=t(s),a=t('<div class="fc-helper-skeleton"><table/></div>');o=n&&n.row===e?n.el.position().top:l.find(".fc-content-skeleton tbody").position().top,a.css("top",o).find("table").append(i[e].tbodyEl),l.append(a),r.push(a[0])}),this.helperEls=t(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,n,i){var r,s,o,l=[];for(n=this.renderFillSegEls(e,n),r=0;r<n.length;r++)s=n[r],o=this.renderFillRow(e,s,i),this.rowEls.eq(s.row).append(o),l.push(o[0]);return this.elsByFill[e]=t(l),n},renderFillRow:function(e,n,i){var r,s,o=this.colCnt,l=n.leftCol,a=n.rightCol+1;return i=i||e.toLowerCase(),s=(r=t('<div class="fc-'+i+'-skeleton"><table><tr/></table></div>')).find("tr"),l>0&&s.append('<td colspan="'+l+'"/>'),s.append(n.el.attr("colspan",a-l)),a<o&&s.append('<td colspan="'+(o-a)+'"/>'),this.bookendCells(s),r}});he.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),ce.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return ce.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return ce.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,i){t(i).find(".fc-content-skeleton > table").append(n[e].tbodyEl)}),e},unrenderFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n<e.length;n++)i.push(this.renderSegRow(n,e[n]));return i},fgSegHtml:function(t,e){var n,i,r=this.view,s=t.event,o=r.isEventDraggable(s),l=!e&&s.allDay&&t.isStart&&r.isEventResizableFromStart(s),a=!e&&s.allDay&&t.isEnd&&r.isEventResizableFromEnd(s),u=this.getSegClasses(t,o,l||a),c=nt(this.getSegSkinCss(t)),d="";return u.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getEventTimeText(s))&&(d='<sp
142an class="fc-time">'+tt(n)+"</span>"),i='<span class="fc-title">'+(tt(s.title||"")||" ")+"</span>",'<a class="'+u.join(" ")+'"'+(s.url?' href="'+tt(s.url)+'"':"")+(c?' style="'+c+'"':"")+'><div class="fc-content">'+(this.isRTL?i+" "+d:d+" "+i)+"</div>"+(l?'<div class="fc-resizer fc-start-resizer" />':"")+(a?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},renderSegRow:function(e,n){function i(e){for(;o<e;)(c=(m[r-1]||[])[o])?c.attr("rowspan",parseInt(c.attr("rowspan")||1,10)+1):(c=t("<td/>"),l.append(c)),v[r][o]=c,m[r][o]=c,o++}var r,s,o,l,a,u,c,d=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),g=t("<tbody/>"),p=[],v=[],m=[];for(r=0;r<f;r++){if(s=h[r],o=0,l=t("<tr/>"),p.push([]),v.push([]),m.push([]),s)for(a=0;a<s.length;a++){for(i((u=s[a]).leftCol),c=t('<td class="fc-event-container"/>').append(u.el),u.leftCol!=u.rightCol?c.attr("colspan",u.rightCol-u.leftCol+1):m[r][o]=c;o<=u.rightCol;)v[r][o]=c,p[r][o]=u,o++;l.append(c)}i(d),this.bookendCells(l),g.append(l)}return{row:e,tbodyEl:g,cellMatrix:v,segMatrix:p,segLevels:h,segs:n}},buildSegLevels:function(t){var e,n,i,r=[];for(this.sortEventSegs(t),e=0;e<t.length;e++){for(n=t[e],i=0;i<r.length&&Tt(n,r[i]);i++);n.level=i,(r[i]||(r[i]=[])).push(n)}for(i=0;i<r.length;i++)r[i].sort(Ct);return r},groupSegRows:function(t){var e,n=[];for(e=0;e<this.rowCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].row].push(t[e]);return n}}),he.mixin({segPopover:null,popoverSegs:null,removeSegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(t){var e,n,i=this.rowStructs||[];for(e=0;e<i.length;e++)this.unlimitRow(e),!1!==(n=!!t&&("number"==typeof t?t:this.computeRowLevelLimit(e)))&&this.limitRow(e,n)},computeRowLevelLimit:function(e){function n(e,n){s=Math.max(s,t(n).outerHeight())}var i,r,s,o=this.rowEls.eq(e).height(),l=this.rowStructs[e].tbodyEl.children();for(i=0;i<l.length;i++)if(r=l.eq(i).removeClass("fc-limited"),s=0,r.find("> td > :first-child").each(n),r.position().top+s>o)return i;return!1},limitRow:function(e,n){function i(i){for(;b<i;)(u=S.getCellSegs(e,b,n)).length&&(h=s[n-1][b],y=S.renderMoreLink(e,b,u),m=t("<div/>").append(y),h.append(m),E.push(m[0])),b++}var r,s,o,l,a,u,c,d,h,f,g,p,v,m,y,S=this,w=this.rowStructs[e],E=[],b=0;if(n&&n<w.segLevels.length){for(r=w.segLevels[n-1],s=w.cellMatrix,o=w.tbodyEl.children().slice(n).addClass("fc-limited").get(),l=0;l<r.length;l++){for(i((a=r[l]).leftCol),d=[],c=0;b<=a.rightCol;)u=this.getCellSegs(e,b,n),d.push(u),c+=u.length,b++;if(c){for(f=(h=s[n-1][a.leftCol]).attr("rowspan")||1,g=[],p=0;p<d.length;p++)v=t('<td class="fc-more-cell"/>').attr("rowspan",f),u=d[p],y=this.renderMoreLink(e,a.leftCol+p,[a].concat(u)),m=t("<div/>").append(y),v.append(m),g.push(v[0]),E.push(v[0]);h.addClass("fc-limited").after(t(g)),o.push(h[0])}}i(this.colCnt),w.moreEls=t(E),w.limitedEls=t(o)}},unlimitRow:function(t){var e=this.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},renderMoreLink:function(e,n,i){var r=this,s=this.view;return t('<a class="fc-more"/>').text(this.getMoreLinkText(i.length)).on("click",function(o){var l=s.opt("eventLimitClick"),a=r.getCellDate(e,n),u=t(this),c=r.getCellEl(e,n),d=r.getCellSegs(e,n),h=r.resliceDaySegs(d,a),f=r.resliceDaySegs(i,a);"function"==typeof l&&(l=s.publiclyTrigger("eventLimitClick",null,{date:a,dayEl:c,moreEl:u,segs:h,hiddenSegs:f},o)),"popover"===l?r.showSegPopover(e,n,u,h):"string"==typeof l&&s.calendar.zoomTo(a,l)})},showSegPopover:function(t,e,n,i){var r,s,o=this,l=this.view,a=n.parent();r=1==this.rowCnt?l.el:this.rowEls.eq(t),s={className:"fc-more-popover",content:this.renderSegPopoverContent(t,e,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:l.opt("popoverViewportConstrain"),hide:function(){if(o.popoverSegs)for(var t,e=0;e<o.popoverSegs.length;++e)t=o.popoverSegs[e],l.publiclyTrigger("eventDestroy",t.event,t.event,t.el);o.segPopover.removeElement(),o.segPopover=null,o.popoverSegs=null}},this.isRTL?s.right=a.offset().left+a.outerWidth()+1:s.left=a.offset().left-1,this.segPopover=new ne(s),this.segPopover.show(),this.bindSegHandlersToEl(this.segPopover.el)},renderSegPopoverContent:function(e,n,i){var r,s=this.view,o=s.opt("theme"),l=this.getCellDate(e,n).format(s.opt("dayPopoverFormat")),a=t('<div class="fc-header '+s.widgetHeaderClass+'"><span class="fc-close '+(o?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+tt(l)+'</span><div class="fc-clear"/></div><div class="fc-body '+s.widgetContentClass+'"><div class="fc-event-container"></div></div>'),u=a.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r<i.length;r++)this.hitsNeeded(),i[r].hit=this.getCellHit(e,n),this.hitsNotNeeded(),u.append(i[r].el);return a}
142,resliceDaySegs:function(e,n){var i=t.map(e,function(t){return t.event}),r=n.clone(),s={start:r,end:r.clone().add(1,"days")};return e=this.eventsToSegs(i,function(t){var e=F(t,s);return e?[e]:[]}),this.sortEventSegs(e),e},getMoreLinkText:function(t){var e=this.view.opt("eventLimitText");return"function"==typeof e?e(t):"+"+t+" "+e},getCellSegs:function(t,e,n){for(var i,r=this.rowStructs[t].segMatrix,s=n||0,o=[];s<r.length;)(i=r[s][e])&&o.push(i),s++;return o}});var fe=Ot.TimeGrid=ce.extend(de,{slotDuration:null,snapDuration:null,snapsPerSlot:null,minTime:null,maxTime:null,labelFormat:null,labelInterval:null,colEls:null,slatContainerEl:null,slatEls:null,nowIndicatorEls:null,colCoordCache:null,slatCoordCache:null,constructor:function(){ce.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.colEls=this.el.find(".fc-day"),this.slatContainerEl=this.el.find(".fc-slats"),this.slatEls=this.slatContainerEl.find("tr"),this.colCoordCache=new ie({els:this.colEls,isHorizontal:!0}),this.slatCoordCache=new ie({els:this.slatEls,isVertical:!0}),this.renderContentSkeleton()},renderHtml:function(){return'<div class="fc-bg"><table>'+this.renderBgTrHtml(0)+'</table></div><div class="fc-slats"><table>'+this.renderSlatRowHtml()+"</table></div>"},renderSlatRowHtml:function(){for(var t,n,i,r=this.view,s=this.isRTL,o="",l=e.duration(+this.minTime);l<this.maxTime;)t=this.start.clone().time(l),n=ot(_(l,this.labelInterval)),i='<td class="fc-axis fc-time '+r.widgetContentClass+'" '+r.axisStyleAttr()+">"+(n?"<span>"+tt(t.format(this.labelFormat))+"</span>":"")+"</td>",o+='<tr data-time="'+t.format("HH:mm:ss")+'"'+(n?"":' class="fc-minor"')+">"+(s?"":i)+'<td class="'+r.widgetContentClass+'"/>'+(s?i:"")+"</tr>",l.add(this.slotDuration);return o},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),s=i.opt("snapDuration");r=e.duration(r),s=s?e.duration(s):r,this.slotDuration=r,this.snapDuration=s,this.snapsPerSlot=r/s,this.minResizeDuration=s,this.minTime=e.duration(i.opt("minTime")),this.maxTime=e.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),t.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?e.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(t){var n,i,r;for(n=Le.length-1;n>=0;n--)if(ot(r=_(i=e.duration(Le[n]),t))&&r>1)return i;return e.duration(t)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(t,e){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(t)&&r.isTopInBounds(e)){var s=i.getHorizontalIndex(t),o=r.getVerticalIndex(e);if(null!=s&&null!=o){var l=r.getTopOffset(o),a=r.getHeight(o),u=(e-l)/a,c=Math.floor(u*n),d=l+c/n*a,h=l+(c+1)/n*a;return{col:s,snap:o*n+c,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:d,bottom:h}}}},getHitSpan:function(t){var e=this.getCellDate(0,t.col),n=this.computeSnapTime(t.snap);return e.time(n),{start:e,end:e.clone().add(this.snapDuration)}},getHitEl:function(t){return this.colEls.eq(t.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(t){return e.duration(this.minTime+this.snapDuration*t)},spanToSegs:function(t){var e,n=this.sliceRangeByTimes(t);for(e=0;e<n.length;e++)this.isRTL?n[e].col=this.daysPerRow-1-n[e].dayIndex:n[e].col=n[e].dayIndex;return n},sliceRangeByTimes:function(t){var e,n,i,r=[];for(n=0;n<this.daysPerRow;n++)(e=F(t,{start:(i=this.dayDates[n].clone()).clone().time(this.minTime),end:i.clone().time(this.maxTime)}))&&(e.dayIndex=n,r.push(e));return r}
142,updateSize:function(t){this.slatCoordCache.build(),t&&this.updateSegVerticals([].concat(this.fgSegs||[],this.bgSegs||[],this.businessSegs||[]))},getTotalSlatHeight:function(){return this.slatContainerEl.outerHeight()},computeDateTop:function(t,n){return this.computeTimeTop(e.duration(t-n.clone().stripTime()))},computeTimeTop:function(t){var e,n,i=this.slatEls.length,r=(t-this.minTime)/this.slotDuration;return r=Math.max(0,r),r=Math.min(i,r),e=Math.floor(r),n=r-(e=Math.min(e,i-1)),this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},renderDrag:function(t,e){if(e)return this.renderEventLocationHelper(t,e);this.renderHighlight(this.eventToSpan(t))},unrenderDrag:function(){this.unrenderHelper(),this.unrenderHighlight()},renderEventResize:function(t,e){return this.renderEventLocationHelper(t,e)},unrenderEventResize:function(){this.unrenderHelper()},renderHelper:function(t,e){return this.renderHelperSegs(this.eventToSegs(t),e)},unrenderHelper:function(){this.unrenderHelperSegs()},renderBusinessHours:function(){this.renderBusinessSegs(this.buildBusinessHourSegs())},unrenderBusinessHours:function(){this.unrenderBusinessSegs()},getNowIndicatorUnit:function(){return"minute"},renderNowIndicator:function(e){var n,i=this.spanToSegs({start:e,end:e}),r=this.computeDateTop(e,e),s=[];for(n=0;n<i.length;n++)s.push(t('<div class="fc-now-indicator fc-now-indicator-line"></div>').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&s.push(t('<div class="fc-now-indicator fc-now-indicator-arrow"></div>').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=t(s)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(t){this.renderHighlightSegs(this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});fe.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var e,n,i="";for(e=0;e<this.colCnt;e++)i+='<td><div class="fc-content-col"><div class="fc-event-container fc-helper-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>';n=t('<div class="fc-content-skeleton"><table><tr>'+i+"</tr></table></div>"),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(t){return t=this.renderFgSegsIntoContainers(t,this.fgContainerEls),this.fgSegs=t,t},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(e,n){var i,r,s,o=[];for(e=this.renderFgSegsIntoContainers(e,this.helperContainerEls),i=0;i<e.length;i++)r=e[i],n&&n.col===r.col&&(s=n.el,r.el.css({left:s.css("left"),right:s.css("right"),"margin-left":s.css("margin-left"),"margin-right":s.css("margin-right")})),o.push(r.el[0]);return this.helperSegs=e,t(o)},unrenderHelperSegs:function(){this.unrenderNamedSegs("helperSegs")},renderBgSegs:function(t){return t=this.renderFillSegEls("bgEvent",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.bgContainerEls),this.bgSegs=t,t},unrenderBgSegs:function(){this.unrenderNamedSegs("bgSegs")},renderHighlightSegs:function(t){t=this.renderFillSegEls("highlight",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.highlightContainerEls),this.highlightSegs=t},unrenderHighlightSegs:function(){this.unrenderNamedSegs("highlightSegs")}
142,renderBusinessSegs:function(t){t=this.renderFillSegEls("businessHours",t),this.updateSegVerticals(t),this.attachSegsByCol(this.groupSegsByCol(t),this.businessContainerEls),this.businessSegs=t},unrenderBusinessSegs:function(){this.unrenderNamedSegs("businessSegs")},groupSegsByCol:function(t){var e,n=[];for(e=0;e<this.colCnt;e++)n.push([]);for(e=0;e<t.length;e++)n[t[e].col].push(t[e]);return n},attachSegsByCol:function(t,e){var n,i,r;for(n=0;n<this.colCnt;n++)for(i=t[n],r=0;r<i.length;r++)e.eq(n).append(i[r].el)},unrenderNamedSegs:function(t){var e,n=this[t];if(n){for(e=0;e<n.length;e++)n[e].el.remove();this[t]=null}},renderFgSegsIntoContainers:function(t,e){var n,i;for(t=this.renderFgSegEls(t),n=this.groupSegsByCol(t),i=0;i<this.colCnt;i++)this.updateFgSegCoords(n[i]);return this.attachSegsByCol(n,e),t},fgSegHtml:function(t,e){var n,i,r,s=this.view,o=t.event,l=s.isEventDraggable(o),a=!e&&t.isStart&&s.isEventResizableFromStart(o),u=!e&&t.isEnd&&s.isEventResizableFromEnd(o),c=this.getSegClasses(t,l,a||u),d=nt(this.getSegSkinCss(t));return c.unshift("fc-time-grid-event","fc-v-event"),s.isMultiDayEvent(o)?(t.isStart||t.isEnd)&&(n=this.getEventTimeText(t),i=this.getEventTimeText(t,"LT"),r=this.getEventTimeText(t,null,!1)):(n=this.getEventTimeText(o),i=this.getEventTimeText(o,"LT"),r=this.getEventTimeText(o,null,!1)),'<a class="'+c.join(" ")+'"'+(o.url?' href="'+tt(o.url)+'"':"")+(d?' style="'+d+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+tt(r)+'" data-full="'+tt(i)+'"><span>'+tt(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+tt(o.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(u?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},updateSegVerticals:function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},computeSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)(n=t[e]).top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},assignSegVerticals:function(t){var e,n;for(e=0;e<t.length;e++)(n=t[e]).el.css(this.generateSegVerticalCss(n))},generateSegVerticalCss:function(t){return{top:t.top,bottom:-t.bottom}},updateFgSegCoords:function(t){this.computeSegVerticals(t),this.computeFgSegHorizontals(t),this.assignSegVerticals(t),this.assignFgSegHorizontals(t)},computeFgSegHorizontals:function(t){var e,n,i;if(this.sortEventSegs(t),xt(e=Ht(t)),n=e[0]){for(i=0;i<n.length;i++)Rt(n[i]);for(i=0;i<n.length;i++)this.computeFgSegForwardBack(n[i],0,0)}},computeFgSegForwardBack:function(t,e,n){var i,r=t.forwardSegs;if(t.forwardCoord===undefined)for(r.length?(this.sortForwardSegs(r),this.computeFgSegForwardBack(r[0],e+1,n),t.forwardCoord=r[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-n)/(e+1),i=0;i<r.length;i++)this.computeFgSegForwardBack(r[i],0,t.forwardCoord)},sortForwardSegs:function(t){t.sort(lt(this,"compareForwardSegs"))},compareForwardSegs:function(t,e){return e.forwardPressure-t.forwardPressure||(t.backwardCoord||0)-(e.backwardCoord||0)||this.compareEventSegs(t,e)},assignFgSegHorizontals:function(t){var e,n;for(e=0;e<t.length;e++)(n=t[e]).el.css(this.generateFgSegHorizontalCss(n)),n.bottom-n.top<30&&n.el.addClass("fc-short")},generateFgSegHorizontalCss:function(t){var e,n,i=this.view.opt("slotEventOverlap"),r=t.backwardCoord,s=t.forwardCoord,o=this.generateSegVerticalCss(t);return i&&(s=Math.min(1,r+2*(s-r))),this.isRTL?(e=1-s,n=r):(e=r,n=1-s),o.zIndex=t.level+1,o.left=100*e+"%",o.right=100*n+"%",i&&t.forwardPressure&&(o[this.isRTL?"marginLeft":"marginRight"]=20),o}});var ge=Ot.View=ct.extend(te,ee,{type:null,name:null,title:null,calendar:null,options:null,el:null,isDateSet:!1,isDateRendered:!1,dateRenderQueue:null,isEventsBound:!1,isEventsSet:!1,isEventsRendered:!1,eventRenderQueue:null,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isRTL:!1,isSelected:!1,selectedEvent:null,eventOrderSpecs:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,isNowIndicatorRendered:null,initialNowDate:null,initialNowQueriedMs:null,nowIndicatorTimeoutID:null,nowIndicatorIntervalID:null,constructor:function(t,n,i,r){this.calendar=t,this.type=this.name=n,this.options=i,this.intervalDuration=r||e.duration(1,"day"),this.nextDayThreshold=e.duration(this.opt("nextDayThreshold")),this.initThemingProps(),this.initHiddenDays(),this.isRTL=this.opt("isRTL"),this.eventOrderSpecs=L(this.opt("eventOrder")),this.dateRenderQueue=new gt,this.eventRenderQueue=new gt(this.opt("eventRenderWait")),this.initialize()},initialize:function(){},opt:function(t){return this.options[t]},publiclyTrigger:function(t,e){var n=this.calendar;return n.publiclyTrigger.apply(n,[t,e||this].concat(Array.prototype.slice.call(arguments,2),[this]))},rejectOn:function(t,e){var n=this;return new ft(function(i,r){function s(){n.off(t,r)}n.one(t,r),e.then(function(t){s(),i(t)},function(){s(),r()})})},setRange:function(e){t.extend(this,e),this.updateTitle()},computeRange:function(t){var e,n,i=A(this.intervalDuration),r=t.clone().startOf(i),s=r.clone().add(this.intervalDuration);return/year|month|week|day/.test(i)?(r.stripTime(),s.stripTime()):(r.hasTime()||(r=this.calendar.time(0)),s.hasTime()||(s=this.calendar.time(0))),e=r.clone(),e=this.skipHiddenDays(e),n=s.clone(),{intervalUnit:i,intervalStart:r,intervalEnd:s,start:e,end:n=this.skipHiddenDays(n,-1,!0)}},computePrevDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(t){return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(t,e){return this.intervalDuration.as("days")<=1&&this.isHiddenD
142ay(t)&&(t=this.skipHiddenDays(t,e)).startOf("day"),t},updateTitle:function(){this.title=this.computeTitle(),this.calendar.setToolbarsTitle(this.title)},computeTitle:function(){var t,e;return"year"===this.intervalUnit||"month"===this.intervalUnit?(t=this.intervalStart,e=this.intervalEnd):(t=this.start,e=this.end),this.formatRange({start:this.calendar.applyTimezone(t),end:this.calendar.applyTimezone(e)},this.opt("titleFormat")||this.computeTitleFormat(),this.opt("titleRangeSeparator"))},computeTitleFormat:function(){return"year"==this.intervalUnit?"YYYY":"month"==this.intervalUnit?this.opt("monthYearFormat"):this.intervalDuration.as("days")>1?"ll":"LL"},formatRange:function(t,e,n){var i=t.end;return i.hasTime()||(i=i.clone().subtract(1)),Xt(t.start,i,e,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||tt(this.opt("allDayText"))},buildGotoAnchorHtml:function(e,n,i){var r,s,o,l;return t.isPlainObject(e)?(r=e.date,s=e.type,o=e.forceOff):r=e,l={date:(r=Ot.moment(r)).format("YYYY-MM-DD"),type:s||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+it(n):"",i=i||"",!o&&this.opt("navLinks")?"<a"+n+' data-goto="'+tt(JSON.stringify(l))+'">'+i+"</a>":"<span"+n+">"+i+"</span>"},setElement:function(t){this.el=t,this.bindGlobalHandlers(),this.renderSkeleton()},removeElement:function(){this.unsetDate(),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},unrenderSkeleton:function(){},setDate:function(t){var e=this.isDateSet;this.isDateSet=!0,this.handleDate(t,e),this.trigger(e?"dateReset":"dateSet",t)},unsetDate:function(){this.isDateSet&&(this.isDateSet=!1,this.handleDateUnset(),this.trigger("dateUnset"))},handleDate:function(t){var e=this;this.unbindEvents(),this.requestDateRender(t).then(function(){e.bindEvents()})},handleDateUnset:function(){this.unbindEvents(),this.requestDateUnrender()},requestDateRender:function(t){var e=this;return this.dateRenderQueue.add(function(){return e.executeDateRender(t)})},requestDateUnrender:function(){var t=this;return this.dateRenderQueue.add(function(){return t.executeDateUnrender()})},executeDateRender:function(t){var e=this;return t?this.captureInitialScroll():this.captureScroll(),this.freezeHeight(),this.executeDateUnrender().then(function(){t&&e.setRange(e.computeRange(t)),e.render&&e.render(),e.renderDates(),e.updateSize(),e.renderBusinessHours(),e.startNowIndicator(),e.thawHeight(),e.releaseScroll(),e.isDateRendered=!0,e.onDateRender(),e.trigger("dateRender")})},executeDateUnrender:function(){var t=this;return t.isDateRendered?this.requestEventsUnrender().then(function(){t.unselect(),t.stopNowIndicator(),t.triggerUnrender(),t.unrenderBusinessHours(),t.unrenderDates(), 143t.destroy&&t.destroy(),t.isDateRendered=!1,t.trigger("dateUnrender")}):ft.resolve()},onDateRender:function(){this.triggerRender()},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.publiclyTrigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.publiclyTrigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(ae.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},unbindGlobalHandlers:function(){this.stopListeningTo(ae.get())},initThemingProps:function(){var t=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=t+"-widget-header",this.widgetContentClass=t+"-widget-content",this.highlightStateClass=t+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var t,n,i,r=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit())&&(n=lt(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(t).add(1,t)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+e.duration(1,t),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(){},unrenderNowIndicator:function(){},updateSize:function(t){t&&this.captureScroll(),this.updateHeight(t),this.updateWidth(t),this.updateNowIndicator(),t&&this.releaseScroll()},updateWidth:function(){},updateHeight:function(){var t=this.calendar;this.setHeight(t.getSuggestedViewHeight(),t.isHeightAuto())},setHeight:function(){},capturedScroll:null,capturedScrollDepth:0,captureScroll:function(){return!this.capturedScrollDepth++&&(this.capturedScroll=this.isDateRendered?this.queryScroll():{},!0)},captureInitialScroll:function(e){this.captureScroll()&&(this.capturedScroll.isInitial=!0,e?t.extend(this.capturedScroll,e):this.capturedScroll.isComputed=!0)},releaseScroll:function(){var e=this.capturedScroll,n=this.discardScroll();e.isComputed&&(n?t.extend(e,this.computeInitialScroll()):e=null),e&&(e.isInitial?this.hardSetScroll(e):this.setScroll(e))},discardScroll:function(){return!--this.capturedScrollDepth&&(this.capturedScroll=null,!0)},computeInitialScroll:function(){return{}},queryScroll:function(){return{}},hardSetScroll:function(t){var e=this,n=function(){e.setScroll(t)};n(),setTimeout(n,0)},setScroll:function(){},freezeHeight:function(){this.calendar.freezeContentHeight()},thawHeight:function(){this.calendar.thawContentHeight()},bindEvents:function(){var t=this;this.isEventsBound||(this.isEventsBound=!0,this.rejectOn("eventsUnbind",this.requestEvents()).then(function(e){t.listenTo(t.calendar,"eventsReset",t.setEvents),t.setEvents(e)}))},unbindEvents:function(){this.isEventsBound&&(this.isEventsBound=!1,this.stopListeningTo(this.calendar,"eventsReset"),this.unsetEvents(),this.trigger("eventsUnbind"))},setEvents:function(t){var e=this.isEventSet;this.isEventsSet=!0,this.handleEvents(t,e),this.trigger(e?"eventsReset":"eventsSet",t)},unsetEvents:function(){this.isEventsSet&&(this.isEventsSet=!1,this.handleEventsUnset(),this.trigger("eventsUnset"))},whenEventsSet:function(){var t=this;return this.isEventsSet?ft.resolve(this.getCurrentEvents()):new ft(function(e){t.one("eventsSet",e)})},handleEvents:function(t){this.requestEventsRender(t)},handleEventsUnset:function(){this.requestEventsUnrender()},requestEventsRender:function(t){var e=this;return this.eventRenderQueue.add(function(){return e.executeEventsRender(t)})},requestEventsUnrender:function(){var t=this;return this.isEventsRendered?this.eventRenderQueue.addQuickly(function(){return t.executeEventsUnrender()}):ft.resolve()},requestCurrentEventsRender:function(){if(!this.isEventsSet)return ft.reject();this.requestEventsRender(this.getCurrentEvents())},executeEventsRender:function(t){var e=this;return this.captureScroll(),this.freezeHeight(),this.executeEventsUnrender().then(function(){e.renderEvents(t),e.thawHeight(),e.releaseScroll(),e.isEventsRendered=!0,e.onEventsRender(),e.trigger("eventsRender")})},executeEventsUnrender:function(){return this.isEventsRendered&&(this.onBeforeEventsUnrender(),this.captureScroll(),this.freezeHeight(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.thawHeight(),this.releaseScroll(),this.isEventsRendered=!1,this.trigger("eventsUnrender")),ft.resolve()},onEventsRender:function(){this.renderedEventSegEach(function(t){this.publiclyTrigger("eventAfterRender",t.event,t.event,t.el)}),this.publiclyTrigger("eventAfterAllRender")},onBeforeEventsUnrender:function(){this.renderedEventSegEach(function(t){this.publiclyTrigger("eventDestroy",t.event,t.event,t.el)})},renderEvents:function(){},unrenderEvents:function(){},requestEvents:function(){return this.calendar.requestEvents(this.start,this.end)},getCurrentEvents:function(){return this.calendar.getPrunedEventCache()},resolveEventEl:function(e,n){var i=this.publiclyTrigger("eventRender",e,e,n);
143return!1===i?n=null:i&&!0!==i&&(n=t(i)),n},showEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","")},t)},hideEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","hidden")},t)},renderedEventSegEach:function(t,e){var n,i=this.getEventSegs();for(n=0;n<i.length;n++)e&&i[n].event._id!==e._id||i[n].el&&t.call(this,i[n])},getEventSegs:function(){return[]},isEventDraggable:function(t){return this.isEventStartEditable(t)},isEventStartEditable:function(t){return J(t.startEditable,(t.source||{}).startEditable,this.opt("eventStartEditable"),this.isEventGenerallyEditable(t))},isEventGenerallyEditable:function(t){return J(t.editable,(t.source||{}).editable,this.opt("editable"))},reportSegDrop:function(t,e,n,i,r){var s=this.calendar,o=s.mutateSeg(t,e,n),l=function(){o.undo(),s.reportEventChange()};this.triggerEventDrop(t.event,o.dateDelta,l,i,r),s.reportEventChange()},triggerEventDrop:function(t,e,n,i,r){this.publiclyTrigger("eventDrop",i[0],t,e,n,r,{})},reportExternalDrop:function(e,n,i,r,s){var o,l,a=e.eventProps;a&&(o=t.extend({},a,n),l=this.calendar.renderEvent(o,e.stick)[0]),this.triggerExternalDrop(l,n,i,r,s)},triggerExternalDrop:function(t,e,n,i,r){this.publiclyTrigger("drop",n[0],e.start,i,r),t&&this.publiclyTrigger("eventReceive",null,t)},renderDrag:function(){},unrenderDrag:function(){},isEventResizableFromStart:function(t){return this.opt("eventResizableFromStart")&&this.isEventResizable(t)},isEventResizableFromEnd:function(t){return this.isEventResizable(t)},isEventResizable:function(t){var e=t.source||{};return J(t.durationEditable,e.durationEditable,this.opt("eventDurationEditable"),t.editable,e.editable,this.opt("editable"))},reportSegResize:function(t,e,n,i,r){var s=this.calendar,o=s.mutateSeg(t,e,n),l=function(){o.undo(),s.reportEventChange()};this.triggerEventResize(t.event,o.durationDelta,l,i,r),s.reportEventChange()},triggerEventResize:function(t,e,n,i,r){this.publiclyTrigger("eventResize",i[0],t,e,n,r,{})},select:function(t,e){this.unselect(e),this.renderSelection(t),this.reportSelection(t,e)},renderSelection:function(){},reportSelection:function(t,e){this.isSelected=!0,this.triggerSelect(t,e)},triggerSelect:function(t,e){this.publiclyTrigger("select",null,this.calendar.applyTimezone(t.start),this.calendar.applyTimezone(t.end),e)},unselect:function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.publiclyTrigger("unselect",null,t))},unrenderSelection:function(){},selectEvent:function(t){this.selectedEvent&&this.selectedEvent===t||(this.unselectEvent(),this.renderedEventSegEach(function(t){t.el.addClass("fc-selected")},t),this.selectedEvent=t)},unselectEvent:function(){this.selectedEvent&&(this.renderedEventSegEach(function(t){t.el.removeClass("fc-selected")},this.selectedEvent),this.selectedEvent=null)},isEventSelected:function(t){return this.selectedEvent&&this.selectedEvent._id===t._id},handleDocumentMousedown:function(t){w(t)&&this.processUnselect(t)},processUnselect:function(t){this.processRangeUnselect(t),this.processEventUnselect(t)},processRangeUnselect:function(e){var n;this.isSelected&&this.opt("unselectAuto")&&((n=this.opt("unselectCancel"))&&t(e.target).closest(n).length||this.unselect(e))},processEventUnselect:function(e){this.selectedEvent&&(t(e.target).closest(".fc-selected").length||this.unselectEvent())},triggerDayClick:function(t,e,n){this.publiclyTrigger("dayClick",e,this.calendar.applyTimezone(t.start),n)},initHiddenDays:function(){var e,n=this.opt("hiddenDays")||[],i=[],r=0;for(!1===this.opt("weekends")&&n.push(0,6),e=0;e<7;e++)(i[e]=-1!==t.inArray(e,n))||r++;if(!r)throw"invalid hiddenDays";this.isHiddenDayHash=i},isHiddenDay:function(t){return e.isMoment(t)&&(t=t.day()),this.isHiddenDayHash[t]},skipHiddenDays:function(t,e,n){var i=t.clone();for(e=e||1;this.isHiddenDayHash[(i.day()+(n?e:0)+7)%7];)i.add(e,"days");return i},computeDayRange:function(t){var e,n=t.start.clone().stripTime(),i=t.end,r=null;return i&&(r=i.clone().stripTime(),(e=+i.time())&&e>=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1}}),pe=Ot.Scroller=ct.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(t){t=t||{},this.overflowX=t.overflowX||t.overflow||"auto",this.overflowY=t.overflowY||t.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=t('<div class="fc-scroller"></div>')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(t){var e=this.overflowX,n=this.overflowY;
143t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},setHeight:function(t){this.scrollEl.height(t)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(t){this.scrollEl.scrollTop(t)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return p(this.scrollEl)}});Lt.prototype.proxyCall=function(t){var e=Array.prototype.slice.call(arguments,1),n=[];return this.items.forEach(function(i){n.push(i[t].apply(i,e))}),n};var ve=Ot.Calendar=ct.extend({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,footer:null,loadingLevel:0,constructor:Bt,initialize:function(){},populateOptionsHash:function(){var t,e,i;t=J(this.dynamicOverrides.locale,this.overrides.locale),(e=me[t])||(t=ve.defaults.locale,e=me[t]||{}),i=J(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,ve.defaults.isRTL)?ve.rtlDefaults:{},this.dirDefaults=i,this.localeDefaults=e,this.options=n([ve.defaults,i,e,this.overrides,this.dynamicOverrides]),Nt(this.options)},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var n,i,r;if(-1!=t.inArray(e,Yt))for(n=this.header.getViewsWithButtons(),t.each(Ot.views,function(t){n.push(t)}),i=0;i<n.length;i++)if((r=this.getViewSpec(n[i]))&&r.singleUnit==e)return r},buildViewSpec:function(t){for(var i,r,s,o,l=this.overrides.views||{},a=[],u=[],c=[],d=t;d;)i=At[d],r=l[d],d=null,"function"==typeof i&&(i={"class":i}),i&&(a.unshift(i),u.unshift(i.defaults||{}),s=s||i.duration,d=d||i.type),r&&(c.unshift(r),s=s||r.duration,d=d||r.type);return(i=q(a)).type=t,!!i["class"]&&(s&&(s=e.duration(s)).valueOf()&&(i.duration=s,o=A(s),1===s.as(o)&&(i.singleUnit=o,c.unshift(l[o]||{}))),i.defaults=n(u),i.overrides=n(c),this.buildViewSpecOptions(i),this.buildViewSpecButtonText(i,t),i)},buildViewSpecOptions:function(t){t.options=n([ve.defaults,t.defaults,this.dirDefaults,this.localeDefaults,this.overrides,t.overrides,this.dynamicOverrides]),Nt(t.options)},buildViewSpecButtonText:function(t,e){function n(n){var i=n.buttonText||{};return i[e]||(t.buttonTextKey?i[t.buttonTextKey]:null)||(t.singleUnit?i[t.singleUnit]:null)}t.buttonTextOverride=n(this.dynamicOverrides)||n(this.overrides)||t.overrides.buttonText,t.buttonTextDefault=n(this.localeDefaults)||n(this.dirDefaults)||t.defaults.buttonText||n(ve.defaults)||(t.duration?this.humanizeDuration(t.duration):null)||e},instantiateView:function(t){var e=this.getViewSpec(t);return new e["class"](this,t,e.options,e.duration)},isValidViewType:function(t){return Boolean(this.getViewSpec(t))},pushLoading:function(){this.loadingLevel++||this.publiclyTrigger("loading",null,!0,this.view)},popLoading:function(){--this.loadingLevel||this.publiclyTrigger("loading",null,!1,this.view)},buildSelectSpan:function(t,e){var n=this.moment(t).stripZone();return{start:n,end:e?this.moment(e).stripZone():n.hasTime()?n.clone().add(this.defaultTimedEventDuration):n.clone().add(this.defaultAllDayEventDuration)}}});ve.mixin(te),ve.mixin({optionHandlers:null,bindOption:function(t,e){this.bindOptions([t],e)},bindOptions:function(t,e){var n,i={func:e,names:t};for(n=0;n<t.length;n++)this.registerOptionHandlerObj(t[n],i);this.triggerOptionHandlerObj(i)},registerOptionHandlerObj:function(t,e){(this.optionHandlers[t]||(this.optionHandlers[t]=[])).push(e)},triggerOptionHandlers:function(t){var e,n=this.optionHandlers[t]||[];for(e=0;e<n.length;e++)this.triggerOptionHandlerObj(n[e])},triggerOptionHandlerObj:function(t){var e,n=t.names,i=[];for(e=0;e<n.length;e++)i.push(this.options[n[e]]);t.func.apply(this,i)}}),ve.defaults={titleRangeSeparator:" \u2013 ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},allDayText:"all-day",theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},ve.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},ve.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var me=Ot.locales={};Ot.datepickerLocale=function(e,n,i){var r=me[e]||(me[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(ye,function(t,e){r[t]=e(i)}),t.datepicker&&(t.datepicker.regional[n]=t.datepicker.regional[e]=i,t.datepicker.regional.en=t.datepicker.regional[""],t.datepicker.setDefaults(i))},Ot.locale=function(e,i){var r,s;r=me[e]||(me[e]={}),i&&(r=me[e]=n([r,i])),s=Ft(e),t.each(Se,function(t,e){null==r[t]&&(r[t]=e(s,r))}),ve.defaults.locale=e};var ye={buttonText:function(t){return{prev:et(t.prevText),next:et(t.nextText),today:et(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},Se={dayOfMonthFormat:function(t,e){var n=t.longDateFormat("l");
143return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(t){return t.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}},we={smallDayDateFormat:function(t){return t.isRTL?"D dd":"dd D"},weekFormat:function(t){return t.isRTL?"w[ "+t.weekNumberTitle+"]":"["+t.weekNumberTitle+" ]w"},smallWeekFormat:function(t){return t.isRTL?"w["+t.weekNumberTitle+"]":"["+t.weekNumberTitle+"]w"}};Ot.locale("en",ve.englishDefaults),Ot.sourceNormalizers=[],Ot.sourceFetchers=[];var Ee={dataType:"json",cache:!1},be=1;ve.prototype.mutateSeg=function(t,e){return this.mutateEvent(t.event,e)},ve.prototype.normalizeEvent=function(){},ve.prototype.spanContainsSpan=function(t,e){var n=t.start.clone().stripZone(),i=this.getEventEnd(t).stripZone();return e.start>=n&&e.end<=i},ve.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;n<r.length;n++)i=r[n],e&&e._id===i._id||s.push(i);return s},ve.prototype.isEventSpanAllowed=function(t,e){var n=e.source||{},i=J(e.constraint,n.constraint,this.options.eventConstraint),r=J(e.overlap,n.overlap,this.options.eventOverlap);return this.isSpanAllowed(t,i,r,e)&&(!this.options.eventAllow||!1!==this.options.eventAllow(t,e))},ve.prototype.isExternalSpanAllowed=function(e,n,i){var r,s;return i&&(r=t.extend({},i,n),s=this.expandEvent(this.buildEventFromInput(r))[0]),s?this.isEventSpanAllowed(e,s):this.isSelectionSpanAllowed(e)},ve.prototype.isSelectionSpanAllowed=function(t){return this.isSpanAllowed(t,this.options.selectConstraint,this.options.selectOverlap)&&(!this.options.selectAllow||!1!==this.options.selectAllow(t))},ve.prototype.isSpanAllowed=function(t,e,n,i){var r,s,o,l,a,u;if(null!=e&&(r=this.constraintToEvents(e))){for(s=!1,l=0;l<r.length;l++)if(this.spanContainsSpan(r[l],t)){s=!0;break}if(!s)return!1}for(o=this.getPeerEvents(t,i),l=0;l<o.length;l++)if(a=o[l],this.eventIntersectsRange(a,t)){if(!1===n)return!1;if("function"==typeof n&&!n(a,i))return!1;if(i){if(!1===(u=J(a.overlap,(a.source||{}).overlap)))return!1;if("function"==typeof u&&!u(i,a))return!1}}return!0},ve.prototype.constraintToEvents=function(t){return"businessHours"===t?this.getCurrentBusinessHourEvents():"object"==typeof t?null!=t.start?this.expandEvent(this.buildEventFromInput(t)):null:this.clientEvents(t)},ve.prototype.eventIntersectsRange=function(t,e){var n=t.start.clone().stripZone(),i=this.getEventEnd(t).stripZone();return e.start<i&&e.end>n};var De={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};ve.prototype.getCurrentBusinessHourEvents=function(t){return this.computeBusinessHourEvents(t,this.options.businessHours)},ve.prototype.computeBusinessHourEvents=function(e,n){return!0===n?this.expandBusinessHourEvents(e,[{}]):t.isPlainObject(n)?this.expandBusinessHourEvents(e,[n]):t.isArray(n)?this.expandBusinessHourEvents(e,n,!0):[]},ve.prototype.expandBusinessHourEvents=function(e,n,i){var r,s,o=this.getView(),l=[];for(r=0;r<n.length;r++)s=n[r],i&&!s.dow||(s=t.extend({},De,s),e&&(s.start=null,s.end=null),l.push.apply(l,this.expandEvent(this.buildEventFromInput(s),o.start,o.end)));return l};var Te=Ot.BasicView=ge.extend({scroller:null,dayGridClass:he,dayGrid:null,dayNumbersVisible:!1,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1,weekNumberWidth:null,headContainerEl:null,headRowEl:null,initialize:function(){this.dayGrid=this.instantiateDayGrid(),this.scroller=new pe({overflowX:"hidden",overflowY:"auto"})},instantiateDayGrid:function(){return new(this.dayGridClass.extend(Ce))(this)},setRange:function(t){ge.prototype.setRange.call(this,t),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(t)},computeRange:function(t){var e=ge.prototype.computeRange.call(this,t);return/year|month/.test(e.intervalUnit)&&(e.start.startOf("week"),e.start=this.skipHiddenDays(e.start),e.end.weekday()&&(e.end.add(1,"week").startOf("week"),e.end=this.skipHiddenDays(e.end,-1,!0))),e},renderDates:function(){this.dayNumbersVisible=this.dayGrid.rowCnt>1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-day-grid-container"),n=t('<div class="fc-day-grid" />').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"></td></tr></tbody></table>'},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=u(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,s,o=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),o&&"number"==typeof o&&this.dayGrid.limitRows(o),n=this.computeScrollerHeight(t),this.setGridHeight(n,e),o&&"number"!=typeof o&&this.dayGrid.limitRows(o),e||(this.scroller.setHeight(n),((s=this.scroller.getScrollbarWidths()).left||s.right)&&(i(this.headRowEl,s),n=this.computeScrollerHeight(t),this.scroller.setHeight(n)),this.scroller.lockOverflow(s))},computeScrollerHeight:function(t){return t-c(this.el,this.scroller.el)},setGridHeight:function(t,e){e?a(this.dayGrid.rowEls):l(this.dayGrid.rowEls,t,!0)},computeInitialScroll:function(){return{top:0}},queryScroll:function(){return{top:this.scroller.getScrollTop()}},setScroll:function(t){this.scroller.setScrollTop(t.top)},hitsNeeded:function(){this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(t,e){return this.dayGrid.queryHit(t,e)},getHitSpan:function(t){return this.dayGrid.getHitSpan(t)},getHitEl:function(t){return this.dayGrid.getHitEl(t)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),Ce={renderHeadIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<th class="fc-week-number '+t.widgetHeaderClass+'" '+t.weekNumberStyleAttr()+"><span>"+tt(t.opt("weekNumberTitle"))+"</span></th>":""},renderNumberIntroHtml:function(t){var e=this.view,n=this.getCellDate(t,0);return e.colWeekNumbersVisible?'<td class="fc-week-number" '+e.weekNumberStyleAttr()+">"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"</td>":""},renderBgIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<td class="fc-week-number '+t.widgetContentClass+'" '+t.weekNumberStyleAttr()+"></td>":""},renderIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"></td>":""}},He=Ot.MonthView=Te.extend({computeRange:function(t){var e,n=Te.prototype.computeRange.call(this,t);return this.isFixedWeeks()&&(e=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-e,"weeks")),n},setGridHeight:function(t,e){e&&(t*=this.rowCnt/6),l(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});At.basic={"class":Te},At.basicDay={type:"basic",duration:{days:1}},At.basicWeek={type:"basic",duration:{weeks:1}},At.month={"class":He,duration:{months:1},defaults:{fixedWeekCount:!0}};var xe=Ot.AgendaView=ge.extend({scroller:null,timeGridClass:fe,timeGrid:null,dayGridClass:he,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new pe({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){return new(this.timeGridClass.extend(Re))(this)},instantiateDayGrid:function(){return new(this.dayGridClass.extend(Ie))(this)},setRange:function(t){ge.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-time-grid-container"),n=t('<div class="fc-time-grid" />').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.timeGrid.setElement(n),this.timeGrid.renderDates(),this.bottomRuleEl=t('<hr class="fc-divider '+this.widgetHeaderClass+'"/>').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'<table><thead class="fc-head"><tr><td class="fc-head-container '+this.widgetHeaderClass+'"></td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+"</td></tr></tbody></table>"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(t){this.timeGrid.renderNowIndicator(t)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(t){this.timeGrid.updateSize(t),ge.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=u(this.el.find(".fc-axis"))},setHeight:function(t,e){var n,s,o;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),(n=this.opt("eventLimit"))&&"number"!=typeof n&&(n=ke),n&&this.dayGrid.limitRows(n)),e||(s=this.computeScrollerHeight(t),this.scroller.setHeight(s),((o=this.scroller.getScrollbarWidths()).left||o.right)&&(i(this.noScrollRowEls,o),s=this.computeScrollerHeight(t),this.scroller.setHeight(s)),this.scroller.lockOverflow(o),this.timeGrid.getTotalSlatHeight()<s&&this.bottomRuleEl.show())},computeScrollerHeight:function(t){return t-c(this.el,this.scroller.el)},computeInitialScroll:function(){var t=e.duration(this.opt("scrollTime")),n=this.timeGrid.computeTimeTop(t);return(n=Math.ceil(n))&&n++,{top:n}},queryScroll:function(){return{top:this.scroller.getScrollTop()}},setScroll:function(t){this.scroller.setScrollTop(t.top)},hitsNeeded:function(){this.timeGrid.hitsNeeded(),this.dayGrid&&this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.timeGrid.hitsNotNeeded(),this.dayGrid&&this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.timeGrid.prepareHits(),this.dayGrid&&this.dayGrid.prepareHits()},releaseHits:function(){this.timeGrid.releaseHits(),this.dayGrid&&this.dayGrid.releaseHits()},queryHit:function(t,e){var n=this.timeGrid.queryHit(t,e);return!n&&this.dayGrid&&(n=this.dayGrid.queryHit(t,e)),n},getHitSpan:function(t){return t.component.getHitSpan(t)},getHitEl:function(t){return t.component.getHitEl(t)},renderEvents:function(t){var e,n=[],i=[];for(e=0;e<t.length;e++)t[e].allDay?n.push(t[e]):i.push(t[e]);this.timeGrid.renderEvents(i),this.dayGrid&&this.dayGrid.renderEvents(n),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},unrenderEvents:function(){this.timeGrid.unrenderEvents(),this.dayGrid&&this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return t.start.hasTime()?this.timeGrid.renderDrag(t,e):this.dayGrid?this.dayGrid.renderDrag(t,e):void 0},unrenderDrag:function(){this.timeGrid.unrenderDrag(),this.dayGrid&&this.dayGrid.unrenderDrag()},renderSelection:function(t){t.start.hasTime()||t.end.hasTime()?this.timeGrid.renderSelection(t):this.dayGrid&&this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.timeGrid.unrenderSelection(),this.dayGrid&&this.dayGrid.unrenderSelection()}}),Re={renderHeadIntroHtml:function(){var t,e=this.view;return e.opt("weekNumbers")?(t=this.start.format(e.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+">"+e.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},tt(t))+"</th>"):'<th class="fc-axis '+e.widgetHeaderClass+'" '+e.axisStyleAttr()+"></th>"},renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},Ie={renderBgIntroHtml:function(){var t=this.view;return'<td class="fc-axis '+t.widgetContentClass+'" '+t.axisStyleAttr()+"><span>"+t.getAllDayHtml()+"</span></td>"},renderIntroHtml:function(){return'<td class="fc-axis" '+this.view.axisStyleAttr()+"></td>"}},ke=5,Le=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];At.agenda={"class":xe,defaults:{allDaySlot:!0,slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},At.agendaDay={type:"agenda",duration:{days:1}},At.agendaWeek={type:"agenda",duration:{weeks:1}};
143var Me=ge.extend({grid:null,scroller:null,initialize:function(){this.grid=new Be(this),this.scroller=new pe({overflowX:"hidden",overflowY:"auto"})},setRange:function(t){ge.prototype.setRange.call(this,t),this.grid.setRange(t)},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(t){this.scroller.setHeight(this.computeScrollerHeight(t))},computeScrollerHeight:function(t){return t-c(this.el,this.scroller.el)},renderEvents:function(t){this.grid.renderEvents(t)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(){return!1},isEventDraggable:function(){return!1}}),Be=ce.extend({segSelector:".fc-list-item", 144hasDayInteractions:!1,spanToSegs:function(t){for(var e,n=this.view,i=n.start.clone().time(0),r=0,s=[];i<n.end;)if((e=F(t,{start:i,end:i.clone().add(1,"day")}))&&(e.dayIndex=r,s.push(e)),i.add(1,"day"),r++,e&&!e.isEnd&&t.end.hasTime()&&t.end<i.clone().add(this.view.nextDayThreshold)){e.end=t.end.clone(),e.isEnd=!0;break}return s},computeEventTimeFormat:function(){return this.view.opt("mediumTimeFormat")},handleSegClick:function(e,n){var i;ce.prototype.handleSegClick.apply(this,arguments),t(n.target).closest("a[href]").length||(i=e.event.url)&&!n.isDefaultPrevented()&&(window.location.href=i)},renderFgSegs:function(t){return(t=this.renderFgSegEls(t)).length?this.renderSegList(t):this.renderEmptyMessage(),t},renderEmptyMessage:function(){this.el.html('<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+tt(this.view.opt("noEventsMessage"))+"</div></div></div>")},renderSegList:function(e){var n,i,r,s=this.groupSegsByDay(e),o=t('<table class="fc-list-table"><tbody/></table>'),l=o.find("tbody");for(n=0;n<s.length;n++)if(i=s[n])for(l.append(this.dayHeaderHtml(this.view.start.clone().add(n,"days"))),this.sortEventSegs(i),r=0;r<i.length;r++)l.append(i[r].el);this.el.empty().append(o)},groupSegsByDay:function(t){var e,n,i=[];for(e=0;e<t.length;e++)(i[(n=t[e]).dayIndex]||(i[n.dayIndex]=[])).push(n);return i},dayHeaderHtml:function(t){var e=this.view,n=e.opt("listDayFormat"),i=e.opt("listDayAltFormat");return'<tr class="fc-list-heading" data-date="'+t.format("YYYY-MM-DD")+'"><td class="'+e.widgetHeaderClass+'" colspan="3">'+(n?e.buildGotoAnchorHtml(t,{"class":"fc-list-heading-main"},tt(t.format(n))):"")+(i?e.buildGotoAnchorHtml(t,{"class":"fc-list-heading-alt"},tt(t.format(i))):"")+"</td></tr>"},fgSegHtml:function(t){var e,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(t)),r=this.getSegBackgroundColor(t),s=t.event,o=s.url;return e=s.allDay?n.getAllDayHtml():n.isMultiDayEvent(s)?t.isStart||t.isEnd?tt(this.getEventTimeText(t)):n.getAllDayHtml():tt(this.getEventTimeText(s)),o&&i.push("fc-has-url"),'<tr class="'+i.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+n.widgetContentClass+'">'+(e||"")+"</td>":"")+'<td class="fc-list-item-marker '+n.widgetContentClass+'"><span class="fc-event-dot"'+(r?' style="background-color:'+r+'"':"")+'></span></td><td class="fc-list-item-title '+n.widgetContentClass+'"><a'+(o?' href="'+tt(o)+'"':"")+">"+tt(t.event.title||"")+"</a></td></tr>"}});return At.list={"class":Me,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},At.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},At.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},At.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},At.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},Ot}); 145 146!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}t.ui=t.ui||{},t.ui.version="1.12.1";var i=0,s=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{(s=t._data(n,"events"))&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0],l=h+"-"+(e=e.split(".")[1]);return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?void(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(r[e]=s)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n&&a.widgetEventPrefix||e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o}
vendor: 4,236 bytes, line 146
146,t.widget.extend=function(e){for(var i,n,o=s.call(arguments,1),a=0,r=o.length;r>a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r))!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(s=e.split(".")).shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})}
vendor: 6,604 bytes, line 146
146,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,u=h[2];u?n.on(l,u,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,u=/^\w+/,c=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),e===(i=o.offsetWidth)&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:!s&&!n?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=t.extend({},n);var c,d,p,m,g,_,v=t(n.of),w=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(w),b=(n.collision||"flip").split(" "),x={};return _=s(v),v[0].preventDefault&&(n.at="left top"),d=_.width,p=_.height,m=_.offset,g=t.extend({},m),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],n[this]=[u.exec(i[0])[0],u.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===n.at[0]?g.left+=d:"center"===n.at[0]&&(g.left+=d/2),"bottom"===n.at[1]?g.top+=p:"center"===n.at[1]&&(g.top+=p/2),c=e(x.at,d,p),g.left+=c[0],g.top+=c[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),u=h.outerHeight(),f=i(this,"marginLeft"),_=i(this,"marginTop"),M=l+f+i(this,"marginRight")+y.width,C=u+_+i(this,"marginBottom")+y.height,D=t.extend({},g),k=e(x.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=u:"center"===n.my[1]&&(D.top-=u/2),D.left+=k[0],D.top+=k[1],s={marginLeft:f,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[b[e]]&&t.ui.position[b[e]][i](D,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:u,collisionPosition:s,collisionWidth:M,collisionHeight:C,offset:[c[0]+k[0],c[1]+k[1]],my:n.my,at:n.at,within:w,elem:h})}),n.using&&(r=function(t){var e=m.left-D.left,i=e+d-l,s=m.top-D.top,r=s+p-u,c={target:{element:v,left:m.left,top:m.top,width:d,height:p},element:{element:h,left:D.left,top:D.top,width:l,height:u},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>d&&d>a(e+i)&&(c.horizontal="center"),u>p&&p>a(s+r)&&(c.vertical="middle"),c.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,c)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>
vendor: 13,501 bytes, line 146
146=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,u=l-h,c=l+e.collisionWidth-r-h,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];0>u?(0>(i=t.left+f+d+p+e.collisionWidth-r-o)||a(u)>i)&&(t.left+=f+d+p):c>0&&(((s=t.left-e.collisionPosition.marginLeft+f+d+p-h)>0||c>a(s))&&(t.left+=f+d+p))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,u=l-h,c=l+e.collisionHeight-r-h,f="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];0>u?(0>(s=t.top+f+d+p+e.collisionHeight-r-o)||a(u)>s)&&(t.top+=f+d+p):c>0&&(((i=t.top-e.collisionPosition.marginTop+f+d+p-h)>0||c>a(i))&&(t.top+=f+d+p))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(o=(n=i.parentNode).name,!(!i.href||!o||"map"!==n.nodeName.toLowerCase())&&((a=t("img[usemap='#"+o+"']")).length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled)&&((h=t(i).closest("fieldset")[0])&&(r=!h.disabled)):r="a"===l&&i.href||s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),(s=this.attr("id"))&&(o=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(s&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));(n>i||n===i&&(e===l._lastChangedValue||l.values(e)===u.min))&&(n=i,o=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),r=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&(!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value(
146)},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=!this._animateOff&&r.animate,u={};this._hasMultipleValues()?this.handles.each(function(s){i=(h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())*100,u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),!0===h.options.range&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})}); 147!function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){var u=this;!e&&u._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,u._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery); 148if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;return t(this).one("bsTransitionEnd",function(){i=!0}),setTimeout(function(){i||t(o).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.supp
vendor: 4,798 bytes, line 148
148ort.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=(s=n.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t("#"===s?[]:s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.7",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target).closest(".btn");e.call(o,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".
148item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse")?"toggle":n.data();i.call(s,a)})}(jQuery),function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=(i=e.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=e(o),s={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(n[0],i.target)||(n.trigger(i=t.
vendor: 4,663 bytes, line 148
148Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.7",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=e(n),a=s.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",r))}return!1}},a.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var o=t(this);if(i.preventDefault(),i.stopPropagation(),!o.is(".disabled, :disabled")){var n=e(o),a=n.hasClass("open");if(!a&&27!=i.which||a&&27==i.which)return 27==i.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.disabled):visible a",l=n.find(".dropdown-menu"+r);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&h<l.length-1&&h++,~h||(h=0),l.eq(h).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=o,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),function(t){"use strict";function e(e,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);s||n.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](o):a.show&&s.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),n&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):o.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("key
148down.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var o=t(this),n=o.attr("href"),s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),o.data());o.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.is(":visible")&&o.trigger("focus")})}),e.call(s,a,this)})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);
vendor: 13,108 bytes, lines 148-149
148return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue())return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(r);h&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var f=r,u=this.getPosition(this.$viewport);r="bottom"==r&&d.bottom+c>u.bottom?"top":"top"==r&&d.top-c<u.top?"bottom":"right"==r&&d.right+p>u.width?"left":"left"==r&&d.left-p<u.left?"right":r,s.removeClass(f).addClass(r)}var g=this.getCalculatedOffset(r,d,p,c);this.applyPlacement(g,r);var m=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(i.TRANSITION_DURATION):m()}},i.prototype.applyPlacement=function(e,i){var o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top+=a,e.left+=r,t.offset.setOffset(o[0],t.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),o.addClass("in");var l=o[0].offsetWidth,h=o[0].offsetHeight;"top"==i&&h!=s&&(e.top=e.top+s-h);var d=this.getViewportAdjustedDelta(i,e,l,h);d.left?e.left+=d.left:e.top+=d.top;var p=/top|bottom/.test(i),c=p?2*d.left-n+l:2*d.top-s+h,f=p?"offsetWidth":"offsetHeight";o.offset(e),this.replaceArrow(c,o[0][f],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function o(){"in"!=n.hoverState&&s.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,s=t(this.$tip),a=t.Event("hide.bs."+this.type);if(this.$element.trigger(a),!a.isDefaultPrevented())return s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),this.hoverState=null,this},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){var i=(e=e||this.$element)[0],o="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var s=window.SVGElement&&i instanceof window.SVGElement,a=o?{top:0,left:0}:s?null:e.offset(),r={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=o?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,r,l,a)},i.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},i.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},i.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&((i=t(e.currentTarget).data("bs."+this.type))||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.7",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),function(t){"use strict";function e(i,o){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var o=t(this),n=o.data("bs.scrollspy"),s="object"==typeof i&&i;n||o.data("bs.scrollspy",n=new e(this,s)),"string"==typeof i&&n[i]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#./.test(n)&&t(n);return s&&s.length&&s.is(":visible")&&[[s[i]().top+o,n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=o)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(void 0===n[t+1]||e<n[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',o=t(i).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var o=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=o,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab") 149;n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=(o=e.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.7",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window}
149,i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&l+(r?a:e)>=t-o&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery); 150!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){var e=window.Slick||{};(e=function(){function e(e,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" data-role="none" role="button" tabindex="0" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(e),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(e).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,"undefined"!=typeof document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}var t=0;return e}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(0>t||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),(!0===e.options.centerMode||!0===e.options.swipeToSlide)&&(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,208 bytes, line 150
150ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;s>i;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){for(o in s=null,r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n=this,r=i(e.currentTarget);switch(r.is("a")&&e.preventDefault(),r.is("li")||(r=r.closest("li")),o=n.slideCount%n.options.slidesToScroll!=0?0:(n.slideCount-n.currentSlide)%n.options.slidesToScroll,e.data.message){case"previous":s=0===o?n.options.slidesToScroll:n.options.slidesToShow-o,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide-s,!1,t);break;case"next":s=0===o?n.options.slidesToScroll:o,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide+s,!1,t);break;case"index":var l=0===e.data.index?0:e.data.index||r.index()*n.options.slidesToScroll;n.slideHandler(n.checkNavigable(l),!1,t),r.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(t=0,i>(e=this.getNavigableIndexes())[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide)),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
150slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).off("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s=this,n=0;return s.slideOffset=0,t=s.$slides.first().outerHeight(!0),!0===s.options.infinite?(s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideWidth*s.options.slidesToShow*-1,n=t*s.options.slidesToShow*-1),s.slideCount%s.options.slidesToScroll!=0&&i+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(i>s.slideCount?(s.slideOffset=(s.options.slidesToShow-(i-s.slideCount))*s.slideWidth*-1,n=(s.options.slidesToShow-(i-s.slideCount))*t*-1):(s.slideOffset=s.slideCount%s.options.slidesToScroll*s.slideWidth*-1,n=s.slideCount%s.options.slidesToScroll*t*-1))):i+s.options.slidesToShow>s.slideCount&&(s.slideOffset=(i+s.options.slidesToShow-s.slideCount)*s.slideWidth,n=(i+s.options.slidesToShow-s.slideCount)*t),s.slideCount<=s.options.slidesToShow&&(s.slideOffset=0,n=0),!0===s.options.centerMode&&!0===s.options.infinite?s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)-s.slideWidth:!0===s.options.centerMode&&(s.slideOffset=0,s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)),e=!1===s.options.vertical?i*s.slideWidth*-1+s.slideOffset:i*t*-1+n,!0===s.options.variableWidth&&(o=s.slideCount<=s.options.slidesToShow||!1===s.options.infinite?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow),e=!0===s.options.rtl?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===s.options.centerMode&&(o=s.slideCount<=s.options.slidesToShow||!1===s.options.infinite?s.$slideTrack.children(".slick-slide").eq(i):s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow+1),e=!0===s.options.rtl?o[0]?-1*(s.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(s.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);i>t;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){return n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft?(e=n,!1):void 0}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
150parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this;e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),e.$slideTrack.attr("role","listbox"),e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){i(this).attr({role:"option","aria-describedby":"slick-slide"+e.instanceUid+t})}),null!==e.$dots&&e.$dots.attr("role","tablist").find("li").each(function(t){i(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+e.instanceUid+t,id:"slick-slide"+e.instanceUid+t})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
150,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).on("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=document.createElement("img");o.onload=function(){e.animate({opacity:0}
150,100,function(){e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy").removeClass("slick-loading")}),s.$slider.trigger("lazyLoaded",[s,e,t])})},o.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),s.$slider.trigger("lazyLoadError",[s,e,t])},o.src=t})}var t,o,s=this;!0===s.options.centerMode?!0===s.options.infinite?o=(t=s.currentSlide+(s.options.slidesToShow/2+1))+s.options.slidesToShow+2:(t=Math.max(0,s.currentSlide-(s.options.slidesToShow/2+1)),o=s.options.slidesToShow/2+1+2+s.currentSlide):(t=s.options.infinite?s.options.slidesToShow+s.currentSlide:s.currentSlide,o=Math.ceil(t+s.options.slidesToShow),!0===s.options.fade&&(t>0&&t--,o<=s.slideCount&&o++)),e(s.$slider.find(".slick-slide").slice(t,o)),s.slideCount<=s.options.slidesToShow?e(s.$slider.find(".slick-slide")):s.currentSlide>=s.slideCount-s.options.slidesToShow?e(s.$slider.find(".slick-cloned").slice(0,s.options.slidesToShow)):0===s.currentSlide&&e(s.$slider.find(".slick-cloned").slice(-1*s.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),!0===e.options.accessibility&&e.initADA())},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n=this,r=i("img[data-lazy]",n.$slider);r.length?(t=r.first(),o=t.attr("data-lazy"),(s=document.createElement("img")).onload=function(){t.attr("src",o).removeAttr("data-lazy").removeClass("slick-loading"),!0===n.options.adaptiveHeight&&n.setPosition(),n.$slider.trigger("lazyLoaded",[n,t,o]),n.progressiveLazyLoad()},s.onerror=function(){3>e?setTimeout(function(){n.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,t,o]),n.progressiveLazyLoad())},s.src=o):n.$slider.trigger("allImagesLoaded",[n])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){for(e in s.respondTo=s.options.respondTo||"window",n)if(o=s.breakpoints.length-1,t=n[e].breakpoint,n.hasOwnProperty(e)){for(;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;return"boolean"==typeof i?i=!0===(e=i)?0:o.slideCount-1:i=!0===e?--i:i,
150!(o.slideCount<1||0>i||i>o.slideCount-1)&&(o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,void o.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
150):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":"undefined"!=typeof arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),(void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.msTransition)&&!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode?(e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")):i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i, 151n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===n.options.lazyLoad&&n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;o>e;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));return s||(s=0),t.slideCount<=t.options.slidesToShow?(t.setSlideClasses(s),void t.asNavFor(s)):void t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;return e=e||!1,!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i||a.slideCount<=a.options.slidesToShow?void 0:(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(0>i||i>a.getDotCount()*a.options.slidesToScroll)?void(!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):!1===a.options.infinite&&!0===a.options.centerMode&&(0>i||i>a.slideCount-a.options.slidesToScroll)?void(!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=0>o?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
151o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&((l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide)),a.updateDots(),a.updateArrows(),!0===a.options.fade?(!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight()):void(!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s))))},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),0>(o=Math.round(180*t/Math.PI))&&(o=360-Math.abs(o)),45>=o&&o>=0?!1===s.options.rtl?"left":"right":360>=o&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&225>=o?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&135>=o?"down":"up":"vertical"},e.prototype.swipeEnd=function(){var i,e,t=this;if(t.dragging=!1,t.interrupted=!1,t.shouldClick=!(t.touchObject.swipeLength>10),void 0===t.touchObject.curX)return!1;if(!0===t.touchObject.edgeHit&&t.$slider.trigger("edge",[t,t.swipeDirection()]),t.touchObject.swipeLength>=t.touchObject.minSwipe){switch(e=t.swipeDirection()){case"left":case"down":i=t.options.swipeToSlide?t.checkNavigable(t.currentSlide+t.getSlideCount()):t.currentSlide+t.getSlideCount(),t.currentDirection=0;break;case"right":case"up":i=t.options.swipeToSlide?t.checkNavigable(t.currentSlide-t.getSlideCount()):t.currentSlide-t.getSlideCount(),t.currentDirection=1}"vertical"!=e&&(t.slideHandler(i),t.touchObject={},t.$slider.trigger("swipe",[t,e]))}else t.touchObject.startX!==t.touchObject.curX&&(t.slideHandler(t.currentSlide),t.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!r.dragging||n&&1!==n.length)&&(e=r.getLeft(r.currentSlide),r.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,r.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curX-r.touchObject.startX,2))),!0===r.options.verticalSwiping&&(r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curY-r.touchObject.startY,2)))),"vertical"!==(t=r.swipeDirection())?(void 0!==i.originalEvent&&r.touchObject.swipeLength>4&&i.preventDefault(),s=(!1===r.options.rtl?1:-1)*(r.touchObject.curX>r.touchObject.startX?1:-1),!0===r.options.verticalSwiping&&(s=r.touchObject.curY>r.touchObject.startY?1:-1),o=r.touchObject.swipeLength,r.touchObject.edgeHit=!1,!1===r.options.infinite&&(0===r.currentSlide&&"right"===t||r.currentSlide>=r.getDotCount()&&"left"===t)&&(o=r.touchObject.swipeLength*r.options.edgeFriction,r.touchObject.edgeHit=!0),!1===r.options.vertical?r.swipeLeft=e+o*s:r.swipeLeft=e+o*(r.$list.height()/r.listWidth)*s,!0===r.options.verticalSwiping&&(r.swipeLeft=e+o*s),!0!==r.options.fade&&!1!==r.options.touchMove&&(!0===r.animating?(r.swipeLeft=null,!1):void r.setCSS(r.swipeLeft))):void 0)},e.prototype.swipeStart=function(i){var e,t=this;return t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(t.touchObject={},!1):(void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,void(t.dragging=!0))},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
151,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;r>i;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 152function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||A,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(T,0)?e.substr(T.length):e}function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&!1!==e.originalEvent.isTrusted},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if(void 0===i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(void 0===e||"undefined"==typeof e[0])return i;for(n=(s=e[0].attributes).length;n--;)(r=s[n])&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.is("["+t+i+"]")},setAttr:function(e,t,i,n){e[0].setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},namespaceEvents:function(t,i){return(t=this.trimString(t||"").split(/\s+/))[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){-1==i.indexOf(t)&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focu
152s:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(){},errorsContainer:function(){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){for(var t in this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions),e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){return this._listeners=this._listeners||{},(this._listeners[e]=this._listeners[e]||[]).push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(!1===(n=r[s].call(t,t,i)))return n;return!this.parent||this.parent.trigger(e,t,i)},reset:function(){if("ParsleyForm"!==this.__class__)return this._resetUI(),this._trigger("reset");for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){if(this._destroyUI(),"ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void this._trigger("destroy");for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var u={string:function(e){return e},integer:function(e){if(isNaN(e))throw'Requirement is not an integer: "'+e+'"';return parseInt(e,10)},number:function(e){if(isNaN(e))throw'Requirement is not a number: "'+e+'"';return parseFloat(e)},reference:function(t){var i=e(t);if(0===i.length)throw'No such reference: "'+t+'"';return i},boolean:function(e){return"false"!==e},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},d=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},h=function(e,t){var i=u[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';return i(t)},p=function(e,t,i){var n=null,r={};for(var s in e)if(s){var a=i(s);"string"==typeof a&&(a=h(e[s],a)),r[s]=a}else n=h(e[s],t);return[n,r]},c=function(t){e.extend(!0,this,t)};c.prototype={validate:function(t,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn.call(this,t,i);if(e.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return!isNaN(t)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return e.isArray(t)?t:[t];var n=this.requirementType;if(e.isArray(n)){for(var r=d(t,n.length),s=0;s<r.length;s++)r[s]=h(n[s],r[s]);return r}return e.isPlainObject(n)?p(n,t,i):[h(n,t)]},requirementType:"string",priority:2};var f=function(e,t){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(e||{},t||{})},m={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};m.range=m.number;var v=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0};f.prototype={init:function(t,i){for(var n in this.catalog=i,this.validators=e.extend({},this.validators),t)this.addValidator(n,t[n].fn,t[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)}
152,updateValidator:function(e){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){for(var n in"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new c(t)),this.validators[e]=t,t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;"type"===e.name?t=(this.catalog[this.locale][e.name]||{})[e.requirements]:t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"1":n,s=i.base,a=void 0===s?0:s,o=m[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(v(r),v(a));if(v(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(e,t){return e>=t},requirementType:"number",priority:30},max:{validateNumber:function(e,t){return t>=e},requirementType:"number",priority:30},range:{validateNumber:function(e,t,i){return e>=t&&i>=e},requirementType:["number","number"],priority:30},equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var g={},y=function q(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:q(t,e,!0).added}};g.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.$element.attr("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},g.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=y(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=(arguments.length<=1||void 0===arguments[1]?{}:arguments[1]).updateClass,i=void 0===t||t;this._buildUI(),this._removeError(e),i&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&
152!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.$element.attr(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&e(this.options.classHandler).length)return e(this.options.classHandler);var t=this.options.classHandler.call(this,this);return void 0!==t&&t.length?t:this._inputHolder()},_inputHolder:function(){return!this.options.multiple||this.$element.is("select")?this.$element:this.$element.parent()},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return void 0!==t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t.validate()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._eventValidate(e)})},_eventValidate:function(e){!(!/key|input/.test(e.type)||this._ui&&this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||this.validate()},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var _=function(t,i,n){this.__class__="ParsleyForm",this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},w={pending:null,resolved:!0,rejected:!1};_.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._$submitSource||this.$element.find(a._SubmitSelector).first();if(this._$submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i.is("[formnovalidate]")){var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(t){this._$submitSource=e(t.currentTarget)},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.attr("name"),value:t.attr("value")})}this.$element.trigger(e.extend(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments);t={group:i[0],force:i[1],event:i[2]}}return w[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=e.extend({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments);t={group:i[0],force:i[1]}}return w[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);"ParsleyField"!==n.__class__&&"ParsleyFieldMultiple"!==n.__class__||!0===n.options.excluded||"undefined"==typeof t.fieldsMappedById[n.__class__+"-"+n.__id__]&&(t.fieldsMappedById[n.__class__+"-"+n.__id__]=n,t.fields.push(n))}),e.each(a.difference(i,t.fields),function(e,t){t._trigger("reset")})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var b=function(t,i,n,r,s){if(!/ParsleyField/.test(t.__class__))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");var a=window.Parsley._validatorRegistry.validators[i],o=new c(a);e.extend(this,{validator:o,name:i,requirements:n,priority:r||t.options[i+"Priority"]||o.priority,isDomConstraint:!0===s}),this._parseRequirements(t.options)},F=function(e){return e[0].toUpperCase()+e.slice(1)};b.prototype={validate:function(e,t){var i;
152return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+F(i)]})}};var C=function(t,i,n,r){this.__class__="ParsleyField",this.$element=e(t),void 0!==r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},$={pending:null,resolved:!0,rejected:!1};C.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;return this.refreshConstraints(),!r||this._isInGroup(r)?(this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))):void 0},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return void 0===e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return e.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments);t={force:i[0],value:i[1]}}var n=this.whenValid(t);return!n||$[n.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group;if(i._refreshed||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if(null!=s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var l=this._getGroupedConstraints(),u=[];return e.each(l,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));return u.push(r),"rejected"!==r.state()&&void 0}),a.all(u)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return null==(e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val())?"":this._handleWhitespace(e)},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new b(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);for(var n in this.constraints=e,this.constraintsByName=t,this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),void 0!==this.$element.attr("min")&&void 0!==this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):void 0!==this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):void 0!==this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),void 0!==this.$element.attr("minlength")&&void 0!==this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):void 0!==this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):void 0!==this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var e=this.$element.attr("type");return void 0===e?this:"number"===e?this.addConstraint("type",["number",{step:this.$element.attr("step"),base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(e)?this.addConstraint("type",e,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=C,E=function(){this.__class__="ParsleyFieldMultiple"};E.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.$element=e(t);var r=this.$element.data("Parsley");if(r)return void 0!==n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&e.extend(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==n&&"ParsleyForm"!==n.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.4.4",this.__id__=a.generateID(),this._resetOptions(e),this.$element.is("form")||a.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&void 0!==this.$element.attr("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple||(void 0!==this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=t=this.$element.attr("name"):void 0!==this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&void 0!==this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple") 153;if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),void 0!==t&&e('input[name="'+t+'"]').each(function(t,i){e(i).is("input[type=radio], input[type=checkbox]")&&e(i).attr(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(void 0!==(i=e(r.get(s)).data("Parsley"))){this.$element.data("ParsleyFieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new _(this.$element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.$element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.$element,this.domOptions,this.options,this.parent),new E,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),void 0!==i?(this.$element.data("ParsleyFieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
153V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var M=e.extend(new l,{$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.4.4"});e.extend(x.prototype,g.Field,l.prototype),e.extend(_.prototype,g.Form,l.prototype),e.extend(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this,t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),M.options=e.extend(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=M.options,window.Parsley=window.psly=M,window.ParsleyUtils=a;var O=window.Parsley._validatorRegistry=new f(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(t,i){window.Parsley[i]=e.proxy(O,i),window.ParsleyValidator[i]=function(){var e;return a.warnOnce("Accessing the method '"+i+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+i+"(...)'"),(e=window.Parsley)[i].apply(e,arguments)}}),window.Parsley.UI=g,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing ParsleyUI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var A=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},T="parsley:";return e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof _))throw new Error("Mu
153st give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof _))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof _,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))},e.extend(!0,M,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return M.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),M.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof M.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");(i=M.asyncValidators[l].url||i).indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.$element.attr("name")||r.$element.attr("id")]=t;var u=e.extend(!0,n.options||{},M.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof M._remoteCache&&(M._remoteCache={});var d=M._remoteCache[a]=M._remoteCache[a]||e.ajax(s),h=function(){var t=M.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),M.on("form:submit",function(){M._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),M.addAsyncValidator.apply(M,arguments)},M.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),M.setLocale("en"),(new n).install(),M}); 154function createCookie(t,e,r){var n="";if(r){var o=new Date;o.setTime(o.getTime()+24*r*60*60*1e3),n="; expires="+o.toUTCString()}document.cookie=t+"="+e+n+"; path=/"}function readCookie(t){for(var e=t+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return null}function eraseCookie(t){createCookie(t,"",-1)}function transformYCss(t){return"transform:translate3d(0, "+t+"px, 0);-webkit-transform:translate3d(0, "+t+"px, 0);-moz-transform:translate3d(0, "+t+"px, 0);-ms-transform:translate3d(0, "+t+"px, 0);-o-transform:translate3d(0, "+t+"px, 0);"}function transformXCss(t){return"transform:translate3d("+t+"px, 0, 0);-webkit-transform:translate3d("+t+"px, 0, 0);-moz-transform:translate3d("+t+"px, 0, 0);-ms-transform:translate3d("+t+"px, 0, 0);-o-transform:translate3d("+t+"px, 0, 0);"}function bodyScrollPosition(){return parseInt(window.pageYOffset!==undefined?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)}String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),Number.prototype.formatMoney=function(t,e,r){var n=this,o=(t=isNaN(t=Math.abs(t))?2:t,e=e==undefined?".":e,r=r==undefined?",":r,n<0?"-":""),a=String(parseInt(n=Math.abs(Number(n)||0).toFixed(t))),s=(s=a.length)>3?s%3:0;return o+(s?a.substr(0,s)+r:"")+a.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+r)+(t?e+Math.abs(n-a).toFixed(t).slice(2):"")},String.prototype.apostrophize=function(){var t=this;return"s"===t.slice(-1).toLowerCase()?t+"'":t+"'s"},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.cut=function(t,e){var r=parseInt(t,10);if(!r)return value;if(this.length<=r)return this;value=this.substr(0,r);var n=value.lastIndexOf(" ");return-1!==n&&("."!==value.charAt(n-1)&&","!==value.charAt(n-1)||(n-=1),value=value.substr(0,n)),value+(e||" \u2026")}; 155var socialshare=function(t,e){var r=t.location.href,o={facebook:"http://www.facebook.com/sharer/sharer.php?u=",twitter:"http://twitter.com/share?url=",linkedin:"https://www.linkedin.com/shareArticle?url=",pinterest:"http://pinterest.com/pin/create/button/?url="};return{init:function(){for(var i=e.querySelectorAll("[data-social-share]"),n=0,a=i.length;n<a;n++)i[n].onclick=function(){var i=this.getAttribute("data-social-channel");
155if("email"==i){var n=e.head.querySelector("[property='og:title']").content,a=e.head.querySelector("[property='og:description']").content+"\n\n"+r,c="mailto:?subject="+encodeURI(n)+"&body="+encodeURI(a);return this.setAttribute("href",c),!0}var h=o[i]+r;return t.open(h,"popup","width=500,height=400"),!1}}}}(window,document);socialshare.init(); 156function debounce(e,t){var n;return function(){var o=arguments,i=this;clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}}function selectSuggestion(e){formAddressInput.value=e,addressDropdown.style.display="none"}!function(e){function t(){}function n(e,t,n,o){e.addEventListener(t,n,!!we&&(o||{}))}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){return Y+"["+K+"] "+e}function a(e){J&&"object"==typeof window.console&&console.log(i(e))}function r(e){"object"==typeof window.console&&console.warn(i(e))}function s(){function t(e){return"true"===e}function o(e,t){return"function"==typeof e&&(a("Setup custom "+t+"CalcMethod"),ge[t]=e,e="custom"),e}function i(e){I(0,0,e.type,e.screenY+":"+e.screenX)}function s(e,t){a("Add event listener: "+t),n(window.document,e,i)}var c;c=Z.slice(Q).split(":"),K=c[0],E=e===c[1]?E:Number(c[1]),R=e===c[2]?R:t(c[2]),J=e===c[3]?J:t(c[3]),G=e===c[4]?G:Number(c[4]),A=e===c[6]?A:t(c[6]),O=c[7],q=e===c[8]?q:c[8],z=c[9],P=c[10],ie=e===c[11]?ie:Number(c[11]),V.enable=e!==c[12]&&t(c[12]),ee=e===c[13]?ee:c[13],ce=e===c[14]?ce:c[14],X=e===c[15]?X:t(c[15]),a("Initialising iFrame ("+window.location.href+")"),"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(c=window.iFrameResizer,a("Reading data from page: "+JSON.stringify(c)),Object.keys(c).forEach(l,c),pe="onMessage"in c?c.onMessage:pe,fe="onReady"in c?c.onReady:fe,oe="targetOrigin"in c?c.targetOrigin:oe,q="heightCalculationMethod"in c?c.heightCalculationMethod:q,ce="widthCalculationMethod"in c?c.widthCalculationMethod:ce,q=o(q,"height"),ce=o(ce,"width")),a("TargetOrigin for parent set to: "+oe),d("margin",function(e,t){return-1!==t.indexOf("-")&&(r("Negative CSS value ignored for margin"),t=""),t}(0,O=e===O?E+"px":O)),d("background",z),d("padding",P),(c=document.createElement("div")).style.clear="both",c.style.display="block",c.style.height="0",document.body.appendChild(c),f(),m(),document.documentElement.style.height="",document.body.style.height="",a('HTML & body height set to "auto"'),a("Enable public methods"),ue.parentIFrame={autoResize:function(e){return!0===e&&!1===A?(A=!0,g()):!1===e&&!0===A&&(A=!1,u("remove"),null!==F&&F.disconnect(),clearInterval(U)),I(0,0,"autoResize",JSON.stringify(A)),A},close:function(){I(0,0,"close")},getId:function(){return K},getPageInfo:function(e){"function"==typeof e?(me=e,I(0,0,"pageInfo")):(me=function(){},I(0,0,"pageInfoStop"))},moveToAnchor:function(e){V.findTarget(e)},reset:function(){L("parentIFrame.reset")},scrollTo:function(e,t){I(t,e,"scrollTo")},scrollToOffset:function(e,t){I(t,e,"scrollToOffset")},sendMessage:function(e,t){I(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){q=e,f()},setWidthCalculationMethod:function(e){ce=e,m()},setTargetOrigin:function(e){a("Set targetOrigin: "+e),oe=e},size:function(e,t){k("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},!0===X&&(s("mouseenter","Mouse Enter"),s("mouseleave","Mouse Leave")),g(),V=function(){function t(t){t=t.getBoundingClientRect();var n={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset};return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function o(n){n=n.split("#")[1]||n;var o=decodeURIComponent(n);o=document.getElementById(o)||document.getElementsByName(o)[0];e===o?(a("In page link (#"+n+") not found in iFrame, so sending to parent"),I(0,0,"inPageLink","#"+n)):(a("Moving to in page link (#"+n+") at x: "+(o=t(o=o)).x+" y: "+o.y),I(o.y,o.x,"scrollToOffset"))}function i(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&o(t)}function s(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(e){"#"!==e.getAttribute("href")&&n(e,"click",function(e){e.preventDefault(),o(this.getAttribute("href"))})})}return V.enable?Array.prototype.forEach&&document.querySelectorAll?(a("Setting up location.hash handlers"),s(),n(window,"hashchange",i
156),setTimeout(i,H)):r("In page linking not fully supported in this browser! (See README.md for IE8 workaround)"):a("In page linking not enabled"),{findTarget:o}}(),k("init","Init message from host page"),fe()}function l(e){var t=e.split("Callback");2===t.length&&(this[t="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1)]=this[e],delete this[e],r("Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version."))}function d(t,n){e!==n&&""!==n&&"null"!==n&&a("Body "+t+' set to "'+(document.body.style[t]=n)+'"')}function c(e){var t={add:function(t){function o(){k(e.eventName,e.eventType)}he[t]=o,n(window,t,o,{passive:!0})},remove:function(e){var t=he[e];delete he[e],window.removeEventListener(e,t,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),a(o(e.method)+" event listener: "+e.eventType)}function u(e){c({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),c({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),c({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),c({method:e,eventType:"Input",eventName:"input"}),c({method:e,eventType:"Mouse Up",eventName:"mouseup"}),c({method:e,eventType:"Mouse Down",eventName:"mousedown"}),c({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),c({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),c({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),c({method:e,eventType:"Touch Start",eventName:"touchstart"}),c({method:e,eventType:"Touch End",eventName:"touchend"}),c({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),c({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),c({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),c({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===ee&&c({method:e,eventType:"IFrame Resized",eventName:"resize"})}function p(e,t,n,o){return t!==e&&(e in n||(r(e+" is not a valid option for "+o+"CalculationMethod."),e=t),a(o+' calculation method set to "'+e+'"')),e}function f(){q=p(q,j,Ce,"height")}function m(){ce=p(ce,de,xe,"width")}function g(){var e;!0===A?(u("add"),e=G<0,window.MutationObserver||window.WebKitMutationObserver?e?h():F=function(){function e(e){function t(e){!1===e.complete&&(a("Attach listeners to "+e.src),e.addEventListener("load",o,!1),e.addEventListener("error",i,!1),s.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){a("Remove listeners from "+e.src),e.removeEventListener("load",o,!1),e.removeEventListener("error",i,!1),s.splice(s.indexOf(e),1)}function n(e,n,o){t(e.target),k(n,o+": "+e.target.src)}function o(e){n(e,"imageLoad","Image loaded")}function i(e){n(e,"imageLoadFailed","Image load failed")}function r(t){k("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,d=function(){var e=document.querySelector("body");return d=new l(r),a("Create body MutationObserver"),d.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),d}();return{disconnect:function(){"disconnect"in d&&(a("Disconnect body MutationObserver"),d.disconnect(),s.forEach(t))}}}():(a("MutationObserver not supported in this browser!"),h())):a("Auto Resize disabled")}function h(){0!==G&&(a("setInterval: "+G+"ms"),U=setInterval(function(){k("interval","setInterval: "+G)},Math.abs(G)))}function w(e,t){return t=t||document.body,t=null===(t=document.defaultView.getComputedStyle(t,null))?0:t[e],parseInt(t,10)}function v(e,t){for(var n,i=t.length,r=0,s=o(e),l=Date.now(),d=0;d<i;d++)r<(n=t[d].getBoundingClientRect()[e]+w("margin"+s,t[d]))&&(r=n);return l=Date.now()-l,a("Parsed "+i+" HTML elements"),a("Element position calculated in "+l+"ms"),se/2<(l=l)&&a("Event throttle increased to "+(se=2*l)+"ms"),r}function y(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function b(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(r("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),v(e,n)}function M(){return document.querySelectorAll("body *")}function S(t,n,o,i){function r(e,t){return!(Math.abs(e-t)<=ie)}o=e===o?Ce[q]():o,i=e===i?xe[ce]():i,r(W,o)||R&&r(le,i)||"init"===t?(C(),I(W=o,le=i,t)):t in{init:1,interval:1,size:1}||!(q in $||R&&ce in $)?t in{interval:1}||a("No change in size detected"):L(n)}function T(){ke=Date.now(),Te=null,Se=ye.apply(be,Me),Te||(be=Me=null)}function k(e,t,n,o){ae&&e in N?a("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||a("Trigger event: "+t),("init"===e?S:Le)(e,t,n,o))}function C(){ae||(ae=!0,a("Trigger event lock on")),clearTimeout(re),re=setTimeout(function(){ae=!1,a("Trigger event lock off"),a("--")},H)}
156function x(e){W=Ce[q](),le=xe[ce](),I(W,le,e)}function L(e){var t=q;q=j,a("Reset trigger event: "+e),C(),x("reset"),q=t}function I(t,n,o,i,r){!0===te&&(e===r?r=oe:a("Message targetOrigin: "+r),a("Sending message to host page ("+(t=K+":"+t+":"+n+":"+o+(e===i?"":":"+i))+")"),ne.postMessage(Y+t,r))}function _(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}if("undefined"!=typeof window){var A=!0,z="",E=0,O="",F=null,P="",R=!1,N={resize:1,click:1},H=128,B=!0,W=1,j="bodyOffset",q=j,D=!0,Z="",V={},G=32,U=null,J=!1,X=!1,Y="[iFrameSizer]",Q=Y.length,K="",$={max:1,min:1,bodyScroll:1,documentElementScroll:1},ee="child",te=!0,ne=window.parent,oe="*",ie=0,ae=!1,re=null,se=16,le=1,de="scroll",ce=de,ue=window,pe=function(){r("onMessage function not defined")},fe=function(){},me=function(){},ge={height:function(){return r("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return r("Custom width calculation function not defined"),document.body.scrollWidth}},he={},we=!1;try{var ve=Object.create({},{passive:{get:function(){we=!0}}});window.addEventListener("test",t,ve),window.removeEventListener("test",t,ve)}catch(y){}var ye,be,Me,Se,Te,ke,Ce={bodyOffset:function(){return document.body.offsetHeight+w("marginTop")+w("marginBottom")},offset:function(){return Ce.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return ge.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,y(Ce))},min:function(){return Math.min.apply(null,y(Ce))},grow:function(){return Ce.max()},lowestElement:function(){return Math.max(Ce.bodyOffset()||Ce.documentElementOffset(),v("bottom",M()))},taggedElement:function(){return b("bottom","data-iframe-height")}},xe={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return ge.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(xe.bodyScroll(),xe.documentElementScroll())},max:function(){return Math.max.apply(null,y(xe))},min:function(){return Math.min.apply(null,y(xe))},rightMostElement:function(){return v("right",M())},taggedElement:function(){return b("right","data-iframe-width")}},Le=(ye=S,Te=null,ke=0,function(){var e=Date.now(),t=se-(e-(ke=ke||e));return be=this,Me=arguments,t<=0||se<t?(Te&&(clearTimeout(Te),Te=null),ke=e,Se=ye.apply(be,Me),Te||(be=Me=null)):Te=Te||setTimeout(T,t),Se});n(window,"message",function(t){function n(){return t.data.split("]")[1].split(":")[0]}function o(){return t.data.slice(t.data.indexOf(":")+1)}function i(){return t.data.split(":")[2]in{"true":1,"false":1}}var l={init:function(){Z=t.data,ne=t.source,s(),B=!1,setTimeout(function(){D=!1},H)},reset:function(){D?a("Page reset ignored by init"):(a("Page size reset by host page"),x("resetPage"))},resize:function(){k("resizeParent","Parent window requested size check")},moveToAnchor:function(){V.findTarget(o())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=o();a("PageInfoFromParent called from parent: "+e),me(JSON.parse(e)),a(" --")},message:function(){var e=o();a("onMessage called from parent: "+e),pe(JSON.parse(e)),a(" --")}};Y===(""+t.data).slice(0,Q)&&(!1===B?function(){var o=n();o in l?l[o]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||window.jQuery!==e&&"iFrameResize"in window.jQuery.prototype||i()||r("Unexpected message ("+t.data+")")}():i()?l.init():a('Ignored message of type "'+n()+'". Received before initialization.'))}),n(window,"readystatechange",_),_()}}(),function(e){function t(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function n(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}function i(e){return E+"["+(t="Host page: "+(e=e),t=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e:t)+"]";var t}function a(e){return N[e]?N[e].log:_}function r(e,t){d("log",e,t,a(e))}function s(e,t){d("info",e,t,a(e))}function l(e,t){d("warn",e,t,!0)}function d(e,t,n,o){!0===o&&"object"==typeof window.console&&console[e](i(t),n)}function c(e){function t(){i("Height"),i("Width"),y(function(){v(_),g(A),C("onResized",_)},_,"init")}function i(e){var t=Number(N[A]["max"+e]),n=Number(N[A]["min"+e]),o=(e=e.toLowerCase(),Number(_[e]));r(A,"Checking "+e+" is in range "+n+"-"+t),o<n&&(o=n,r(A,"Set "+e+" to min value")),t<o&&(o=t,r(A,"Set "+e+" to max value")),_[e]=""+o}function a(e){return I.slice(I.indexOf(":")+z+e)}function d(e,t){var n,o,i;n=function(){var n,o;b("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=_.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},o=32,W[i=t]||(W[i]=setTimeout(function(){W[i]=null,n()},o))}function c(e){return e=e.getBoundingClientRect(),m(A),{x:Math.floor(Number(e.left)+Number(F.x)),y:Math.floor(Number(e.top)+Number(F.y))}}function p(e){var t=e?c(_.iframe):{x:0,y:0},n={x:Number(_.width)+t.x,y:Number(_.height)+t.y};r(A,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top===window.self?(F=n,S(),r(A,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):l(A,"Unable to scroll to requested position, window.parentIFrame not found")}function S(){!1===C("onScroll",F)?h():g(A)}function T(e){e=e.split("#")[1]||"";var t=decodeURIComponent(e);(t=document.getElementById(t)||document.getElementsByName(t)[0])?(t=c(t),r(A,"Moving to in page link (#"+e+") at x: "+t.x+" y: "+t.y),F={x:t.x,y:t.y},S(),r(A,"--")):window.top===window.self?r(A,"In page link #"+e+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(e):r(A,"In page link #"+e+" not found and window.parentIFrame not found")}function k(e){var t,n={};n=0===Number(_.width)&&0===Number(_.height)?{x:(t=a(9).split(":"))[1],y:t[0]}:{x:_.width,y:_.height},C(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function C(e,t){return u(A,e,t)}var x,L,I=e.data,_={},A=null;if("[iFrameResizerChild]Ready"===I)for(var P in N)b("iFrame requested init",M(P),N[P].iframe,P);else E===(""+I).slice(0,O)&&I.slice(O).split(":")[0]in N?(_=function(){var e=I.slice(O).split(":"),t=e[1]?parseInt(e[1],10):0,n=N[e[0]]&&N[e[0]].iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:t+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e=e.paddingBottom?parseInt(e.paddingBottom,10):0)}(o)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(o),width:e[2],type:e[3]}}(),A=_.id,N[A]&&(N[A].loaded=!0),(L=_.type in{"true":1,"false":1,undefined:1})&&r(A,"Ignoring init message from meta parent page"),!L&&(L=!0,N[x=A]||(L=!1,l(_.type+" No settings for "+x+". Message was: "+I)),L)&&(r(A,"Received: "+I),x=!0,null===_.iframe&&(l(A,"IFrame ("+_.id+") not found"),x=!1),x&&function(){var t=e.origin,n=N[A]&&N[A].checkOrigin;if(n&&""+t!="null"&&!function(){if(n.constructor!==Array)return e=N[A]&&N[A].remoteHost,r(A,"Checking connection is from: "+e),t===e;var e,o=0,i=!1;for(r(A,"Checking connection is from allowed list of origins: "+n);o<n.length;o++)if(n[o]===t){i=!0;break}return i}())throw new Error("Unexpected message received from: "+t+" for "+_.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return 1}()&&function(){function e(e,t){function n(){N[s]?d(N[s].iframe,s):i()}["scroll","resize"].forEach(function(o){r(s,e+o+" listener for sendPageInfo"),t(window,o,n)})}function i(){e("Remove ",o)}switch(N[A]&&N[A].firstRun&&N[A]&&(N[A].firstRun=!1),_.type){case"close"
156:f(_.iframe);break;case"message":c=a(6),r(A,"onMessage passed: {iframe: "+_.iframe.id+", message: "+c+"}"),C("onMessage",{iframe:_.iframe,message:JSON.parse(c)}),r(A,"--");break;case"mouseenter":k("onMouseEnter");break;case"mouseleave":k("onMouseLeave");break;case"autoResize":N[A].autoResize=JSON.parse(a(9));break;case"scrollTo":p(!1);break;case"scrollToOffset":p(!0);break;case"pageInfo":d(N[A]&&N[A].iframe,A),s=A,e("Add ",n),N[s]&&(N[s].stopPageInfo=i);break;case"pageInfoStop":N[A]&&N[A].stopPageInfo&&(N[A].stopPageInfo(),delete N[A].stopPageInfo);break;case"inPageLink":T(a(9));break;case"reset":w(_);break;case"init":t(),C("onInit",_.iframe);break;default:0===Number(_.width)&&0===Number(_.height)?l("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var s,c}())):s(A,"Ignored: "+I)}function u(e,t,n){var o=null,i=null;if(N[e]){if("function"!=typeof(o=N[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=o(n)}return i}function p(e){e=e.id,delete N[e]}function f(e){var t=e.id;if(!1===u(t,"onClose",t))r(t,"Close iframe cancelled by onClose event");else{r(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){l(e)}u(t,"onClosed",t),r(t,"--"),p(e)}}function m(t){null===F&&r(t,"Get page position: "+(F={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+F.y)}function g(e){null!==F&&(window.scrollTo(F.x,F.y),r(e,"Set page position: "+F.x+","+F.y),h())}function h(){F=null}function w(e){r(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),m(e.id),y(function(){v(e),b("reset","reset",e.iframe,e.id)},e,"reset")}function v(e){function n(n){function o(){Object.keys(N).forEach(function(e){function t(e){return"0px"===(N[n]&&N[n].iframe.style[e])}var n;N[n=e]&&null!==N[n].iframe.offsetParent&&(t("height")||t("width"))&&b("Visibility change","resize",N[n].iframe,n)})}function a(e){r("window","Mutation observed: "+e[0].target+" "+e[0].type),T(o,16)}var s;!A&&"0"===e[n]&&(A=!0,r(i,"Hidden iFrame detected, creating visibility listener"),n=t())&&(s=document.querySelector("body"),new n(a).observe(s,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}function o(t){var o;o=t,e.id?(e.iframe.style[o]=e[o]+"px",r(e.id,"IFrame ("+i+") "+o+" set to "+e[o]+"px")):r("undefined","messageData id not set"),n(t)}var i=e.iframe.id;N[i]&&(N[i].sizeHeight&&o("height"),N[i].sizeWidth)&&o("width")}function y(e,t,n){n!==t.type&&P&&!window.jasmine?(r(t.id,"Requesting animation frame"),P(e)):e()}function b(e,t,n,o,i){var a=!1;o=o||n.id,N[o]&&(function(){var i;n&&"contentWindow"in n&&null!==n.contentWindow?(i=N[o]&&N[o].targetOrigin,r(o,"["+e+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(E+t,i)):l(o,"["+e+"] IFrame("+o+") not found")}(),i&&N[o]&&N[o].warningTimeout&&(N[o].msgTimeout=setTimeout(function(){!N[o]||N[o].loaded||a||(a=!0,l(o,"IFrame has not responded within "+N[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},N[o].warningTimeout)))}function M(e){return e+":"+N[e].bodyMarginV1+":"+N[e].sizeWidth+":"+N[e].log+":"+N[e].interval+":"+N[e].enablePublicMethods+":"+N[e].autoResize+":"+N[e].bodyMargin+":"+N[e].heightCalculationMethod+":"+N[e].bodyBackground+":"+N[e].bodyPadding+":"+N[e].tolerance+":"+N[e].inPageLinks+":"+N[e].resizeFrom+":"+N[e].widthCalculationMethod+":"+N[e].mouseEvents}function S(o,i){function a(e){var t=e.split("Callback");2===t.length&&(this[t="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1)]=this[e],delete this[e],l(c,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version."))}function s(e){var t=N[c][e];1/0!==t&&0!==t&&(o.style[e]="number"==typeof t?t+"px":t,r(c,"Set "+e+" = "+o.style[e]))}function d(e){if(N[c]["min"+e]>N[c]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}var c=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var t;return""===e&&(o.id=(t=i&&i.id||B.id+I++,null!==document.getElementById(t)&&(t+=I++),e=t),_=(i||{}).log,r(e,"Added missing iframe ID: "+e+" ("+o.src+")")),e}(o.id);if(c in N&&"iFrameResizer"in o)l(c,"Ignored iFrame, already setup.");else{switch(function(e){if(e=e||{},N[c]=Object.create(null),N[c].iframe=o,N[c].firstRun=!0,N[c].remoteHost=o.src&&o.src.split("/").slice(0,3).join("/"),"object"!=typeof e)throw new TypeError("Options is not an object");Object.keys(e).forEach(a,e);var t,n=e;for(t in B)Object.prototype.hasOwnProperty.call(B,t)&&(N[c][t]=(Object.prototype.hasOwnProperty.call(n,t)?n:B)[t]);N[c]&&(N[c].targetOrigin=!0!==N[c].checkOrigin||""===(e=N[c].remoteHost)||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e)}(i),r(c,"IFrame scrolling "+(N[c]&&N[c].scrolling?"enabled":"disabled")+" for "+c),o.style.overflow=!1===(N[c]&&N[c].scrolling)?"hidden":"auto",N[c]&&N[c].scrolling){case"omit":break;case!0:o.scrolling="yes";break;case!1:o.scrolling="no";break;default:o.scrolling=N[c]?N[c].scrolling:"no"}d("Height"),d("Width"),s("maxHeight"),s("minHeight"),s("maxWidth"),s("minWidth"),"number"!=typeof(N[c]&&N[c].bodyMargin)&&"0"!==(N[c]&&N[c].bodyMargin)||(N[c].bodyMarginV1=N[c].bodyMargin,N[c].bodyMargin=N[c].bodyMargin+"px"),function(i){var a=t();a&&(a=a,o.parentNode)&&new a(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes
156).forEach(function(e){e===o&&f(o)})})}).observe(o.parentNode,{childList:!0}),n(o,"load",function(){var t,n;b("iFrame.onload",i,o,e,!0),t=N[c]&&N[c].firstRun,n=N[c]&&N[c].heightCalculationMethod in R,!t&&n&&w({iframe:o,height:0,width:0,type:"init"})}),b("init",i,o,e,!0)}(M(c)),N[c]&&(N[c].iframe.iFrameResizer={close:f.bind(null,N[c].iframe),removeListeners:p.bind(null,N[c].iframe),resize:b.bind(null,"Window resize","resize",N[c].iframe),moveToAnchor:function(e){b("Move to anchor","moveToAnchor:"+e,N[c].iframe,c)},sendMessage:function(e){b("Send Message","message:"+(e=JSON.stringify(e)),N[c].iframe,c)}})}}function T(e,t){null===H&&(H=setTimeout(function(){H=null,e()},t))}function k(){"hidden"!==document.visibilityState&&(r("document","Trigger event: Visibility change"),T(function(){C("Tab Visible","resize")},16))}function C(e,t){Object.keys(N).forEach(function(n){var o;N[o=n]&&"parent"===N[o].resizeFrom&&N[o].autoResize&&!N[o].firstRun&&b(e,t,N[n].iframe,n)})}function x(){n(window,"message",c),n(window,"resize",function(){var e;r("window","Trigger event: "+(e="resize")),T(function(){C("Window "+e,"resize")},16)}),n(document,"visibilitychange",k),n(document,"-webkit-visibilitychange",k)}function L(){function t(e,t){if(t){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">");S(t,e),n.push(t)}}for(var n,o=["moz","webkit","o","ms"],i=0;i<o.length&&!P;i+=1)P=window[o[i]+"RequestAnimationFrame"];return P?P=P.bind(window):r("setup","RequestAnimationFrame not supported"),x(),function(o,i){var a;switch(n=[],(a=o)&&a.enablePublicMethods&&l("enablePublicMethods option has been removed, public methods are now always available in the iFrame"),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),t.bind(e,o));break;case"object":t(o,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return n}}var I,_,A,z,E,O,F,P,R,N,H,B,W;"undefined"!=typeof window&&(I=0,A=_=!1,z="message".length,O=(E="[iFrameSizer]").length,F=null,P=window.requestAnimationFrame,R=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),N={},H=null,B=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){l("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),W={},window.jQuery!==e&&function(e){e.fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(e){return this.filter("iframe").each(function(t,n){S(n,e)}).end()}):s("","Unable to bind to jQuery, it is not fully loaded.")}(window.jQuery),"function"==typeof define&&define.amd?define([],L):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=L()),window.iFrameResize=window.iFrameResize||L())}();var addressInput=document.getElementById("addressInput"),addressDropdown=document.getElementById("addressDropdown"),formAddressInput=document.getElementById("fullAddressInput");addressInput&&addressDropdown&&formAddressInput&&addressInput.addEventListener("input",debounce(function(){var e=addressInput.value.trim();e.length>0?fetch("/address_lookup?autocomplete="+e).then(function(e){return e.json()}).then(function(e){var t=e.suggestions;t&&t.length>0?(addressDropdown.style.display="block",addressDropdown.innerHTML=t.map(function(e){return'<div class="dropdown-item" onclick="selectSuggestion(\''+e.address+"')\">"+e.address+"</div>"}).join("")):addressDropdown.style.display="none"})["catch"](function(e){console.error("Error fetching address suggestions:",e)}):addressDropdown.style.display="none"},300));var app=function(e,t,n){"use strict";var o=function(){return(e=this).init(),e;var e};o.init=function(){return new o},o.prototype={init:function(){console.log("Hushovd (Roar digital)"),this.showCookiePolicy(),this.initToggleLinks(),this.initFeaturedPropertiesCarou
156sel(),this.initTestimonialsCarousel(),this.initCarouselArrows(),this.initModals(),this.initSmallBranchMap(),this.initSearchFormBuyRent(),this.initStarInput(),this.initPropertyViewTabs(),this.initRadioToggle(),this.initPriceSlider(Ctesius.getSearch().get("channel")),this.initAreaSlider(),this.initSavedPropertyLinks(),this.initPropertyHeroCarousel(),this.initPropertyModalCarousel(),this.initPropertyForms(),this.initPropertyTabs(),this.initBranchesShowMap(),this.initAreaTabs()},showCookiePolicy:function(){readCookie("cookiepolicyshown")||(setTimeout(function(){n("#cookiePolicy").get(0).style.display="block",createCookie("cookiepolicyshown","true",30)},500),n(".close-cookie-policy").click(function(){n("#cookiePolicy").get(0).style.display="none"}))},initToggleLinks:function(){var e=this;n("[data-toggle]").on("click",function(){var t=n(this),o=n(t.data("target")),i=t.data("class"),a=t.data("group")||null,r=o.hasClass(i),s=!this.hasAttribute("data-singular")&&r;n(a).toggleClass(i,s).promise().done(function(){o.toggleClass(i,!r).promise().done(function(){a?t.toggleClass(i,!r):n("[data-toggle][data-class="+i+"]").toggleClass(i,!r),t.data("disable-scroll")&&n("html, body, .super-container").toggleClass("noscroll",!r),t.data("callback")&&e[t.data("callback")].call(e,t[0])})})})},initFeaturedPropertiesCarousel:function(){var e=n("#featuredPropertiesCarousel");e[0]&&e.slick({dots:!0,arrows:!1,infinite:!0,speed:500,slidesToShow:4,slidesToScroll:4,prevArrow:null,nextArrow:null,responsive:[{breakpoint:1230,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:992,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1}}]})},initTestimonialsCarousel:function(){var e=n("#testimonialCarousel");e[0]&&e.slick({dots:!0,arrows:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,prevArrow:null,nextArrow:null})},initCarouselArrows:function(){n(".carousel-next").click(function(e){e.preventDefault(),n(this.getAttribute("data-carousel")).slick("slickNext")}),n(".carousel-previous").click(function(e){e.preventDefault(),n(this.getAttribute("data-carousel")).slick("slickPrev")})},initModals:function(){n("[data-modal-toggle]").on("click",function(){var t=n(this).data("modal-id");n("#modalBackdrop, "+t).toggleClass("in").promise().done(function(){n("html, body").toggleClass("noscroll"),n(t).hasClass("user")&&(n("#modalBackdrop, "+t).toggleClass("user",!1),e.location.hash="")})}),n("#modalBackdrop").on("click",function(){var t=n(this);t.toggleClass("in",!1),n(".hush-modal-wrapper").toggleClass("in",!1).promise().done(function(){n("html, body").toggleClass("noscroll",!1),t.hasClass("user")&&(n("#modalBackdrop, .hush-modal-wrapper").toggleClass("user",!1),e.location.hash="")})}),n(".hush-modal-wrapper").on("click",function(e){e.stopPropagation()})},initSearchFormBuyRent:function(){n(".search-buy-rent").on("click",function(){var e=n(this),t=e.closest("form");t.find("#channel").val(e.data("channel"));var o="#"+t.get(0).id;Ctesius.Actions.submitSearchForm({selector:o})})},initStarInput:function(){function e(e,t){n(Array.prototype.slice.call(e,0,t)).toggleClass("active",!0),n(Array.prototype.slice.call(e,t)).toggleClass("active",!1)}function t(t){e(t,r)}function o(e){n(i.data("star-field")).val(e)}var i=n("[data-star-input]");if(i[0]){var a=i.find("[data-star]"),r=0;i.on({mouseleave:function(){t(a)}}),a.on({mouseover:function(){e(a,n(this).data("value"))},click:function(){(r=n(this).data("value"))>0&&o(r)}})}},initSmallBranchMap:function(){var e=n("#smallBranchMap");if(e[0]){for(var t,o=new google.maps.LatLng(0,0),i=[{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.local",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"off"}]}],a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 34 46" fill="'+window.markerColor+'"><title>Marker</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path style=" fill:'+window.markerStrokeColor+"; stroke:"+window.markerColor+'; stroke-width: 1px;" fill="'+window.markerStrokeColor+'" stroke="'+window.markerColor+'" d="M16,0A16,16,0,0,0,0,16C0,29,16,44,16,44S32,29,32,16A16,16,0,0,0,16,0Zm0,22a6,6,0,1,1,6-6,6,6,0,0,1-6,6Z"/></g></g></svg>',r=window.homeMapZoom,s={center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,"map_style"]},styles:i,zoom:r||13,scrollwheel:!1, 157disableDoubleClickZoom:!0,draggable:!0,zoomControl:!1,disableDefaultUI:!0},l=new google.maps.LatLngBounds,d=new google.maps.Map(e[0],s),c=[],u=window.branches,p=new google.maps.InfoWindow({content:"loading.."}),f=0,m=u.length;f<m;f++){var g=new google.maps.LatLng(u[f]._lat,u[f]._lng);(t=new google.maps.Marker({position:g,map:d,optimized:!1,icon:{url:"data:image/svg+xml;charset=UTF-8;base64,"+btoa(a),scaledSize:new google.maps.Size(31,24)}}
157))._infoHtml=function(e){var t="<div class='branch-map-popup'><div class='branch-map-popup-inner'><a href='/branches/"+e._url_label+"' title='"+e._name+"' class='name'>"+e._name+" office</a>";return e._sales_tel_ns&&(t+="<a href='tel://"+e._sales_tel_ns+"' title='Call sales' class='tel'>Sales: "+e._sales_tel+"</a>"),e._lettings_tel_ns&&(t+="<a href='tel://"+e._lettings_tel_ns+"' title='Call lettings' class='tel'>Lettings: "+e._lettings_tel+"</a>"),t+"</div></div>"}(u[f]),google.maps.event.addListener(t,"click",function(){p.setContent(this._infoHtml),p.open(d,this)}),t.___infowindow=p,c.push(t),l.extend(g)}google.maps.event.addListener(d,"zoom_changed",function(){var e=google.maps.event.addListener(d,"bounds_changed",function(){this.getZoom()>r&&1==this.initialZoom&&(this.setZoom(r),this.initialZoom=!1),google.maps.event.removeListener(e)})}),d.initialZoom=void 0!==r,d.fitBounds(l)}},initRadioToggle:function(){n("[data-radio-toggle-field]").each(function(){var e=n(this),t=n(e.data("radio-toggle-field"));e.find("input[type=radio]").on("change",function(){t.val(n(this).val()).change()}),e.find('input[type=radio][value="'+t.val()+'"]').prop("checked",!0)})},resetSlider:function(e){n("#priceSliderRange").slider("destroy"),this.initPriceSlider(e)},initPriceSlider:function(e){var t=n("#priceSliderRange");if(t[0]){var o,i,a,r=this,s="sales"==e,l=t.closest(".form-group").find(".ui-slider-handle"),d=n("#minPriceLabel"),c=n("#maxPriceLabel"),u=n("#min_price"),p=n("#max_price"),f=(t.next(".slider-range-indicator"),s?51e5:5200),m=s?1e5:200,g=[t.data("min"),t.data("max")];null!=g[0]&&""!=g[0]||(g[0]=0),null!=g[1]&&""!=g[1]||(g[1]=f),null!==g[1]&&""!==g[1]?(a=parseInt(g[1])==f?f-m:g[1],i="\xa3"+parseInt(a).formatMoney(0,".",","),s||(i+="pcm (\xa3"+Math.round(12*a/52).formatMoney(0,".",",")+"pw)"),parseInt(g[1])==f&&(i+="+"),c.text(i)):(i="\xa3"+parseInt(f-m).formatMoney(0,".",","),s||(i+="pcm (\xa3"+Math.round(12*(f-m)/52).formatMoney(0,".",",")+"pw)"),c.text(i+"+")),null!==g[0]&&""!==g[0]?(o="\xa3"+parseInt(o).formatMoney(0,".",","),s||(o+="pcm (\xa3"+Math.round(12*o/52).formatMoney(0,".",",")+"pw)"),d.text(o)):(o="\xa3"+parseInt(0).formatMoney(0,".",","),s||(o+="pcm (\xa3"+Math.round(0).formatMoney(0,".",",")+"pw)"),d.text(o)),n("#priceSliderRange").slider({range:!0,min:0,max:f,step:m,values:g,slide:function(e,t){a=t.values[1]==f?f-m:t.values[1],o="\xa3"+parseInt(t.values[0]).formatMoney(0,".",","),i="\xa3"+parseInt(a).formatMoney(0,".",","),s||(o+="pcm (\xa3"+Math.round(12*t.values[0]/52).formatMoney(0,".",",")+"pw)",i+="pcm (\xa3"+Math.round(12*a/52).formatMoney(0,".",",")+"pw)"),t.values[1]==f&&(i+="+"),d.text(o),c.text(i),u.val(0==t.values[0]?null:t.values[0]),p.val(t.values[1]==f?null:t.values[1])},change:function(){l.addClass("visible")}}),n("#refineSearchForm #channel").on("change",function(){r.resetSlider(n(this).val())})}},initAreaSlider:function(){var e=n("#radiusSliderRange");if(e[0]){var t,o,i,a,r,s,l,d,c=null,u=n("#radiusLabel"),p=n("#radiusLabelMax"),f=n("#within"),m=(e.next(".slider-range-indicator"),e.width()/5),g=e.data("value");g||(u.text("+1/2 mile"),p.text("+5 miles")),n("#radiusSliderRange").slider({range:!1,min:0,max:5,step:1,value:g,create:function(){},change:function(){c&&c.show(),p.hide()},slide:function(n,c){i=c.value,a=0==i?"0-5":i,r=(0==i?"1/2":i)+" mile"+(i<2?"":"s"),u.text("+"+r),t=e.width(),o=(o=i/1*m-u.width()/2)>t?t:o<0?0:o,u.css({left:o+"px"}),s=a.toString(),l=s.split("-"),d=[parseInt(l[0])+0].concat(l.splice(1)).concat("miles").join("-"),f.val(d)}})}},initSavedPropertyLinks:function(){n(document).on("click",".save-property-link",function(){var e=n(this),t=e.data("property-id");e.hasClass("active")?Ctesius.Actions.removeSavedProperty(t):Ctesius.Actions.addSavedProperty(t)}),n(".hush-modal-wrapper").on("click",".remove-saved-property",function(){Ctesius.Actions.removeSavedProperty(n(this).data("property-id"))})},initPropertyHeroCarousel:function(){var e=n("#propertyShowCarousel");e[0]&&(e.slick({dots:!0,arrows:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,prevArrow:null,nextArrow:null,centerMode:!e.hasClass("static"),centerPadding:"25%",focusOnSelect:!0,responsive:[{breakpoint:1230,settings:{centerMode:!e.hasClass("static"),centerPadding:"180px",slidesToShow:1,slidesToScroll:1}},{breakpoint:992,settings:{centerMode:!e.hasClass("static"),centerPadding:"0px",slidesToShow:1,slidesToScroll:1}}]}),e.on("init",e.removeClass("property-show-carousel--hidden")))},initPropertyModalCarousel:function(){var e=n("#propertyModalCarousel");e[0]&&e.slick({dots:!0,arrows:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,prevArrow:null,nextArrow:null,centerMode:!1,centerPadding:"0px",focusOnSelect:!0,responsive:[{breakpoint:1230,settings:{centerMode:!1,centerPadding:"0px",slidesToShow:1,slidesToScroll:1}},{breakpoint:992,settings:{centerMode:!1,centerPadding:"0px",slidesToShow:1,slidesToScroll:1}}]})},initPropertyForms:function(){window.__propertyFormHeader="";var e=n("#propertyEnquiryModalHeader");n(".property-enquiry-action").on("click",function(){n(".property-enquiry-form-intro").remove(),window.__propertyFormHeader="General Property Enquiry \n\n ------------ \n\n",e.text("Make an enquiry"),n("#property-enquiry-submit").text("Make enquiry")}),n(".property-booking-action").on("click",function(){n(".property-enquiry-form-intro").remove(),window.__propertyFormHeader="Book A Viewing Enquiry \n\n ------------ \n\n",e.text("Book a viewing"),n("#property-enquiry-submit").text("Request viewing")}),n(".property-video-tour-action").on("click",function(){n(".property-enquiry-form-intro").remove(),window.__propertyFormHeader="Book A Video Tour \n\n ------------ \n\n",e.text("Book a Video tour");var t=n("<p>",{text:"Please provide the following security details and we'll be in touch to arrange your virtual tour.","class":"property-enquiry-form-intro"});n("#propertyEnquiryModal .hush-modal-body").prepend(t),n("#property-enquiry-submit").text("Submit")}),n("#propertyEnquiryForm").on("submit",function(){var e=n("#peMessage");return e.css({color:"#ffffff"}),e.val(window.__propertyFormHeader+=e.val()),n(this).find("#property-enquiry-submit").prop("disabled",!0),!0})},initPropertyTabs:function(){this.renderLocationMap()},switchPropertyTabs:function(e){var t=this;switch(e.getAttribute("data-target")){case"#propertyLocationTab":t.renderLocationMap();break;
157case"#propertySchoolsTab":t.renderSchoolsMap();break;case"#propertyStreetviewTab":t.renderStreetviewMap()}},renderLocationMap:function(){var e=n("#propertyShowMap");if(e[0]){if(this._propertyShowMap)return void this._propertyShowMap.invalidateSize(!0);var t=[e.data("lat"),e.data("lng")],o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 34 46" fill="'+window.markerColor+'"><title>Marker</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path style=" fill:'+window.markerStrokeColor+"; stroke:"+window.markerColor+'; stroke-width: 1px;" fill="'+window.markerStrokeColor+'" stroke="'+window.markerColor+'" d="M16,0A16,16,0,0,0,0,16C0,29,16,44,16,44S32,29,32,16A16,16,0,0,0,16,0Zm0,22a6,6,0,1,1,6-6,6,6,0,0,1-6,6Z"/></g></g></svg>',i=new L.Map("propertyShowMap",{minZoom:6,maxZoom:20,zoom:16,center:t,dragging:!0,scrollWheelZoom:!1});HF.getConfig("leaflet_layer").addTo(i),i.attributionControl.setPrefix('<img src="/assets/leaflet/google-logo.png" alt="Google" />').setPosition("bottomleft");var a=L.divIcon({className:"map-marker",html:o,iconSize:[28,33],iconAnchor:[14,33]});L.marker(t,{icon:a}).addTo(i),this._propertyShowMap=i}},renderSchoolsMap:function(){var e=n("#propertyShowSchools");if(e[0]){var t=e.data("lat"),o=e.data("lng");try{setLocratingIFrameProperties({id:"propertyShowSchools",zoom:"15",lat:t,lng:o})}catch(e){console.log(e)}}},renderStreetviewMap:function(){var e=n("#propertyShowStreetview");if(e[0]){var t=e.data("lat"),o=e.data("lng");if(this._propertyStreetview)return void google.maps.event.trigger(this._propertyStreetview,"resize");var i=new google.maps.StreetViewPanorama(e[0],{position:{lat:t,lng:o},pov:{heading:165,pitch:0},zoom:1});this._propertyStreetview=i}},initAreaTabs:function(){this.renderAreaLocationMap()},switchAreaTabs:function(e){var t=this;switch(e.getAttribute("data-target")){case"#areaLocationTab":t.renderAreaLocationMap();break;case"#areaSchoolsTab":t.renderAreaSchoolsMap();break;case"#areaTransportTab":t.renderAreaTransportMap()}},renderAreaLocationMap:function(){if(n("#areaLocationMap")[0]){if(this._areaLocationMap)return void this._areaLocationMap.invalidateSize(!0);var t=[window.agLocation.lat,window.agLocation.lng],o=new L.Map("areaLocationMap",{minZoom:6,maxZoom:20,zoom:16,center:t,dragging:!0,scrollWheelZoom:!1});o.attributionControl.setPrefix('<img src="/assets/leaflet/google-logo.png" alt="Google" />').setPosition("bottomleft"),L.tileLayer("https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}",{maxZoom:20,subdomains:["mt0","mt1","mt2","mt3"]}).addTo(o);var i=(L.featureGroup(),L.polygon(e.agLocation.polyPoints));o.fitBounds(i.getBounds()),this._areaLocationMap=o}},renderAreaSchoolsMap:function(){if(n("#areaGuideSchools")[0]){var e=window.agLocation.lat,t=window.agLocation.lng;try{setLocratingIFrameProperties({id:"areaGuideSchools",zoom:"15",lat:e,lng:t})}catch(e){console.log(e)}}},renderAreaTransportMap:function(){var t=n("#areaGeoMap");if(t[0]){if(this.GeoFeaturesMap)return void google.maps.event.trigger(this.GeoFeaturesMap,"resize");var o,i,a=[{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.local",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"off"}]}],r={center:new google.maps.LatLng(e.agLocation.lat,e.agLocation.lng),mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,"map_style"]},styles:a,zoom:13,scrollwheel:!1,disableDoubleClickZoom:!0,draggable:!0,zoomControl:!1,disableDefaultUI:!0},s=new google.maps.LatLngBounds,l=new google.maps.Map(t[0],r),d=[],c=e.geoFeatures;i=new google.maps.InfoWindow({content:"loading.."});for(var u=0,p=c.length;u<p;u++){var f=new google.maps.LatLng(c[u].lat,c[u].lng);(o=new google.maps.Marker({position:f,map:l,optimized:!1,icon:{url:"data:image/svg+xml;charset=UTF-8;base64,"+btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 44"><defs><style>.cls-1{fill:#609fdb;}.cls-2{fill:#fff;}</style></defs><title>national rail</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M16,0A16,16,0,0,0,0,16C0,29,16,44,16,44S32,29,32,16A16,16,0,0,0,16,0Z"/><path class="cls-2" d="M19.33,10.63a1.2,1.2,0,0,0,.51.11h4.49v1.94H24c-1.38,0-2.75,0-4.13,0a1.71,1.71,0,0,0-.69.15c-1.06.49-2.1,1-3.15,1.51a.22.22,0,0,0-.12.15h8.4v1.9h-7.8l0,.06,4.75,2.25v.06h-.33c-.93,0-1.87,0-2.8,0a2.62,2.62,0,0,1-1.26-.28c-1.39-.68-2.79-1.35-4.19-2a1.09,1.09,0,0,0-.45-.1H7.66V14.49H8l4.09,0a1,1,0,0,0,.43-.07l3.41-1.63.14-.11H7.67V10.75h8.27l0-.08L11.2,8.25V8.2h2.67"/></g></g></svg>'),scaledSize:new google.maps.Size(31,24)}}))._infoHtml="<div class='transport-marker-popup'><div class='label'>"+c[u].name+"</div></div>",google.maps.event.addListener(o,"click",function(){i.setContent(this._infoHtml),i.open(l,this)}),o.___infowindow=i,d.push(o),s.extend(f)}l.fitBounds(s),this.GeoFeaturesMap=l}},renderAreaTransportMapOLD:function(){if(n("#areaGeoMap")[0]){if(this._geoFeatureMap)return void this._geoFeatureMap.map.invalidateSize(!0);var t=e.geoFeatures,o=[e.agLocation.lat,e.agLocation.lng],i=new L.Map("areaGeoMap",{minZoom:6,maxZoom:20,zoom:16,center:o,dragging:!0,scrollWheelZoom:!1});i.attributionControl.setPrefix('<img src="/assets/leaflet/google-logo.png" alt="Google" />').setPosition("bottomleft"),L.tileLayer("http://{s}.tile.osm.org/{z}/{x}/{y}.png",{attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(i);for(var a=L.divIcon({className:"map-marker",html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 44"><defs><style>.cls-1{fill:#609fdb;}.cls-2{fill:#fff;}</style></defs><title>national rail</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M16,0A16,16,0,0,0,0,16C0,29,16,44,16,44S32,29,32,16A16,16,0,0,0,16,0Z"/><path class="cls-2" d="M19.33,10.63a1.2,1.2,0,0,0,.51.11h4.49v1.94H24c-1.38,0-2.75,0-4.13,0a1.71,1.71,0,0,0-.69.15c-1.06.49-2.1,1-3.15,1.51a.22.22,0,0,0-.12.15h8.4v1.9h-7.8l0,.06,4.75,2.25v.06h-.33c-.93,0-1.87,0-2.8,0a2.62,2.62,0,0,1-1.26-.28c-1.39-.68-2.79-1.35-4.19-2a1.09,1.09,0,0,0-.45-.1H7.66V14.49H8l4.09,0a1,1,0,0,0,.43-.07l3.41-1.63.14-.11H7.67V10.75h8.27l0-.08L11.2,8.25V8.2h2.67"/></g></g></svg>',iconSize:[28,33],iconAnchor:[14,33],popupAnchor:[1,-16]}),r=new L.FeatureGroup,s=0,l=t.length;s<l;s++){var d=L.marker([t[s].lat,t[s].lng],{icon:a});d.bindPopup("<div class='transport-marker-popup'><div class='label'>"+t[s].name+"</div></div>").openPopup(),d.addTo(r)}r.addTo(i),this._geoFeatureMap={bounds:r.getBounds(),map:i},this._geoFeatureMap.map.fitBounds(this._geoFeatureMap.bounds)}},initPropertyViewTabs:function(){function o(){n(".leaflet-draw.leaflet-control").addClass("flash"),a&&e.clearTimeout(a),a=e.setTimeout(function(){n(".leaflet-draw.leaflet-control").removeClass("flash")},2e3)}var i=n(".property-view-tab");if(i[0]){i.on("click",function(){var a=n(this),r=a.data("show");if("pv_draw"==r&&o(),a.hasClass("active"))return!1;n(".property-view-content").toggleClass("hidden",!0).promise().done(function(){"pv_map"!=r&&"pv_draw"!=r||(a=n(".property-view-tab[data-show=pv_map], .property-view-tab[data-show=pv_draw]")),"pv_draw"==r?(r="pv_map",!0):!1,e.location.hash=r.slice(3),"pv_map"==r?n("#propertiesInfiniteScroll").toggleClass("hidden",!0):(n("#pv_gridview").toggleClass("grid-view","pv_list"!=r).toggleClass("list-view","pv_list"==r),n("#map_info").text("")),n("#"+r),"pv_map"===r?n("#pv_map").removeClass("hidden"):"pv_grid"===r?(n("#pv_grid").removeClass("hidden"),n("#pv_grid").hasClass("list-view")&&(n(this).removeClass("list-view"),n(this).addClass("grid-view"))):"pv_list"===r&&(n("#pv_grid").removeClass("hidden grid-view"),n("#pv_grid").addClass("list-view")),Ctesiu
157s.getSearch().attributes.performed_data.pagination.has_next_page||n("#propertiesInfiniteScroll").addClass("hidden"),i.toggleClass("active",!1).promise().done(function(){a.toggleClass("active",!0)})}),history&&history.replaceState&&e.history.replaceState({},document.title,t.location.pathname+e.location.hash)});var a=null;!function(e){var t="#pv_"+(e?e.slice(1):"grid");if(/list|grid|map/.test(t)){"#pv_map"==(t=t.indexOf("#pv_map")>-1?t.split("/")[0]:t)?n("#propertiesInfiniteScroll").toggleClass("hidden",!0):n("#propertiesInfiniteScroll").toggleClass("hidden",!1);var o=n(t);n(".property-view-content").toggleClass("hidden",!0).promise().done(function(){o.toggleClass("hidden",!1),n(".property-view-tab").toggleClass("active",!1).promise().done(function(){var o;o=n(e.indexOf("list")>-1?"[data-show=list]":"[data-show="+t.slice(1)+"]"),"#pv_map"==t&&(o=n.fn.add.call(o,n("[data-show=pv_draw]"))),o.toggleClass("active",!0)})})}}(e.location.hash)}},initBranchesShowMap:function(){var e=n("#branchesShowMap");if(e[0]){if(this._branchesShowMap)return void this._branchesShowMap.invalidateSize(!0);var t=[e.data("lat"),e.data("lng")],o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 34 46" fill="'+window.markerStrokeColor+'"><title>Marker</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path style=" fill:'+window.markerColor+"; stroke:"+window.markerStrokeColor+'; stroke-width: 1px;" fill="'+window.markerColor+'" stroke="'+window.markerStrokeColor+'" d="M16,0A16,16,0,0,0,0,16C0,29,16,44,16,44S32,29,32,16A16,16,0,0,0,16,0Zm0,22a6,6,0,1,1,6-6,6,6,0,0,1-6,6Z"/></g></g></svg>',i=new L.Map("branchesShowMap",{minZoom:6,maxZoom:20,zoom:16,center:t,dragging:!0,scrollWheelZoom:!0});i.attributionControl.setPrefix('<img src="/assets/leaflet/google-logo.png" alt="Google" />').setPosition("bottomleft"),HF.getConfig("leaflet_layer").addTo(i);var a=L.divIcon({className:"map-marker",html:o,iconSize:[28,33],iconAnchor:[14,33]});L.marker(t,{icon:a}).addTo(i),this._branchesShowMap=i}},initAreaGuideSchools:function(){var e=n("#areaGuideSchools");if(e[0]){var t=e.data("lat"),o=e.data("lng");try{setLocratingIFrameProperties({id:"areaGuideSchools",zoom:"15",lat:t,lng:o})}catch(e){console.log(e)}}}},n().ready(function(){e.Hushovd=o.init()})};app(window,document,jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.