1/*! 2 * jQuery JavaScript Library v1.12.4 3 * http://jquery.com/ 4 * 5 * Includes Sizzle.js 6 * http://sizzlejs.com/ 7 * 8 * Copyright jQuery Foundation and other contributors 9 * Released under the MIT license 10 * http://jquery.org/license 11 * 12 * Date: 2016-05-20T17:17Z 13 */ 14function ns(e,t){for(var n,r=this,i=e.split(".");n=i.shift();)null==r[n]&&(r[n]={}),r=r[n];t.call(t,r)} 15/** 16 * Copyright (c) 2010 by Gabriel Birke 17 * 18 * Permission is hereby granted, free of charge, to any person obtaining a copy 19 * of this software and associated documentation files (the 'Software'), to deal 20 * in the Software without restriction, including without limitation the rights 21 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 22 * copies of the Software, and to permit persons to whom the Software is 23 * furnished to do so, subject to the following conditions: 24 * 25 * The above copyright notice and this permission notice shall be included in all 26 * copies or substantial portions of the Software. 27 * 28 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 29 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 31 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 34 * SOFTWARE. 35 */ 36function Sanitize(){var e,t;for(t=arguments[0]||{},this.config={},this.config.elements=t.elements?t.elements:[],this.config.attributes=t.attributes?t.attributes:{},this.config.attributes[Sanitize.ALL]=this.config.attributes[Sanitize.ALL]?this.config.attributes[Sanitize.ALL]:[],this.config.allow_comments=!!t.allow_comments&&t.allow_comments,this.allowed_elements={},this.config.protocols=t.protocols?t.protocols:{},this.config.add_attributes=t.add_attributes?t.add_attributes:{},this.dom=t.dom?t.dom:document,e=0;e<this.config.elements.length;e++)this.allowed_elements[this.config.elements[e]]=!0;if(this.config.remove_element_contents={},this.config.remove_all_contents=!1,t.remove_contents)if(t.remove_contents instanceof Array)for(e=0;e<t.remove_contents.length;e++)this.config.remove_element_contents[t.remove_contents[e]]=!0;else this.config.remove_all_contents=!0;this.transformers=t.transformers?t.transformers:[]}function createMethod(e){return function(){throw new Error('The "'+e+"\" method is not available on the playback technology's API")}}!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"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ke.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function a(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ie.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ie.addEventListener||"load"===e.event.type||"complete"===ie.readyState)&&(a(),pe.ready())}function u(e,t,n){if(n===undefined&&1===e.nodeType){var r="data-"+t.replace(Ae,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:De.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=undefined}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(Me(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.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]=re.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),n!==undefined&&(o[pe.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[pe.camelCase(t)]):i=o,i}}
36function d(e,t,n){if(Me(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){i=(t=pe.isArray(t)?t.concat(pe.map(t,pe.camelCase)):t in r?[t]:(t=pe.camelCase(t))in r?[t]:t.split(" ")).length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=undefined)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&He.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{c/=o=o||".5",pe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function h(e){var t=Qe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function p(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):undefined;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,p(r,t));return t===undefined||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function v(e){ze.test(e.type)&&(e.defaultChecked=e.checked)}function g(e,t,n,r,i){for(var o,a,s,u,l,c,d,f=e.length,g=h(t),y=[],b=0;b<f;b++)if((a=e[b])||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ye.test(a)){for(u=u||g.appendChild(t.createElement("div")),l=(We.exec(a)||["",""])[1].toLowerCase(),d=Ge[l]||Ge._default,u.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)u=u.lastChild;if(!fe.leadingWhitespace&&Ke.test(a)&&y.push(t.createTextNode(Ke.exec(a)[0])),!fe.tbody)for(o=(a="table"!==l||Xe.test(a)?"<table>"!==d[1]||Xe.test(a)?0:u:u.firstChild)&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=g.lastChild}else y.push(t.createTextNode(a));for(u&&g.removeChild(u),fe.appendChecked||pe.grep(p(y,"input"),v),b=0;a=y[b++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=p(g.appendChild(a),"script"),s&&m(u),n)for(o=0;a=u[o++];)Ve.test(a.type||"")&&n.push(a);return u=null,g}function y(){return!0}function b(){return!1}function x(){try{return ie.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=undefined),t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=undefined):null==i&&("string"==typeof n?(i=r,r=undefined):(i=r,r=n,n=undefined)),!1===i)i=b;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return pe().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function S(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function j(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._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++)pe.event.add(t,n,s[n][r]);a.data&&(a.data=pe.extend({},a.data))}}function E(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!fe.noCloneEvent&&t[pe.expando]){for(r in(i=pe._data(t)).events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(k(t).text=e.text,S(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),fe.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&ze.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 T(e,t,n,r){t=ae.apply([],t);var i,o,a,s,u,l,c=0,d=e.length,f=d-1,h=t[0],m=pe.isFunction(h);if(m||d>1&&"string"==typeof h&&!fe.checkClone&&st.test(h))return e.each(function(i){var o=e.eq(i);m&&(t[0]=h.call(this,i,o.html())),T(o,t,n,r)});if(d&&(i=(l=g(t,e[0].ownerDocument,!1,e,r)).firstChild,1===l.childNodes.length&&(l=i),i||r)){for(a=(s=pe.map(p(l,"script"),k)).length;c<d;c++)o=l,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,p(o,"script"))),n.call(e[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,pe.map(s,S),c=0;c<a;c++)o=s[c],Ve.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(u,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(lt,"")));l=i=null}return e}function P(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(p(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&m(p(r,"script")),r.parentNode.removeChild(r));return e}function $(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function N(e){var t=ie,n=ft[e];return n||("none"!==(n=$(e,t))&&n||((t=((dt=(dt||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow||dt[0].contentDocument).document).write(),t.close(),n=$(e,t),dt.detach()),ft[e]=n),n}function R(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function M(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=jt.length;n--;)if((e=jt[n]+t)in Et)return e}function D(e,t){for(var n,r,i,o=[],a=0,s=e.length;a<s;a++)(r=e[a]).style&&(o[a]=pe._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Ue(r)&&(o[a]=pe._data(r,"olddisplay",N(r.nodeName)))):(i=Ue(r),(n&&"none"!==n||!i)&&pe._data(r,"olddisplay",i?n:pe.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 A(e,t,n){var r=Ct.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function I(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+=pe.css(e,n+Be[o],!0,i)),r?("content"===n&&(a-=pe.css(e,"padding"+Be[o],!0,i)),"margin"!==n&&(a-=pe.css(e,"border"+Be[o]+"Width",!0,i))):(a+=pe.css(e,"padding"+Be[o],!0,i),"padding"!==n&&(a+=pe.css(e,"border"+Be[o]+"Width",!0,i)));return a}function O(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=gt(e),a=fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=yt(e,t,o))<0||null==i)&&(i=e.style[t]),pt.test(i))return i;r=a&&(fe.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+I(e,t,n||(a?"border":"content"),r,o)+"px"}function F(e,t,n,r,i){return new F.prototype.init(e,t,n,r,i)}function L(){return e.setTimeout(function(){Tt=undefined}),Tt=pe.now()}function H(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=Be[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e,t,n){for(var r,i=(z.tweeners[t]||[]).concat(z.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function U(e,t,n){var r,i,o,a,s,u,l,c=this,d={},f=e.style,h=e.nodeType&&Ue(e),p=pe._data(e,"fxshow");for(r in n.queue||(null==(s=pe._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--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===("none"===(l=pe.css(e,"display"))?pe._data(e,"olddisplay")||N(e.nodeName):l)&&"none"===pe.css(e,"float")&&(fe.inlineBlockNeedsLayout&&"inline"!==N(e.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",fe.shrinkWrapBlocks()||c.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),t)if(i=t[r],$t.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!p||p[r]===undefined)continue;h=!0}d[r]=p&&p[r]||pe.style(e,r)}else l=undefined;
36if(pe.isEmptyObject(d))"inline"===("none"===l?N(e.nodeName):l)&&(f.display=l);else for(r in p?"hidden"in p&&(h=p.hidden):p=pe._data(e,"fxshow",{}),o&&(p.hidden=!h),h?pe(e).show():c.done(function(){pe(e).hide()}),c.done(function(){var t;for(t in pe._removeData(e,"fxshow"),d)pe.style(e,t,d[t])}),d)a=B(h?p[r]:0,r,c),r in p||(p[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}function q(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=pe.camelCase(n)],o=e[n],pe.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=pe.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 z(e,t,n){var r,i,o=0,a=z.prefilters.length,s=pe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Tt||L(),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:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Tt||L(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.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.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(q(c,l.opts.specialEasing);o<a;o++)if(r=z.prefilters[o].call(l,e,c,l.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(l.elem,l.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(c,B,l),pe.isFunction(l.opts.start)&&l.opts.start.call(e,l),pe.fx.timer(pe.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 W(e){return pe.attr(e,"class")||""}function V(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Ne)||[];if(pe.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 K(e,t,n,r){function i(s){var u;return o[s]=!0,pe.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===tn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function Q(e,t){var n,r,i=pe.ajaxSettings.flatOptions||{};for(r in t)t[r]!==undefined&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&pe.extend(!0,e,n),e}function G(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 Y(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(d){return{state:"parsererror",error:a?d:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function X(e){return e.style&&e.style.display||pe.css(e,"display")}function J(e){if(!pe.contains(e.ownerDocument||ie,e))return!0;for(;e&&1===e.nodeType;){if("none"===X(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function Z(e,t,n,r){var i;if(pe.isArray(t))pe.each(t,function(t,i){n||sn.test(e)?r(e,i):Z(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(i in t)Z(e+"["+i+"]",t[i],n,r)}function ee(){try{return new e.XMLHttpRequest}catch(t){}}function te(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function ne(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var re=[],ie=e.document,oe=re.slice,ae=re.concat,se=re.push,ue=re.indexOf,le={},ce=le.toString,de=le.hasOwnProperty,fe={},he="1.12.4",pe=function(e,t){return new pe.fn.init(e,t)},me=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ve=/^-ms-/,ge=/-([\da-z])/gi,ye=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:he,constructor:pe,selector:"",length:0,toArray:function(){return oe.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:oe.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);
36return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(oe.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()},push:se,sort:re.sort,splice:re.splice},pe.extend=pe.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]||{},s++),"object"==typeof a||pe.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&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[r]=pe.extend(l,o,n)):n!==undefined&&(a[r]=n));return a},pe.extend({expando:"jQuery"+(he+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!de.call(e,"constructor")&&!de.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return de.call(e,t);for(t in e);return t===undefined||de.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ve,"ms-").replace(ge,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;i<r&&!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(me,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?pe.merge(r,"string"==typeof e?[e]:e):se.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(ue)return ue.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,a=0,s=[];if(n(e))for(i=e.length;a<i;a++)null!=(o=t(e[a],a,r))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,r))&&s.push(o);return ae.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(i=e[t],t=e,e=i),pe.isFunction(e)?(n=oe.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(oe.call(arguments)))}).guid=e.guid=e.guid||pe.guid++,r):undefined},now:function(){return+new Date},support:fe}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=re[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be= 37/*! 38 * Sizzle CSS Selector Engine v2.2.1 39 * http://sizzlejs.com/ 40 * 41 * Copyright jQuery Foundation and other contributors 42 * Released under the MIT license 43 * http://jquery.org/license 44 * 45 * Date: 2015-10-17 46 */ 47function(e){function t(e,t,n,r){var i,o,a,s,u,l,d,h,p=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&((t?t.ownerDocument||t:H)!==R&&N(t),t=t||R,D)){if(11!==m&&(l=ge.exec(e)))if(i=l[1]){if(9===m){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return J.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&x.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(i)),n}if(x.qsa&&!W[e+" "]&&(!A||!A.test(e))){if(1!==m)p=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(be,"\\$&"):t.setAttribute("id",s=L),o=(d=S(e)).length,u=fe.test(s)?"#"+s:"[id='"+s+"']";o--;)d[o]=u+" "+f(d[o]);h=d.join(","),p=ye.test(e)&&c(t.parentNode)||t}if(h)try{return J.apply(n,p.querySelectorAll(h)),n}catch(v){}finally{s===L&&t.removeAttribute("id")}}}return E(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[L]=!0,e}function i(e){var t=R.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=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);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 d(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=U++;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,c=[B,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=(l=t[L]||(t[L]={}))[t.uniqueID]||(l[t.uniqueID]={}))[r])&&s[0]===B&&s[1]===o)return c[2]=s[2];
vendor: 16,607 bytes, line 47
47if(u[r]=c,c[2]=e(t,n,a))return!0}}}function p(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 v(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 g(e,t,n,i,o,a){return i&&!i[L]&&(i=g(i)),o&&!o[L]&&(o=g(o,a)),r(function(r,a,s,u){var l,c,d,f=[],h=[],p=a.length,g=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?g:v(g,f,e,s,u),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,u),i)for(l=v(b,h),i(l,[],s,u),c=l.length;c--;)(d=l[c])&&(b[h[c]]=!(y[h[c]]=d));if(r){if(o||e){if(o){for(l=[],c=b.length;c--;)(d=b[c])&&l.push(y[c]=d);o(null,b=[],l,u)}for(c=b.length;c--;)(d=b[c])&&(l=o?ee(r,d):f[c])>-1&&(r[l]=!(a[l]=d))}}else b=v(b===a?b.splice(p,b.length):b),o?o(null,a,b,u):J.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=h(function(e){return e===t},a,!0),l=h(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==T)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[h(p(c),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[L]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return g(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&y(e.slice(s,r)),r<i&&y(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,d,f,h=0,p="0",m=r&&[],g=[],y=T,b=r||o&&w.find.TAG("*",l),_=B+=null==y?1:Math.random()||.1,x=b.length;for(l&&(T=a===R||a||l);p!==x&&null!=(c=b[p]);p++){if(o&&c){for(d=0,a||c.ownerDocument===R||(N(c),s=!D);f=e[d++];)if(f(c,a||R,s)){u.push(c);break}l&&(B=_)}i&&((c=!f&&c)&&h--,r&&m.push(c))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,g,a,s);if(r){if(h>0)for(;p--;)m[p]||g[p]||(g[p]=Y.call(u));g=v(g)}J.apply(u,g),l&&!r&&g.length>0&&h+n.length>1&&t.uniqueSort(u)}return l&&(B=_,T=y),m};return i?r(a):a}var _,x,w,C,k,S,j,E,T,P,$,N,R,M,D,A,I,O,F,L="sizzle"+1*new Date,H=e.document,B=0,U=0,q=n(),z=n(),W=n(),V=function(e,t){return e===t&&($=!0),0},K=1<<31,Q={}.hasOwnProperty,G=[],Y=G.pop,X=G.push,J=G.push,Z=G.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="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",oe=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),fe=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),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")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,_e=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=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)},we=function(){N()};try{J.apply(G=Z.call(H.childNodes),H.childNodes),G[H.childNodes.length].nodeType}catch(Ce){J={apply:G.length?function(e,t){X.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(_ in x=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},N=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:H;return r!==R&&9===r.nodeType&&r.documentElement?(M=(R=r).documentElement,D=!k(R),(n=R.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(R.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(R.getElementsByClassName),x.getById=i(function(e){return M.appendChild(e).id=L,!R.getElementsByName||!R.getElementsByName(L).length}),x.getById?(w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&D){var n=t.getElementById(e);return n?[n]:[]}},w.filter.ID=function(e){var t=e.replace(_e,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(_e,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&D)return t.getElementsByClassName(e)},I=[],A=[],(x.qsa=ve.test(R.querySelectorAll))&&(i(function(e){M.appendChild(e).innerHTML="<a id='"+L+"'></a><select id='"+L+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||A.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+L+"-]").length||A.push("~="),e.querySelectorAll(":checked").length||A.push(":checked"),e.querySelectorAll("a#"+L+"+*").length||A.push(".#.+[+~]")}),i(function(e){var t=R.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&A.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(x.matchesSelector=ve.test(O=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),I.push("!=",oe)}),A=A.length&&new RegExp(A.join("|")),I=I.length&&new RegExp(I.join("|")),t=ve.test(M.compareDocumentPosition),F=t||ve.test(M.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},V=t?function(e,t){if(e===t)return $=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===R||e.ownerDocument===H&&F(H,e)?-1:t===R||t.ownerDocument===H&&F(H,t)?1:P?ee(P,e)-ee(P,t):0:4&n?-1:1)}:function(e,t){if(e===t)return $=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===R?-1:t===R?1:i?-1:o?1:P?ee(P,e)-ee(P,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===H?-1:u[r]===H?1:0},R):R},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==R&&N(e),n=n.replace(ce,"='$1']"),x.matchesSelector&&D&&!W[n+" "]&&(!I||!I.test(n))&&(!A||!A.test(n)))try{var r=O.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(Ce){}return t(n,R,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==R&&N(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==R&&N(e);var n=w.attrHandle[t.toLowerCase()],r=n&&Q.call(w.attrHandle,t.toLowerCase())?n(e,t,!D):undefined;return r!==undefined?r:x.attributes||!D?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($=!x.detectDuplicates,P=!x.sortStable&&e.slice(0),e.sort(V),$){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return P=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},(w=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(_e,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,xe),"~="===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=S(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(_e,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&q(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(ae," ")+" ").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,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(v){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(h=(l=(c=(d=(f=v)[L]||(f[L]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===B&&l[1])&&l[2],f=h&&v.childNodes[h];f=++h&&f&&f[m]||(b=h=0)||p.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[B,h,b];break}}else if(y&&(b=h=(l=(c=(d=(f=t)[L]||(f[L]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===B&&l[1]),!1===b)for(;(f=++h&&f&&f[m]||(b=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++b||(y&&((c=(d=f[L]||(f[L]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[B,b]),f!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[L]?o(n):o.length>1?(i=[e,e,"",n],w.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=j(e.replace(se,"$1"));return i[L]?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(_e,xe),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(_e,xe).toLowerCase(),function(t){var n;do{if(n=D?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===M},focus:function(e){return e===R.activeElement&&(!R.hasFocus||R.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!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.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=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[_]=s(_);for(_ in{submit:!0,reset:!0})w.pseudos[_]=u(_);return d.prototype=w.filters=w.pseudos,w.setFilters=new d,S=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){for(a in r&&!(i=ue.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=le.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(se," ")}),s=s.slice(r.length)),w.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):z(e,u).slice(0)},j=t.compile=function(e,t){var n,r=[],i=[],o=W[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)(o=y(t[n]))[L]?r.push(o):i.push(o);(o=W(e,b(i,r))).selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,d=!r&&S(e=l.selector||e);if(n=n||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&D&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(_e,xe),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],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(_e,xe),ye.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return J.apply(n,r),n;break}}return(l||j(e,d))(r,t,!D,n,!t||ye.test(e)&&c(t.parentNode)||t),n},x.sortStable=L.split("").sort(V).join("")===L,x.detectDuplicates=!!$,N(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(R.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)}),x.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);pe.find=be,pe.expr=be.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=be.uniqueSort,pe.text=be.getText,pe.isXMLDoc=be.isXML,pe.contains=be.contains;var _e=function(e,t,n){for(var r=[],i=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Ce=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ke=/^.[^:#\[\.,]*$/;
vendor: 4,360 bytes, line 47
47pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t<i;t++)if(pe.contains(r[t],this))return!0}));for(t=0;t<i;t++)pe.find(e,r[t],n);return(n=this.pushStack(i>1?pe.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&&we.test(e)?pe(e):e||[],!1).length}});var Se,je=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Se,"string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:je.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),Ce.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=ie.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return Se.find(e);this.length=1,this[0]=i}return this.context=ie,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))}).prototype=pe.fn,Se=pe(ie);var Ee=/^(?:parents|prev(?:Until|All))/,Te={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=we.test(e)||"string"!=typeof e?pe(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&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _e(e,"parentNode")},parentsUntil:function(e,t,n){return _e(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return _e(e,"nextSibling")},prevAll:function(e){return _e(e,"previousSibling")},nextUntil:function(e,t,n){return _e(e,"nextSibling",n)},prevUntil:function(e,t,n){return _e(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Te[e]||(i=pe.uniqueSort(i)),Ee.test(e)&&(i=i.reverse())),this.pushStack(i)}});var Pe,$e,Ne=/\S+/g;for($e in pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function r(t){pe.each(t,function(t,n){pe.isFunction(n)?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==pe.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i}
47,fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.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=oe.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?oe.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]&&pe.isFunction(o[i].promise)?o[i].promise().progress(l(i,n,t)).done(l(i,r,o)).fail(u.reject):--s;return s||u.resolveWith(r,o),u.promise()}}),pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(!0===e?--pe.readyWait:pe.isReady)||(pe.isReady=!0,!0!==e&&--pe.readyWait>0||(Pe.resolveWith(ie,[pe]),pe.fn.triggerHandler&&(pe(ie).triggerHandler("ready"),pe(ie).off("ready"))))}}),pe.ready.promise=function(t){if(!Pe)if(Pe=pe.Deferred(),"complete"===ie.readyState||"loading"!==ie.readyState&&!ie.documentElement.doScroll)e.setTimeout(pe.ready);else if(ie.addEventListener)ie.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{ie.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&ie.documentElement}catch(r){}n&&n.doScroll&&function t(){if(!pe.isReady){try{n.doScroll("left")}catch(r){return e.setTimeout(t,50)}a(),pe.ready()}}()}return Pe.promise(t)},pe.ready.promise(),pe(fe))break;fe.ownFirst="0"===$e,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;(n=ie.getElementsByTagName("body")[0])&&n.style&&(t=ie.createElement("div"),(r=ie.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=ie.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var Re,Me=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},De=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ae=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando])&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(e===undefined){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&u(o,r=pe.camelCase(r.slice(5)),i[r]);pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):undefined},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.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 pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):t===undefined?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=pe.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=pe._data(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),fe.shrinkWrapBlocks=function(){return null!=Re?Re:(Re=!1,(t=ie.getElementsByTagName("body")[0])&&t.style?(e=ie.createElement("div"),(n=ie.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",t.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(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(ie.createElement("div")).style.width="5px",Re=3!==e.offsetWidth),t.removeChild(n),Re):void 0);var e,t,n};var Ie,Oe,Fe,Le=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,He=new RegExp("^(?:([+-])=|)("+Le+")([a-z%]*)$","i"),Be=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},qe=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;
47if("object"===pe.type(n))for(s in i=!0,n)qe(e,t,s,n[s],!0,o,a);else if(r!==undefined&&(i=!0,pe.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(pe(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},ze=/^(?:checkbox|radio)$/i,We=/<([\w:-]+)/,Ve=/^$|\/(?:java|ecma)script/i,Ke=/^\s+/,Qe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";Ie=ie.createElement("div"),Oe=ie.createDocumentFragment(),Fe=ie.createElement("input"),Ie.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",fe.leadingWhitespace=3===Ie.firstChild.nodeType,fe.tbody=!Ie.getElementsByTagName("tbody").length,fe.htmlSerialize=!!Ie.getElementsByTagName("link").length,fe.html5Clone="<:nav></:nav>"!==ie.createElement("nav").cloneNode(!0).outerHTML,Fe.type="checkbox",Fe.checked=!0,Oe.appendChild(Fe),fe.appendChecked=Fe.checked,Ie.innerHTML="<textarea>x</textarea>",fe.noCloneChecked=!!Ie.cloneNode(!0).lastChild.defaultValue,Oe.appendChild(Ie),(Fe=ie.createElement("input")).setAttribute("type","radio"),Fe.setAttribute("checked","checked"),Fe.setAttribute("name","t"),Ie.appendChild(Fe),fe.checkClone=Ie.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!Ie.addEventListener,Ie[pe.expando]=1,fe.attributes=!Ie.getAttribute(pe.expando);var Ge={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:fe.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td;var Ye=/<|&#?\w+;/,Xe=/<tbody/i;!function(){var t,n,r=ie.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(fe[t]=n in e)||(r.setAttribute(n,"t"),fe[t]=!1===r.attributes[n].expando);r=null}();var Je=/^(?:input|select|textarea)$/i,Ze=/^key/,et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tt=/^(?:focusinfocus|focusoutblur)$/,nt=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,h,p,m,v=pe._data(e);if(v){for(n.handler&&(n=(u=n).handler,i=u.selector),n.guid||(n.guid=pe.guid++),(a=v.events)||(a=v.events={}),(c=v.handle)||((c=v.handle=function(e){return void 0===pe||e&&pe.event.triggered===e.type?undefined:pe.event.dispatch.apply(c.elem,arguments)}).elem=e),s=(t=(t||"").match(Ne)||[""]).length;s--;)h=m=(o=nt.exec(t[s])||[])[1],p=(o[2]||"").split(".").sort(),h&&(l=pe.event.special[h]||{},h=(i?l.delegateType:l.bindType)||h,l=pe.event.special[h]||{},d=pe.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i, 48needsContext:i&&pe.expr.match.needsContext.test(i),namespace:p.join(".")},u),(f=a[h])||((f=a[h]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,r,p,c)||(e.addEventListener?e.addEventListener(h,c,!1):e.attachEvent&&e.attachEvent("on"+h,c))),l.add&&(l.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,d):f.push(d),pe.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,d,f,h,p,m,v=pe.hasData(e)&&pe._data(e);if(v&&(c=v.events)){for(l=(t=(t||"").match(Ne)||[""]).length;l--;)if(h=m=(s=nt.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=pe.event.special[h]||{},f=c[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;o--;)a=f[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));u&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,v.handle)||pe.removeEvent(e,h,v.handle),delete c[h])}else for(h in c)pe.event.remove(e,h+t[l],n,r,!0);pe.isEmptyObject(c)&&(delete v.handle,pe._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,u,l,c,d,f=[r||ie],h=de.call(t,"type")?t.type:t,p=de.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||ie,3!==r.nodeType&&8!==r.nodeType&&!tt.test(h+pe.event.triggered)&&(h.indexOf(".")>-1&&(h=(p=h.split(".")).shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,(t=t[pe.expando]?t:new pe.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[h]||{},i||!l.trigger||!1!==l.trigger.apply(r,n))){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||h,tt.test(u+h)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(r.ownerDocument||ie)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?u:l.bindType||h,(o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"))&&o.apply(s,n),(o=a&&s[a])&&o.apply&&Me(s)&&(t.result=
48o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=h,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(f.pop(),n))&&Me(r)&&a&&r[h]&&!pe.isWindow(r)){(c=r[a])&&(r[a]=null),pe.event.triggered=h;try{r[h]()}catch(m){}pe.event.triggered=undefined,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=oe.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,(r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))!==undefined&&!1===(e.result=r)&&(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&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n<s;n++)r[i=(o=t[n]).selector+" "]===undefined&&(r[i]=o.needsContext?pe(i,this).index(u)>-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=et.test(i)?this.mouseHooks:Ze.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];return e.target||(e.target=o.srcElement||ie),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 detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},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||ie).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!==x()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===x()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=ie.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},pe.Event=function(e,t){if(!(this instanceof pe.Event))return new pe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&!1===e.returnValue?y:b):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),this[pe.expando]=!0},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}}
48,pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||pe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),fe.submit||(pe.event.special.submit={setup:function(){if(pe.nodeName(this,"form"))return!1;pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):undefined;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){if(pe.nodeName(this,"form"))return!1;pe.event.remove(this,"._submit")}}),fe.change||(pe.event.special.change={setup:function(){if(Je.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1;pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Je.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!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 pe.event.remove(this,"._change"),!Je.test(this.nodeName)}}),fe.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=pe._data(r,t);i||r.addEventListener(e,n,!0),pe._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=pe._data(r,t)-1;i?pe._data(r,t,i):(r.removeEventListener(e,n,!0),pe._removeData(r,t))}}}),pe.fn.extend({on:function(e,t,n,r){return w(this,e,t,n,r)},one:function(e,t,n,r){return w(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(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=b),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}});var rt=/ jQuery\d+="(?:null|\d+)"/g,it=new RegExp("<(?:"+Qe+")[\\s/>]","i"),ot=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,at=/<script|<style|<link/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,ut=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct=h(ie).appendChild(ie.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(ot,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!it.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ct.innerHTML=e.outerHTML,ct.removeChild(o=ct.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=p(o),s=p(e),a=0;null!=(i=s[a]);++a)r[a]&&E(i,r[a]);if(t)if(n)for(s=s||p(e),r=r||p(o),a=0;null!=(i=s[a]);a++)j(i,r[a]);else j(e,o);return(r=p(o,"script")).length>0&&m(r,!u&&p(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||Me(n))&&(o=(i=n[s])&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=undefined:n.removeAttribute(s),re.push(i))}}}),pe.fn.extend({domManip:T,detach:function(e){return P(this,e,!0)},remove:function(e){return P(this,e)},text:function(e){return qe(this,function(e){return e===undefined?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ie).createTextNode(e))},null,e,arguments.length)},append:function(){return T(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||C(this,e).appendChild(e)})},prepend:function(){return T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(p(e,!1));e.firstChild;)e.removeChild(e.firstChild);
48e.options&&pe.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 pe.clone(this,e,t)})},html:function(e){return qe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(rt,""):undefined;if("string"==typeof e&&!at.test(e)&&(fe.htmlSerialize||!it.test(e))&&(fe.leadingWhitespace||!Ke.test(e))&&!Ge[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(pe.cleanData(p(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return T(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(p(this)),n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=0,i=[],o=pe(e),a=o.length-1;r<=a;r++)n=r===a?this:this.clone(!0),pe(o[r])[t](n),se.apply(i,n.get());return this.pushStack(i)}});var dt,ft={HTML:"block",BODY:"block"},ht=/^margin/,pt=new RegExp("^("+Le+")(?!px)[a-z%]+$","i"),mt=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},vt=ie.documentElement;!function(){function t(){var t,c,d=ie.documentElement;d.appendChild(u),l.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=i=s=!1,r=a=!0,e.getComputedStyle&&(c=e.getComputedStyle(l),n="1%"!==(c||{}).top,s="2px"===(c||{}).marginLeft,i="4px"===(c||{width:"4px"}).width,l.style.marginRight="50%",r="4px"===(c||{marginRight:"4px"}).marginRight,(t=l.appendChild(ie.createElement("div"))).style.cssText=l.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",l.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),l.removeChild(t)),l.style.display="none",(o=0===l.getClientRects().length)&&(l.style.display="",l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",l.childNodes[0].style.borderCollapse="separate",(t=l.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),d.removeChild(u)}var n,r,i,o,a,s,u=ie.createElement("div"),l=ie.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,(u=ie.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var gt,yt,bt=/^(top|right|bottom|left)$/;e.getComputedStyle?(gt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},yt=function(e,t,n){var r,i,o,a,s=e.style;return""!==(a=(n=n||gt(e))?n.getPropertyValue(t)||n[t]:undefined)&&a!==undefined||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&pt.test(a)&&ht.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+""}):vt.currentStyle&&(gt=function(e){return e.currentStyle},yt=function(e,t,n){var r,i,o,a,s=e.style;return null==(a=(n=n||gt(e))?n[t]:undefined)&&s&&s[t]&&(a=s[t]),pt.test(a)&&!bt.test(t)&&(r=s.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left
vendor: 6,777 bytes, line 48
48=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"});var _t=/alpha\([^)]*\)/i,xt=/opacity\s*=\s*([^)]*)/i,wt=/^(none|table(?!-c[ea]).+)/,Ct=new RegExp("^("+Le+")(.*)$","i"),kt={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:"0",fontWeight:"400"},jt=["Webkit","O","Moz","ms"],Et=ie.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=yt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=M(s)||s),a=pe.cssHooks[t]||pe.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=He.exec(n))&&i[1]&&(n=f(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.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=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=M(s)||s),(a=pe.cssHooks[t]||pe.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),o===undefined&&(o=yt(e,t,r)),"normal"===o&&t in St&&(o=St[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return wt.test(pe.css(e,"display"))&&0===e.offsetWidth?mt(e,kt,function(){return O(e,t,r)}):O(e,t,r)},set:function(e,n,r){var i=r&>(e);return A(e,n,r?I(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return xt.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=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(_t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=_t.test(o)?o.replace(_t,i):o+" "+i)}}),pe.cssHooks.marginRight=R(fe.reliableMarginRight,function(e,t){if(t)return mt(e,{display:"inline-block"},yt,[e,"marginRight"])}),pe.cssHooks.marginLeft=R(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(yt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-mt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Be[r]+t]=o[r]||o[r-2]||o[0];return i}},ht.test(e)||(pe.cssHooks[e+t].set=A)}),pe.fn.extend({css:function(e,t){return qe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=gt(e),i=t.length;a<i;a++)o[t[a]]=pe.css(e,t[a],!1,r);return o}return n!==undefined?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=F,F.prototype={constructor:F,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.options.duration?this.pos=t=pe.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):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=F.prototype.init,pe.fx.step={};var Tt,Pt,$t=/^(?:toggle|show|hide)$/,Nt=/queueHooks$/;pe.Animation=pe.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,He.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,r=0,i=e.length;r<i;r++)n=e[r],z.tweeners[n]=z.tweeners[n]||[],z.tweeners[n].unshift(t)},prefilters:[U],prefilter:function(e,t){t?z.prefilters.unshift(e):z.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return r.duration=pe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in pe.fx.speeds?pe.fx.speeds[r.duration]:pe.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=pe.isEmptyObject(e),o=pe.speed(t,n,r),a=function(){var t=z(this,pe.extend({},e),o);(i||pe._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=pe.timers,a=pe._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Nt.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||pe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=pe.timers,a=r?r.length:0;for(n.finish=!0,pe.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)
48);for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(H(t,!0),e,r,i)}}),pe.each({slideDown:H("show"),slideUp:H("hide"),slideToggle:H("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Tt=pe.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Tt=undefined},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){Pt||(Pt=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(Pt),Pt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx&&pe.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e,t=ie.createElement("input"),n=ie.createElement("div"),r=ie.createElement("select"),i=r.appendChild(ie.createElement("option"));(n=ie.createElement("div")).setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),(e=n.getElementsByTagName("a")[0]).style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!ie.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,(t=ie.createElement("input")).setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Rt=/\r/g,Mt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,pe(this).val()):e)?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),(t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))})):i?(t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:"string"==typeof(n=i.value)?n.replace(Rt,""):null==n?"":n:void 0}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(Mt," ")}},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)&&(fe.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a}
48,set:function(e,t){for(var n,r,i=e.options,o=pe.makeArray(t),a=i.length;a--;)if(r=i[a],pe.inArray(pe.valHooks.option.get(r),o)>-1)try{r.selected=n=!0}catch(_){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Dt,At,It=pe.expr.attrHandle,Ot=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Lt=fe.input;pe.fn.extend({attr:function(e,t){return qe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?At:Dt)),n!==undefined?null===n?void pe.removeAttr(e,t):i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=pe.find.attr(e,t))?undefined:r)},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Ne);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Lt&&Ft||!Ot.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),At={set:function(e,t,n){return!1===t?pe.removeAttr(e,n):Lt&&Ft||!Ot.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=It[t]||pe.find.attr;Lt&&Ft||!Ot.test(t)?It[t]=function(e,t,r){var i,o;return r||(o=It[t],It[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,It[t]=o),i}:It[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Lt&&Ft||(pe.attrHooks.value={set:function(e,t,n){if(!pe.nodeName(e,"input"))return Dt&&Dt.set(e,t,n);e.defaultValue=t}}),Ft||(Dt={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}},It.id=It.name=It.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Dt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Dt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||undefined},set:function(e,t){return e.style.cssText=t+""}});var Ht=/^(?:input|select|textarea|button|object)$/i,Bt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return qe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=undefined,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.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=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ht.test(e.nodeName)||Bt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Ut=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,W(this)))});if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[u++];)if(i=W(n),r=1===n.nodeType&&(" "+i+" ").replace(Ut," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=pe.trim(r))&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,W(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[u++];)if(i=W(n),r=1===n.nodeType&&(" "+i+" ").replace(Ut," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=pe.trim(r))&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,W(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(Ne)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else e!==undefined&&"boolean"!==n||((t=W(this))&&pe._data(this,"__className__",t),pe.attr(this,"class",t||!1===e?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+W(n)+" ").replace(Ut," ").indexOf(t)>-1)return!0;return!1}}),pe.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){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var qt=e.location,zt=pe.now(),Wt=/\?/,Vt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace(Vt,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?n=(new e.DOMParser).parseFromString(t,"text/xml"):((n=new e.ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t))}catch(r){n=undefined} 49return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var Kt=/#.*$/,Qt=/([?&])_=[^&]*/,Gt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Yt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Zt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,en={},tn={},nn="*/".concat("*"),rn=qt.href,on=Zt.exec(rn.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:rn,type:"GET",isLocal:Yt.test(on[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML}
49,flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,pe.ajaxSettings),t):Q(pe.ajaxSettings,e)},ajaxPrefilter:V(en),ajaxTransport:V(tn),ajax:function(t,n){function r(t,n,r,i){var o,d,y,b,x,C=n;2!==_&&(_=2,u&&e.clearTimeout(u),c=undefined,s=i||"",w.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(b=G(f,w,r)),b=Y(f,b,w,o),o?(f.ifModified&&((x=w.getResponseHeader("Last-Modified"))&&(pe.lastModified[a]=x),(x=w.getResponseHeader("etag"))&&(pe.etag[a]=x)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=b.state,d=b.data,o=!(y=b.error))):(y=C,!t&&C||(C="error",t<0&&(t=0))),w.status=t,w.statusText=(n||C)+"",o?m.resolveWith(h,[d,C,w]):m.rejectWith(h,[w,C,y]),w.statusCode(g),g=undefined,l&&p.trigger(o?"ajaxSuccess":"ajaxError",[w,f,o?d:y]),v.fireWith(h,[w,C]),l&&(p.trigger("ajaxComplete",[w,f]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=undefined),n=n||{};var i,o,a,s,u,l,c,d,f=pe.ajaxSetup({},n),h=f.context||f,p=f.context&&(h.nodeType||h.jquery)?pe(h):pe.event,m=pe.Deferred(),v=pe.Callbacks("once memory"),g=f.statusCode||{},y={},b={},_=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!d)for(d={};t=Gt.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return _||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return _||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(_<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 c&&c.abort(t),r(0,t),this}};if(m.promise(w).complete=v.add,w.success=w.done,w.error=w.fail,f.url=((t||f.url||rn)+"").replace(Kt,"").replace(Jt,on[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=pe.trim(f.dataType||"*").toLowerCase().match(Ne)||[""],null==f.crossDomain&&(i=Zt.exec(f.url.toLowerCase()),f.crossDomain=!(!i||i[1]===on[1]&&i[2]===on[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(on[3]||("http:"===on[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pe.param(f.data,f.traditional)),K(en,f,n,w),2===_)return w;for(o in(l=pe.event&&f.global)&&0==pe.active++&&pe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Wt.test(a)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Qt.test(a)?a.replace(Qt,"$1_="+zt++):a+(Wt.test(a)?"&":"?")+"_="+zt++)),f.ifModified&&(pe.lastModified[a]&&w.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&w.setRequestHeader("If-None-Match",pe.etag[a])),(f.data&&f.hasContent&&!1!==f.contentType||n.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]?", "+nn+"; q=0.01":""):f.accepts["*"]),f.headers)w.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(h,w,f)||2===_))return w.abort();for(o in x="abort",{success:1,error:1,complete:1})w[o](f[o]);if(c=K(tn,f,n,w)){if(w.readyState=1,l&&p.trigger("ajaxSend",[w,f]),2===_)return w;f.async&&f.timeout>0&&(u=e.setTimeout(function(){w.abort("timeout")},f.timeout));try{_=1,c.send(y,r)}catch(C){if(!(_<2))throw C;r(-1,C)}}else r(-1,"No Transport");return w},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,undefined,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=undefined),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(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 pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:J(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var an=/%20/g,sn=/\[\]$/,un=/\r?\n/g,ln=/^(?:submit|button|image|reset|file)$/i,cn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Z(n,e[n],t,i);return r.join("&").replace(an,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&cn.test(this.nodeName)&&!ln.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(un,"\r\n")}}):{name:t.name,value:n.replace(un,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=e.ActiveXObject!==undefined?function(){return this.isLocal?te():ie.documentMode>
498?ee():/^(get|post|head|put|delete|options)$/i.test(this.type)&&ee()||te()}:ee;var dn=0,fn={},hn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in fn)fn[e](undefined,!0)}),fe.cors=!!hn&&"withCredentials"in hn,(hn=fe.ajax=!!hn)&&pe.ajaxTransport(function(t){var n;if(!t.crossDomain||fe.cors)return{send:function(r,i){var o,a=t.xhr(),s=++dn;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)r[o]!==undefined&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete fn[s],n=undefined,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=fn[s]=n:n()},abort:function(){n&&n(undefined,!0)}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ie.head||pe("head")[0]||ie.documentElement;return{send:function(r,i){(t=ie.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 pn=[],mn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=pn.pop()||pe.expando+"_"+zt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(mn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&mn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(mn,"$1"+i):!1!==t.jsonp&&(t.url+=(Wt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){o===undefined?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,pn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=undefined}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ie;var r=Ce.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=g([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var vn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&vn)return vn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=pe.css(e,"position"),c=pe(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=pe.css(e,"to
49p"),u=pe.css(e,"left"),("absolute"===l||"fixed"===l)&&pe.inArray("auto",[o,u])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):c.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){pe.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,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=ne(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"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||vt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return qe(this,function(e,r,i){var o=ne(e);if(i===undefined)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=R(fe.pixelPosition,function(e,n){if(n)return n=yt(e,t),pt.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return qe(this,function(t,n,r){var i;return pe.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?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:undefined,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,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)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var gn=e.jQuery,yn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=yn),t&&e.jQuery===pe&&(e.jQuery=gn),pe},t||(e.jQuery=e.$=pe),pe}),function(){"use strict";var e=function(e,t){var n;e.rails!==t&&e.error("jquery-ujs has already been loaded!");var r=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form:not([data-turbo=true])",formInputClickSelector:"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return e("meta[name=csrf-token]").attr("content")}
49,csrfParam:function(){return e("meta[name=csrf-param]").attr("content")},CSRFProtection:function(e){var t=n.csrfToken();t&&e.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){e('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(t,n,r){var i=e.Event(n);return t.trigger(i,r),!1!==i.result},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e[0].href},isRemote:function(e){return e.data("remote")!==t&&!1!==e.data("remote")},handleRemote:function(r){var i,o,a,s,u,l;if(n.fire(r,"ajax:before")){if(s=r.data("with-credentials")||null,u=r.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,r.is("form")){i=r.data("ujs:submit-button-formmethod")||r.attr("method"),o=r.data("ujs:submit-button-formaction")||r.attr("action"),a=e(r[0]).serializeArray();var c=r.data("ujs:submit-button");c&&(a.push(c),r.data("ujs:submit-button",null)),r.data("ujs:submit-button-formmethod",null),r.data("ujs:submit-button-formaction",null)}else r.is(n.inputChangeSelector)?(i=r.data("method"),o=r.data("url"),a=r.serialize(),r.data("params")&&(a=a+"&"+r.data("params"))):r.is(n.buttonClickSelector)?(i=r.data("method")||"get",o=r.data("url"),a=r.serialize(),r.data("params")&&(a=a+"&"+r.data("params"))):(i=r.data("method"),o=n.href(r),a=r.data("params")||null);return l={type:i||"GET",data:a,dataType:u,beforeSend:function(e,i){if(i.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+i.accepts.script),!n.fire(r,"ajax:beforeSend",[e,i]))return!1;r.trigger("ajax:send",e)},success:function(e,t,n){r.trigger("ajax:success",[e,t,n])},complete:function(e,t){r.trigger("ajax:complete",[e,t])},error:function(e,t,n){r.trigger("ajax:error",[e,t,n])},crossDomain:n.isCrossDomain(o)},s&&(l.xhrFields={withCredentials:s}),o&&(l.url=o),n.ajax(l)}return!1},isCrossDomain:function(e){var t=document.createElement("a");t.href=location.href;var n=document.createElement("a");try{return n.href=e,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(r){return!0}},handleMethod:function(r){var i=n.href(r),o=r.data("method"),a=r.attr("target"),s=n.csrfToken(),u=n.csrfParam(),l=e('<form method="post" action="'+i+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';u===t||s===t||n.isCrossDomain(i)||(c+='<input name="'+u+'" value="'+s+'" type="hidden" />'),a&&l.attr("target",a),l.hide().append(c).appendTo("body"),l.submit()},formElements:function(t,n){return t.is("form")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,r;n=e.is("button")?"html":"val",(r=e.data("disable-with"))!==t&&(e.data("ujs:enable-with",e[n]()),e[n](r)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var n=e.is("button")?"html":"val";e.data("ujs:enable-with")!==t&&(e[n](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,r=e.data("confirm"),i=!1;if(!r)return!0;if(n.fire(e,"confirm")){try{i=n.confirm(r)}catch(o){(console.error||console.log).call(console,o.stack||o)}t=n.fire(e,"confirm:complete",[i])}return i&&t},blankInputs:function(t,n,r){var i,o,a,s=e(),u=n||"input,textarea",l=t.find(u),c={};return l.each(function(){(i=e(this)).is("input[type=radio]")?(a=i.attr("name"),c[a]||(0===t.find('input[type=radio]:checked[name="'+a+'"]').length&&(o=t.find('input[type=radio][name="'+a+'"]'),s=s.add(o)),c[a]=a)):(i.is("input[type=checkbox],input[type=radio]")?i.is(":checked"):!!i.val())===r&&(s=s.add(i))}),!!s.length&&s},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){var r=e.data("disable-with");r!==t&&(e.data("ujs:enable-with",e.html()),e.html(r)),e.on("click.railsDisable",function(e){return n.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.off("click.railsDisable"),e.removeData("ujs:disabled")}},n.fire(r,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,r){e.crossDomain||n.CSRFProtection(r)}),e(window).on("pageshow.rails",function(){e(e.rails.enableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableFormElement(t)}),e(e.rails.linkDisableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableElement(t)})}),r.on("ajax:complete",n.linkDisableSelector,function(){n.enableElement(e(this))}),r.on("ajax:complete",n.buttonDisableSelector,function(){n.enableFormElement(e(this))}),r.on("click.rails",n.linkClickSelector,function(t){var r=e(this),i=r.data("method"),o=r.data("params"),a=t.metaKey||t.ctrlKey;if(!n.allowAction(r))return n.stopEverything(t);if(!a&&r.is(n.linkDisableSelector)&&n.disableElement(r),n.isRemote(r)){if(a&&
49(!i||"GET"===i)&&!o)return!0;var s=n.handleRemote(r);return!1===s?n.enableElement(r):s.fail(function(){n.enableElement(r)}),!1}return i?(n.handleMethod(r),!1):void 0}),r.on("click.rails",n.buttonClickSelector,function(t){var r=e(this);if(!n.allowAction(r)||!n.isRemote(r))return n.stopEverything(t);r.is(n.buttonDisableSelector)&&n.disableFormElement(r);var i=n.handleRemote(r);return!1===i?n.enableFormElement(r):i.fail(function(){n.enableFormElement(r)}),!1}),r.on("change.rails",n.inputChangeSelector,function(t){var r=e(this);return n.allowAction(r)&&n.isRemote(r)?(n.handleRemote(r),!1):n.stopEverything(t)}),r.on("submit.rails",n.formSubmitSelector,function(r){var i,o,a=e(this),s=n.isRemote(a);if(!n.allowAction(a))return n.stopEverything(r);if(a.attr("novalidate")===t)if(a.data("ujs:formnovalidate-button")===t){if((i=n.blankInputs(a,n.requiredInputSelector,!1))&&n.fire(a,"ajax:aborted:required",[i]))return n.stopEverything(r)}else a.data("ujs:formnovalidate-button",t);if(s){if(o=n.nonBlankInputs(a,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(a)},13);var u=n.fire(a,"ajax:aborted:file",[o]);return u||setTimeout(function(){n.enableFormElements(a)},13),u}return n.handleRemote(a),!1}setTimeout(function(){n.disableFormElements(a)},13)}),r.on("click.rails",n.formInputClickSelector,function(t){var r=e(this);if(!n.allowAction(r))return n.stopEverything(t);var i=r.attr("name"),o=i?{name:i,value:r.val()}:null,a=r.closest("form");0===a.length&&(a=e("#"+r.attr("form"))),a.data("ujs:submit-button",o),a.data("ujs:formnovalidate-button",r.attr("formnovalidate")),a.data("ujs:submit-button-formaction",r.attr("formaction")),a.data("ujs:submit-button-formmethod",r.attr("formmethod"))}),r.on("ajax:send.rails",n.formSubmitSelector,function(t){this===t.target&&n.disableFormElements(e(this))}),r.on("ajax:complete.rails",n.formSubmitSelector,function(t){this===t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))};window.jQuery?e(jQuery):"object"==typeof exports&&"object"==typeof module&&(module.exports=e)}(), 50/*! Licensed under MIT, https://github.com/sofish/pen */ 51function(){if(this.Pen){var e={keymap:{96:"`",62:">",49:"1",46:".",45:"-",42:"*",35:"#"},stack:[],valid:function(e){var t=e.length;return e.match(/[#]{1,6}/)?["h"+t,t]:"```"===e?["pre",t]:">"===e?["blockquote",t]:"1."===e?["insertorderedlist",t]:"-"===e||"*"===e?["insertunorderedlist",t]:e.match(/(?:\.|\*|\-){3,}/)?["inserthorizontalrule",t]:void 0},parse:function(e){var t=e.keyCode||e.which;if(32===t){var n=this.stack.join("");return this.stack.length=0,this.valid(n)}return this.keymap[t]&&this.stack.push(this.keymap[t]),!1},action:function(e,t){if(!(e._sel.focusOffset>t[1])){var n=e._sel.focusNode;n.textContent=n.textContent.slice(t[1]),e._actions(t[0]),e.nostyle()}},init:function(t){t.config.editor.addEventListener("keypress",function(n){var r=e.parse(n);if(r)return e.action(t,r)})}};window.Pen.prototype.markdown=e}}(), 52/*! Licensed under MIT, https://github.com/sofish/pen 53 * jshint -W030, -W093, -W015 54 * Tweaked by Inkshares. 55 * GRATUITOUS COMMENT TO MAKE SURE JS IS COPYING OVER. 56*/ 57function(e){var t,n,r={is:function(e,t){return Object.prototype.toString.call(e).slice(8,-1)===t},copy:function(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e[n]=this.is(r,"Object")?this.copy({},r):this.is(r,"Array")?this.copy([],r):r}return e},log:function(e,t){(window._pen_debug_mode_on||t)&&console.log("%cPEN DEBUGGER: %c"+e,"font-family:arial,sans-serif;color:#1abf89;line-height:2em;","font-family:cursor,monospace;color:#333;")},shift:function(e,t,n){n=n||50;var r,i=this["_shift_fn"+e],o="shift_timeout"+e;i?i.concat([t,n]):i=[[t,n]],r=i.pop(),clearTimeout(this[o]),this[o]=setTimeout(function(){r[0]()},n)},merge:function(e){var t={"class":"pen",debug:!1,stay:e.stay||!e.debug,textarea:'<textarea name="content"></textarea>',list:["blockquote","h2","h3","p","insertorderedlist","insertunorderedlist","inserthorizontalrule","indent","outdent","bold","italic","underline","createlink","insertimg"]};return 1===e.nodeType?t.editor=e:e.match&&e.match(/^#[\S]+$/)?t.editor=document.getElementById(e.slice(1)):t=r.copy(t,e),t}};(t=function(t){if(!t)return r.log("can't find config",!0);var n=r.merge(t);if(1!==n.editor.nodeType)return r.log("can't find editor");n.debug&&(window._pen_debug_mode_on=!0);var i=n.editor;t.imageCallBack;i.classList.add(n["class"]),i.getAttribute("contenteditable")||i.setAttribute("contenteditable","true");var o=i.getAttribute("data-behavior");(!o||o.indexOf("penable")<0)&&i.setAttribute("data-behavior","penable"),this.config=n,this._sel=e.getSelection(),this.actions(),this.toolbar(),this.markdown&&this.markdown.init(this),this.config.stay&&this.stay()}).prototype._hasPenableParent=function(e){try{for(var t=e.getRangeAt(0).commonAncestorContainer.parentNode,n=[];t&&t.getAttribute&&!1===/\bpenable\b/.test(t.getAttribute("data-behavior"));)n.unshift(t),t=t.parentNode;return t.getAttribute&&!0===/\bpenable\b/.test(t.getAttribute("data-behavior"))}catch(r){return!1}},t.prototype._effectNode=function(e,t){for(var n=[];null!=e&&e!==this.config.editor;)e.nodeName.match(/(?:[pubia]|h[1-6]|blockquote|[uo]l|li)/i)&&n.push(t?e.nodeName.toLowerCase():e),e=e.parentNode;return n},t.prototype.nostyle=function(){var e=this.config.editor.querySelectorAll("[style]");return[].slice.call(e).forEach(function(e){0>e.getAttribute("style").indexOf("background-image")&&e.removeAttribute("style")}),this},t.prototype.toolbar=function(){for(var t=this,n="",i=0,o=this.config.list;i<o.length;i++){var a=o[i];n+='<i class="'+("pen-icon icon-"+a)+'" data-action="'+a+'">'+(a.match(/^h[1-6]|p$/i)?a.toUpperCase():"")+"</i>","createlink"===a&&(n+='<input class="pen-input" placeholder="Press Enter to insert link" />')}var s=e.createElement("div");s.setAttribute("class",this.config["class"]+"-menu pen-menu"),s.innerHTML=n,s.style.display="none",e.body.appendChild(this._menu=s);var u=function(){"block"===s.style.display&&t.menu()};window.addEventListener("resize",u),window.addEventListener("scroll",u);this.config.editor;var l=function(){t._isDestroyed||r.shift("toggle_menu",function(){if(t._hasPenableParent(t._sel)){var e=t._sel;e.isCollapsed?t._menu.style.display="none":(t._range=e.getRangeAt(0),t.menu().highlight())}},200)};return e.body.addEventListener("mouseup",l),e.body.addEventListener("keyup",l),s.addEventListener("click",function(e){var n=e.target.getAttribute("data-action");if(n){var r=function(e){t._sel.removeAllRanges(),t._sel.addRange(t._range),t._actions(n,e),t._range=t._sel.getRangeAt(0),t.highlight().nostyle().menu()};if("insertimg"===n&&function(){var e="<form name='ajax-photo-form' method='post' action='/api/photos' enctype='multipart/form-data' method='post' id='ajax-photo-form'><input type='file' id='temp-file-input'></input></form>";$("body").append(e),$("#ajax-photo-form").on("submit",function(e){e.preventDefault();var n=$("#temp-file-input"),r=new FormData;r.append("picture",n[0].files[0]),$.ajax({type:"POST",url:$(this).attr("action"),data:r,datatype:"json",cache:!1,processData:!1,contentType:!1,success:function(e){var n=document.createElement("img");
57n.setAttribute("src",e),t._range.collapse(),t._range.insertNode(n)},error:function(e){var n="We would have inserted your image, but "+e.responseText,r=document.createElement("br"),i=document.createElement("div"),o=document.createElement("div");o.innerHTML="</br>",i.setAttribute("class","pennable-error-message"),i.innerHTML=n,t._range.collapse(),t._range.insertNode(o),t._range.insertNode(i),t._range.insertNode(r)},complete:function(){$("#ajax-photo-form").remove()}})}),$("#temp-file-input").on("change",function(){$("#ajax-photo-form").submit()}),$("#temp-file-input").trigger("click")}(),"createlink"===n){var i,o=s.getElementsByTagName("input")[0];return o.style.display="block",o.focus(),i=function(e){if(e.style.display="none",e.value)return r(e.value.replace(/(^\s+)|(\s+$)/g,"").replace(/^(?!http:\/\/|https:\/\/)(.*)$/,"http://$1"));n="unlink",r()},o.onkeypress=function(e){if(13===e.which)return i(e.target)}}r()}}),this},t.prototype.highlight=function(){var e,t=this._sel.focusNode,n=this._effectNode(t),r=this._menu,i=r.querySelector("input");
57return[].slice.call(r.querySelectorAll(".active")).forEach(function(e){e.classList.remove("active")}),i&&(i.style.display="none"),e=function(e){var t=".icon-"+e,n=r.querySelector(t);return n&&n.classList.add("active")},n.forEach(function(t){var n=t.nodeName.toLowerCase();switch(n){case"a":return r.querySelector("input").value=t.href,e("createlink");case"i":return e("italic");case"u":return e("underline");case"b":return e("bold");case"ul":return e("insertunorderedlist");case"ol":case"ol":return e("insertorderedlist");case"li":return e("indent");default:e(n)}}),this},t.prototype.actions=function(){var e,t,n,i,o=this;return e={block:/^(?:p|h[1-6]|blockquote|pre)$/,inline:/^(?:bold|italic|underline|insertorderedlist|insertunorderedlist|indent|outdent)$/,source:/^(?:insertimage|createlink|unlink)$/,insert:/^(?:inserthorizontalrule|insert)$/},n=function(e,t){var n=" to exec \u300c"+e+"\u300d command"+(t?" with value: "+t:"");document.execCommand(e,!1,t)&&o.config.debug?r.log("success"+n):r.log("fail"+n)},i=function(e){for(var t=o._sel.getRangeAt(0),r=t.startContainer;1!==r.nodeType;)r=r.parentNode;return t.selectNode(r),t.collapse(!1),n(e)},t=function(e){if(-1!==o._effectNode(o._sel.getRangeAt(0).startContainer,!0).indexOf(e)){if("blockquote"===e)return document.execCommand("outdent",!1,null);e="p"}return n("formatblock",e)},this._actions=function(o,a){o.match(e.block)?t(o):o.match(e.inline)||o.match(e.source)?n(o,a):o.match(e.insert)?i(o):this.config.debug&&r.log("can not find command function for name: "+o+(a?", value: "+a:""))},this},t.prototype.menu=function(){var e=this._range.getBoundingClientRect(),t=e.top-10,n=e.left+e.width/2,r=this._menu;return r.style.display="block",r.style.top=t-r.clientHeight+"px",r.style.left=n-r.clientWidth/2+"px",this},t.prototype.stay=function(){var e=this;!window.onbeforeunload&&(window.onbeforeunload=function(){if(!e._isDestroyed)return"Are you going to leave here?"})},t.prototype.destroy=function(e){var t=!e,n=e?"setAttribute":"removeAttribute";return e||(this._sel.removeAllRanges(),this._menu.style.display="none"),this._isDestroyed=t,this.config.editor[n]("contenteditable",""),this},t.prototype.rebuild=function(){return this.destroy("it's a joke")},n=function(e){if(!e)return r.log("can't find config",!0);var t=r.merge(e),n=t.editor.getAttribute("class");return n=n?n.replace(/\bpen\b/g,"")+" pen-textarea "+t["class"]:"pen pen-textarea",t.editor.setAttribute("class",n),t.editor.innerHTML=t.textarea,t.editor},this.Pen=e.getSelection?t:n}(document);var CryptoJS=CryptoJS||function(e,t){var n={},r=n.lib={},i=function(){},o=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=r.WordArray=o.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new a.init(n,t)}}),s=n.enc={},u=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(d){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=i/(4*o);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,i=e.min(4*t,i),t){for(var u=0;u<t;u+=o)this._doProcessBlock(r,u);u=r.splice(0,t),n.sigBytes-=i}return new a.init(u,i)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}});var f=n.algo={};return n}(Math); 58/*! 59 * Bootstrap v3.0.2 by @fat and @mdo 60 * Copyright 2013 Twitter, Inc. 61 * Licensed under http://www.apache.org/licenses/LICENSE-2.0 62 * 63 * Designed and built with all the love in the world by @mdo and @fat. 64 */ 65if(function(e){function t(e,t,n,r,i,o,a){return((e=e+(t&n|~t&r)+i+a)<<o|e>>>32-o)+t}function n(e,t,n,r,i,o,a){return((e=e+(t&r|n&~r)+i+a)<<o|e>>>32-o)+t}function r(e,t,n,r,i,o,a){return((e=e+(t^n^r)+i+a)<<o|e>>>32-o)+t}function i(e,t,n,r,i,o,a){return((e=e+(n^(t|~r))+i+a)<<o|e>>>32-o)+t}
65for(var o=CryptoJS,a=(u=o.lib).WordArray,s=u.Hasher,u=o.algo,l=[],c=0;64>c;c++)l[c]=4294967296*e.abs(e.sin(c+1))|0;u=u.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var s=e[d=o+a];e[d]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var u,c,d=e[o+0],f=(s=e[o+1],e[o+2]),h=e[o+3],p=e[o+4],m=e[o+5],v=e[o+6],g=e[o+7],y=e[o+8],b=e[o+9],_=e[o+10],x=e[o+11],w=e[o+12],C=e[o+13],k=e[o+14],S=e[o+15],j=a[0],E=i(E=i(E=i(E=i(E=r(E=r(E=r(E=r(E=n(E=n(E=n(E=n(E=t(E=t(E=t(E=t(E=a[1],c=t(c=a[2],u=t(u=a[3],j=t(j,E,c,u,d,7,l[0]),E,c,s,12,l[1]),j,E,f,17,l[2]),u,j,h,22,l[3]),c=t(c,u=t(u,j=t(j,E,c,u,p,7,l[4]),E,c,m,12,l[5]),j,E,v,17,l[6]),u,j,g,22,l[7]),c=t(c,u=t(u,j=t(j,E,c,u,y,7,l[8]),E,c,b,12,l[9]),j,E,_,17,l[10]),u,j,x,22,l[11]),c=t(c,u=t(u,j=t(j,E,c,u,w,7,l[12]),E,c,C,12,l[13]),j,E,k,17,l[14]),u,j,S,22,l[15]),c=n(c,u=n(u,j=n(j,E,c,u,s,5,l[16]),E,c,v,9,l[17]),j,E,x,14,l[18]),u,j,d,20,l[19]),c=n(c,u=n(u,j=n(j,E,c,u,m,5,l[20]),E,c,_,9,l[21]),j,E,S,14,l[22]),u,j,p,20,l[23]),c=n(c,u=n(u,j=n(j,E,c,u,b,5,l[24]),E,c,k,9,l[25]),j,E,h,14,l[26]),u,j,y,20,l[27]),c=n(c,u=n(u,j=n(j,E,c,u,C,5,l[28]),E,c,f,9,l[29]),j,E,g,14,l[30]),u,j,w,20,l[31]),c=r(c,u=r(u,j=r(j,E,c,u,m,4,l[32]),E,c,y,11,l[33]),j,E,x,16,l[34]),u,j,k,23,l[35]),c=r(c,u=r(u,j=r(j,E,c,u,s,4,l[36]),E,c,p,11,l[37]),j,E,g,16,l[38]),u,j,_,23,l[39]),c=r(c,u=r(u,j=r(j,E,c,u,C,4,l[40]),E,c,d,11,l[41]),j,E,h,16,l[42]),u,j,v,23,l[43]),c=r(c,u=r(u,j=r(j,E,c,u,b,4,l[44]),E,c,w,11,l[45]),j,E,S,16,l[46]),u,j,f,23,l[47]),c=i(c,u=i(u,j=i(j,E,c,u,d,6,l[48]),E,c,g,10,l[49]),j,E,k,15,l[50]),u,j,m,21,l[51]),c=i(c,u=i(u,j=i(j,E,c,u,w,6,l[52]),E,c,h,10,l[53]),j,E,_,15,l[54]),u,j,s,21,l[55]),c=i(c,u=i(u,j=i(j,E,c,u,y,6,l[56]),E,c,S,10,l[57]),j,E,v,15,l[58]),u,j,C,21,l[59]),c=i(c,u=i(u,j=i(j,E,c,u,p,6,l[60]),E,c,x,10,l[61]),j,E,f,15,l[62]),u,j,b,21,l[63]);a[0]=a[0]+j|0,a[1]=a[1]+E|0,a[2]=a[2]+c|0,a[3]=a[3]+u|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=s._createHelper(u),o.HmacMD5=s._createHmacHelper(u)}(Math),function(){function e(e,t,n){n=(n||0)-1;for(var r=e?e.length:0;++n<r;)if(e[n]===t)return n;return-1}function t(t,n){var r=typeof n;if(t=t.l,"boolean"==r||null==n)return t[n]?0:-1;"number"!=r&&"string"!=r&&(r="object");var i="number"==r?n:g+n;return t=(t=t[r])&&t[i],"object"==r?t&&-1<e(t,n)?0:-1:t?0:-1}function n(e){var t=this.l,n=typeof e;if("boolean"==n||null==e)t[e]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:g+e;t=t[n]||(t[n]={});"object"==n?(t[r]||(t[r]=[])).push(e):t[r]=!0}}function r(e){return e.charCodeAt(0)}function i(e,t){for(var n=e.m,r=t.m,i=-1,o=n.length;++i<o;){var a=n[i],s=r[i];if(a!==s){if(a>s||void 0===a)return 1;if(a<s||void 0===s)return-1}}return e.n-t.n}function o(e){var t=-1,r=e.length,i=e[0],o=e[r/2|0],a=e[r-1];if(i&&"object"==typeof i&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;for((i=u())["false"]=i["null"]=i["true"]=i.undefined=!1,(o=u()).k=e,o.l=i,o.push=n;++t<r;)o.push(e[t]);return o}function a(e){return"\\"+V[e]}function s(){return p.pop()||[]}function u(){return m.pop()||{k:null,l:null,m:null,"false":!1,n:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,o:null}}function l(e){e.length=0,p.length<b&&p.push(e)}function c(e){var t=e.l;t&&c(t),e.k=e.l=e.m=e.object=e.number=e.string=e.o=null,m.length<b&&m.push(e)}function d(e,t,n){t||(t=0),void 0===n&&(n=e?e.length:0);var r=-1;n=n-t||0;for(var i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function f(n){function p(e){if(!e||ct.call(e)!=L)return!1;var t=e.valueOf,n="function"==typeof t&&(n=vt(t))&&vt(n);return n?e==n||vt(e)==n:pe(e)}function m(e,t,n){if(!e||!W[typeof e])return e;t=t&&void 0===n?t:ne(t,n,3);for(var r=-1,i=W[typeof e]&&At(e),o=i?i.length:0;
65++r<o&&!1!==t(e[n=i[r]],n,e););return e}function b(e,t,n){var r;if(!e||!W[typeof e])return e;for(r in t=t&&void 0===n?t:ne(t,n,3),e)if(!1===t(e[r],r,e))break;return e}function V(e,t,n){var r,i=e,o=i;if(!i)return o;for(var a=arguments,s=0,u="number"==typeof n?2:a.length;++s<u;)if((i=a[s])&&W[typeof i])for(var l=-1,c=W[typeof i]&&At(i),d=c?c.length:0;++l<d;)"undefined"==typeof o[r=c[l]]&&(o[r]=i[r]);return o}function Q(e,t,n){var r,i=e,o=i;if(!i)return o;var a=arguments,s=0,u="number"==typeof n?2:a.length;if(3<u&&"function"==typeof a[u-2])var l=ne(a[--u-1],a[u--],2);else 2<u&&"function"==typeof a[u-1]&&(l=a[--u]);for(;++s<u;)if((i=a[s])&&W[typeof i])for(var c=-1,d=W[typeof i]&&At(i),f=d?d.length:0;++c<f;)o[r=d[c]]=l?l(o[r],i[r]):i[r];return o}function G(e){var t,n=[];if(!e||!W[typeof e])return n;for(t in e)gt.call(e,t)&&n.push(t);return n}function Y(e){return e&&"object"==typeof e&&!Dt(e)&>.call(e,"__wrapped__")?e:new X(e)}function X(e,t){this.__chain__=!!t,this.__wrapped__=e}function Z(e){function t(){if(r){var e=r.slice();yt.apply(e,arguments)}if(this instanceof t){var o=te(n.prototype);return xe(e=n.apply(o,e||arguments))?e:o}return n.apply(i,e||arguments)}var n=e[0],r=e[2],i=e[4];return Mt(t,e),t}function ee(e,t,n,r,i){if(n){var o=n(e);if(void 0!==o)return o}if(!xe(e))return e;var a=ct.call(e);if(!U[a])return e;var u=Nt[a];switch(a){case A:case I:return new u(+e);case F:case B:return new u(e);case H:return(o=u(e.source,S.exec(e))).lastIndex=e.lastIndex,o}if(a=Dt(e),t){var c=!r;r||(r=s()),i||(i=s());for(var f=r.length;f--;)if(r[f]==e)return i[f];o=a?u(e.length):{}}else o=a?d(e):Q({},e);return a&&(gt.call(e,"index")&&(o.index=e.index),gt.call(e,"input")&&(o.input=e.input)),t?(r.push(e),i.push(o),(a?Pe:m)(e,function(e,a){o[a]=ee(e,t,n,r,i)}),c&&(l(r),l(i)),o):o}function te(e){return xe(e)?wt(e):{}}function ne(e,t,n){if("function"!=typeof e)return Ve;if(void 0===t||!("prototype"in e))return e;var r=e.__bindData__;if(void 0===r&&(Rt.funcNames&&(r=!e.name),!(r=r||!Rt.funcDecomp))){var i=mt.call(e);Rt.funcNames||(r=!j.test(i)),r||(r=$.test(i),Mt(e,r))}if(!1===r||!0!==r&&1&r[1])return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return ze(e,t)}function re(e){function t(){var e=u?a:this;if(i){var p=i.slice();yt.apply(p,arguments)}return(o||c)&&(p||(p=d(arguments)),o&&yt.apply(p,o),c&&p.length<s)?(r|=16,re([n,f?r:-4&r,p,null,a,s])):(p||(p=arguments),l&&(n=e[h]),this instanceof t?(e=te(n.prototype),xe(p=n.apply(e,p))?p:e):n.apply(e,p))}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=1&r,l=2&r,c=4&r,f=8&r,h=n;return Mt(t,e),t}function ie(n,r){var i=-1,a=he(),s=n?n.length:0,u=s>=y&&a===e,l=[];if(u){var d=o(r);d?(a=t,r=d):u=!1}for(;++i<s;)0>a(r,d=n[i])&&l.push(d);return u&&c(r),l}function oe(e,t,n,r){r=(r||0)-1;for(var i=e?e.length:0,o=[];++r<i;){var a=e[r];if(a&&"object"==typeof a&&"number"==typeof a.length&&(Dt(a)||ve(a))){t||(a=oe(a,t,n));var s=-1,u=a.length,l=o.length;for(o.length+=u;++s<u;)o[l++]=a[s]}else n||o.push(a)}return o}function ae(e,t,n,r,i,o){if(n&&void 0!==(h=n(e,t)))return!!h;if(e===t)return 0!==e||1/e==1/t;if(e==e&&!(e&&W[typeof e]||t&&W[typeof t]))return!1;if(null==e||null==t)return e===t;var a=ct.call(e),u=ct.call(t);if(a==M&&(a=L),u==M&&(u=L),a!=u)return!1;switch(a){case A:case I:return+e==+t;case F:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case H:case B:return e==ot(t)}if(!(u=a==D)){var c=gt.call(e,"__wrapped__"),d=gt.call(t,"__wrapped__");
65if(c||d)return ae(c?e.__wrapped__:e,d?t.__wrapped__:t,n,r,i,o);if(a!=L)return!1;if((a=e.constructor)!=(c=t.constructor)&&!(_e(a)&&a instanceof a&&_e(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}for(c=!i,i||(i=s()),o||(o=s()),a=i.length;a--;)if(i[a]==e)return o[a]==t;var f=0,h=!0;if(i.push(e),o.push(t),u){if(a=e.length,f=t.length,!(h=f==e.length)&&!r)return h;for(;f--;)if(u=a,c=t[f],r)for(;u--&&!(h=ae(e[u],c,n,r,i,o)););else if(!(h=ae(e[f],c,n,r,i,o)))break;return h}return b(t,function(t,a,s){return gt.call(s,a)?(f++,h=gt.call(e,a)&&ae(e[a],t,n,r,i,o)):void 0}),h&&!r&&b(e,function(e,t,n){return gt.call(n,t)?h=-1<--f:void 0}),c&&(l(i),l(o)),h}function se(e,t,n,r,i){(Dt(t)?Pe:m)(t,function(t,o){var a,s,u=t,l=e[o];if(t&&((s=Dt(t))||p(t))){for(u=r.length;u--;)if(a=r[u]==t){l=i[u];break}var c;if(!a)n&&(c=void 0!==(u=n(l,t)))&&(l=u),c||(l=s?Dt(l)?l:[]:p(l)?l:{}),r.push(t),i.push(l),c||se(l,t,n,r,i)}else n&&(void 0===(u=n(l,t))&&(u=t)),void 0!==u&&(l=u);e[o]=l})}function ue(e,t){return e+pt($t()*(t-e+1))}function le(n,r,i){var a=-1,u=he(),d=n?n.length:0,f=[],h=!r&&d>=y&&u===e,p=i||h?s():f;h&&((m=o(p))?(u=t,p=m):(h=!1,p=i?p:(l(p),f)));for(;++a<d;){var m=n[a],v=i?i(m,a,n):m;(r?!a||p[p.length-1]!==v:0>u(p,v))&&((i||h)&&p.push(v),f.push(m))}return h?(l(p.k),c(p)):i&&l(p),f}function ce(e){return function(t,n,r){var i={};n=Y.createCallback(n,r,3),r=-1;var o=t?t.length:0;if("number"==typeof o)for(;++r<o;){var a=t[r];e(i,a,n(a,r,t),t)}else m(t,function(t,r,o){e(i,t,n(t,r,o),o)});return i}}function de(e,t,n,r,i,o){var a=1&t,s=4&t,u=16&t,l=32&t;if(!(2&t||_e(e)))throw new at;u&&!n.length&&(t&=-17,u=n=!1),l&&!r.length&&(t&=-33,l=r=!1);var c=e&&e.__bindData__;return c&&!0!==c?(c=c.slice(),!a||1&c[1]||(c[4]=i),!a&&1&c[1]&&(t|=8),!s||4&c[1]||(c[5]=o),u&&yt.apply(c[2]||(c[2]=[]),n),l&&yt.apply(c[3]||(c[3]=[]),r),c[1]|=t,de.apply(null,c)):(1==t||17===t?Z:re)([e,t,n,r,i,o])}function fe(e){return It[e]}function he(){var t=(t=Y.indexOf)===Fe?e:t;return t}function pe(e){var t,n;return!!(e&&ct.call(e)==L&&(t=e.constructor,!_e(t)||t instanceof t))&&(b(e,function(e,t){n=t}),void 0===n||gt.call(e,n))}function me(e){return Ot[e]}function ve(e){return e&&"object"==typeof e&&"number"==typeof e.length&&ct.call(e)==M||!1}function ge(e,t,n){var r=At(e),i=r.length;for(t=ne(t,n,3);i--&&!1!==t(e[n=r[i]],n,e););return e}function ye(e){var t=[];return b(e,function(e,n){_e(e)&&t.push(n)}),t.sort()}function be(e){for(var t=-1,n=At(e),r=n.length,i={};++t<r;){var o=n[t];i[e[o]]=o}return i}function _e(e){return"function"==typeof e}function xe(e){return!(!e||!W[typeof e])}function we(e){return"number"==typeof e||e&&"object"==typeof e&&ct.call(e)==F||!1}function Ce(e){return"string"==typeof e||e&&"object"==typeof e&&ct.call(e)==B||!1}function ke(e){for(var t=-1,n=At(e),r=n.length,i=Xe(r);++t<r;)i[t]=e[n[t]];return i}function Se(e,t,n){var r=-1,i=he(),o=e?e.length:0,a=!1;return n=(0>n?Et(0,o+n):n)||0,Dt(e)?a=-1<i(e,t,n):"number"==typeof o?a=-1<(Ce(e)?e.indexOf(t,n):i(e,t,n)):m(e,function(e){return++r<n?void 0:!(a=e===t)}),a}function je(e,t,n){var r=!0;t=Y.createCallback(t,n,3),n=-1;var i=e?e.length:0;if("number"==typeof i)for(;++n<i&&(r=!!t(e[n],n,e)););else m(e,function(e,n,i){return r=!!t(e,n,i)});return r}function Ee(e,t,n){var r=[];t=Y.createCallback(t,n,3),n=-1;var i=e?e.length:0;if("number"==typeof i)for(;++n<i;){var o=e[n];t(o,n,e)&&r.push(o)}else m(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function Te(e,t,n){t=Y.createCallback(t,n,3),n=-1;var r,i=e?e.length:0;if("number"!=typeof i)return m(e,function(e,n,i){return t(e,n,i)?(r=e,!1):void 0}),r;for(;++n<i;){var o=e[n];if(t(o,n,e))return o}}function Pe(e,t,n){var r=-1,i=e?e.length:0;if(t=t&&void 0===n?t:ne(t,n,3),"number"==typeof i)for(;++r<i&&!1!==t(e[r],r,e););else m(e,t);return e}function $e(e,t,n){var r=e?e.length:0;if(t=t&&void 0===n?t:ne(t,n,3),"number"==typeof r)for(;r--&&!1!==t(e[r],r,e););else{var i=At(e);r=i.length;m(e,function(e,n,o){return n=i?i[--r]:--r,t(o[n],n,o)})}return e}function Ne(e,t,n){var r=-1,i=e?e.length:0;if(t=Y.createCallback(t,n,3),"number"==typeof i)for(var o=Xe(i);++r<i;)o[r]=t(e[r],r,e);else o=[],m(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function Re(e,t,n){var i=-1/0,o=i;if("function"!=typeof t&&n&&n[t]===e&&(t=null),null==t&&Dt(e)){n=-1;for(var a=e.length;++n<a;){var s=e[n];s>o&&(o=s)}}else t=null==t&&Ce(e)?r:Y.createCallback(t,n,3),Pe(e,function(e,n,r){(n=t(e,n,r))>i&&(i=n,o=e)});return o}function Me(e,t,n,r){if(!e)return n;var i=3>arguments.length;t=Y.createCallback(t,r,4);var o=-1,a=e.length;if("number"==typeof a)for(i&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);else m(e,function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)});return n}function De(e,t,n,r){var i=3>arguments.length;return t=Y.createCallback(t,r,4),$e(e,function(e,r,o){n=i?(i=!1,e):t(n,e,r,o)}),n}function Ae(e){var t=-1,n=e?e.length:0,r=Xe("number"==typeof n?n:0);return Pe(e,function(e){var n=ue(0,++t);r[t]=r[n],r[n]=e}),r}function Ie(e,t,n){var r;t=Y.createCallback(t,n,3),n=-1;var i=e?e.length:0;if("number"==typeof i)for(;++n<i&&!(r=t(e[n],n,e)););else m(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function Oe(e,t,n){var r=0,i=e?e.length:0;if("number"!=typeof t&&null!=t){var o=-1;for(t=Y.createCallback(t,n,3);++o<i&&t(e[o],o,e);)r++}else if(null==(r=t)||n)return e?e[0]:h;return d(e,0,Tt(Et(0,r),i))}function Fe(t,n,r){if("number"==typeof r){var i=t?t.length:0;r=0>r?Et(0,i+r):r||0}else if(r)return t[r=He(t,n)]===n?r:-1;return e(t,n,r)}function Le(e,t,n){if("number"!=typeof t&&null!=t){var r=0,i=-1,o=e?e.length:0;for(t=Y.createCallback(t,n,3);++i<o&&t(e[i],i,e);)r++}else r=null==t||n?1:Et(0,t);return d(e,r)}function He(e,t,n,r){var i=0,o=e?e.length:i;for(t=(n=n?Y.createCallback(n,r,1):Ve)(t);i<o;)n(e[r=i+o>>>1])<t?i=r+1:o=r;return i}function Be(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n="function"!=typeof t&&r&&r[t]===e?null:t,t=!1),null!=n&&(n=Y.createCallback(n,r,3)),le(e,t,n)}function Ue(){for(var e=1<arguments.length?arguments:arguments[0],t=-1,n=e?Re(qt(e,"length")):0,r=Xe(0>n?0:n);++t<n;)r[t]=qt(e,t);return r}function qe(e,t){var n=-1,r=e?e.length:0,i={};for(t||!r||Dt(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}function ze(e,t){return 2<arguments.length?de(e,17,d(arguments,2),null,t):de(e,1,null,null,t)}function We(e,t,n){function r(){c&&ht(c),a=c=d=h,(m||p!==t)&&(f=zt(),s=e.apply(l,o),c||a||(o=l=null))}function i(){var n=t-(zt()-u);0<n?c=bt(i,n):(a&&ht(a),n=d,a=c=d=h,n&&(f=zt(),s=e.apply(l,o),c||a||(o=l=null)))}var o,a,s,u,l,c,d,f=0,p=!1,m=!0;if(!_e(e))throw new at;if(t=Et(0,t)||0,!0===n){var v=!0;m=!1}else xe(n)&&(v=n.leading,p="maxWait"in n&&(Et(t,n.maxWait)||0),m="trailing"in n?n.trailing:m);return function(){if(o=arguments,u=zt(),l=this,d=m&&(c||!v),!1===p)var n=v&&!c;else{a||v||(f=u);var h=p-(u-f),g=0>=h;g?(a&&(a=ht(a)),f=u,s=e.apply(l,o)):a||(a=bt(r,h))}return g&&c?c=ht(c):c||t===p||(c=bt(i,t)),n&&(g=!0,s=e.apply(l,o)),!g||c||a||(o=l=null),s}}function Ve(e){return e}function Ke(e,t,n){var r=!0,i=t&&ye(t);t&&(n||i.length)||(null==n&&(n=t),o=X,t=e,e=Y,i=ye(t)),!1===n?r=!1:xe(n)&&"chain"in n&&(r=n.chain);var o=e,a=_e(o);
65Pe(i,function(n){var i=e[n]=t[n];a&&(o.prototype[n]=function(){var t=this.__chain__,n=this.__wrapped__,a=[n];if(yt.apply(a,arguments),a=i.apply(e,a),r||t){if(n===a&&xe(a))return this;(a=new o(a)).__chain__=t}return a})})}function Qe(){}function Ge(e){return function(t){return t[e]}}function Ye(){return this.__wrapped__}var Xe=(n=n?J.defaults(K.Object(),n,J.pick(K,R)):K).Array,Je=n.Boolean,Ze=n.Date,et=n.Function,tt=n.Math,nt=n.Number,rt=n.Object,it=n.RegExp,ot=n.String,at=n.TypeError,st=[],ut=rt.prototype,lt=n._,ct=ut.toString,dt=it("^"+ot(ct).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ft=tt.ceil,ht=n.clearTimeout,pt=tt.floor,mt=et.prototype.toString,vt=dt.test(vt=rt.getPrototypeOf)&&vt,gt=ut.hasOwnProperty,yt=st.push,bt=n.setTimeout,_t=st.splice,xt=function(){try{var e={},t=dt.test(t=rt.defineProperty)&&t,n=t(e,e,e)&&t}catch(r){}return n}(),wt=dt.test(wt=rt.create)&&wt,Ct=dt.test(Ct=Xe.isArray)&&Ct,kt=n.isFinite,St=n.isNaN,jt=dt.test(jt=rt.keys)&&jt,Et=tt.max,Tt=tt.min,Pt=n.parseInt,$t=tt.random,Nt={};Nt[D]=Xe,Nt[A]=Je,Nt[I]=Ze,Nt[O]=et,Nt[L]=rt,Nt[F]=nt,Nt[H]=it,Nt[B]=ot,X.prototype=Y.prototype;var Rt=Y.support={};Rt.funcDecomp=!dt.test(n.a)&&$.test(f),Rt.funcNames="string"==typeof et.name,Y.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:Y}},wt||(te=function(){function e(){}return function(t){if(xe(t)){e.prototype=t;var r=new e;e.prototype=null}return r||n.Object()}}());var Mt=xt?function(e,t){z.value=t,xt(e,"__bindData__",z)}:Qe,Dt=Ct||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&ct.call(e)==D||!1},At=jt?function(e){return xe(e)?jt(e):[]}:G,It={"&":"&","<":"<",">":">",'"':""","'":"'"},Ot=be(It),Ft=it("("+At(Ot).join("|")+")","g"),Lt=it("["+At(It).join("")+"]","g"),Ht=ce(function(e,t,n){gt.call(e,n)?e[n]++:e[n]=1}),Bt=ce(function(e,t,n){(gt.call(e,n)?e[n]:e[n]=[]).push(t)}),Ut=ce(function(e,t,n){e[n]=t}),qt=Ne,zt=dt.test(zt=Ze.now)&&zt||function(){return(new Ze).getTime()},Wt=8==Pt(_+"08")?Pt:function(e,t){return Pt(Ce(e)?e.replace(T,""):e,t||0)};return Y.after=function(e,t){if(!_e(t))throw new at;return function(){return 1>--e?t.apply(this,arguments):void 0}},Y.assign=Q,Y.at=function(e){for(var t=-1,n=oe(r=arguments,!0,!1,1),r=r[2]&&r[2][r[1]]===e?1:n.length,i=Xe(r);++t<r;)i[t]=e[n[t]];return i},Y.bind=ze,Y.bindAll=function(e){for(var t=1<arguments.length?oe(arguments,!0,!1,1):ye(e),n=-1,r=t.length;++n<r;){var i=t[n];e[i]=de(e[i],1,null,null,e)}return e},Y.bindKey=function(e,t){return 2<arguments.length?de(t,19,d(arguments,2),null,e):de(t,3,null,null,e)},Y.chain=function(e){return(e=new X(e)).__chain__=!0,e},Y.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},Y.compose=function(){for(var e=arguments,t=e.length;t--;)if(!_e(e[t]))throw new at;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},Y.constant=function(e){return function(){return e}},Y.countBy=Ht,Y.create=function(e,t){var n=te(e);return t?Q(n,t):n},Y.createCallback=function(e,t,n){var r=typeof e;if(null==e||"function"==r)return ne(e,t,n);if("object"!=r)return Ge(e);var i=At(e),o=i[0],a=e[o];return 1!=i.length||a!=a||xe(a)?function(t){for(var n=i.length,r=!1;n--&&(r=ae(t[i[n]],e[i[n]],null,!0)););return r}:function(e){return e=e[o],a===e&&(0!==a||1/a==1/e)}},Y.curry=function(e,t){return de(e,4,null,null,null,t="number"==typeof t?t:+t||e.length)},Y.debounce=We,Y.defaults=V,Y.defer=function(e){if(!_e(e))throw new at;var t=d(arguments,1);return bt(function(){e.apply(h,t)},1)},Y.delay=function(e,t){if(!_e(e))throw new at;var n=d(arguments,2);return bt(function(){e.apply(h,n)},t)},Y.difference=function(e){return ie(e,oe(arguments,!0,!0,1))},Y.filter=Ee,Y.flatten=function(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n="function"!=typeof t&&r&&r[t]===e?null:t,t=!1),null!=n&&(e=Ne(e,n,r)),oe(e,t)},Y.forEach=Pe,Y.forEachRight=$e,Y.forIn=b,Y.forInRight=function(e,t,n){var r=[];b(e,function(e,t){r.push(t,e)});var i=r.length;for(t=ne(t,n,3);i--&&!1!==t(r[i--],r[i],e););return e},Y.forOwn=m,Y.forOwnRight=ge,Y.functions=ye,Y.groupBy=Bt,Y.indexBy=Ut,Y.initial=function(e,t,n){var r=0,i=e?e.length:0;if("number"!=typeof t&&null!=t){var o=i;for(t=Y.createCallback(t,n,3);o--&&t(e[o],o,e);)r++}else r=null==t||n?1:t||r;return d(e,0,Tt(Et(0,i-r),i))},Y.intersection=function(){for(var n=[],r=-1,i=arguments.length,a=s(),u=he(),d=u===e,f=s();++r<i;){var h=arguments[r];(Dt(h)||ve(h))&&(n.push(h),a.push(d&&h.length>=y&&o(r?n[r]:f)))}var p=-1,m=(d=n[0])?d.length:0,v=[];e:for(;++p<m;){var g=a[0];h=d[p];if(0>(g?t(g,h):u(f,h))){for(r=i,(g||f).push(h);--r;)if(0>((g=a[r])?t(g,h):u(n[r],h)))continue e;v.push(h)}}for(;i--;)(g=a[i])&&c(g);return l(a),l(f),v},Y.invert=be,Y.invoke=function(e,t){var n=d(arguments,2),r=-1,i="function"==typeof t,o=e?e.length:0,a=Xe("number"==typeof o?o:0);return Pe(e,function(e){a[++r]=(i?t:e[t]).apply(e,n)}),a},Y.keys=At,Y.map=Ne,Y.mapValues=function(e,t,n){var r={};return t=Y.createCallback(t,n,3),m(e,function(e,n,i){r[n]=t(e,n,i)}),r},Y.max=Re,Y.memoize=function(e,t){function n(){var r=n.cache,i=t?t.apply(this,arguments):g+arguments[0];return gt.call(r,i)?r[i]:r[i]=e.apply(this,arguments)}if(!_e(e))throw new at;return n.cache={},n},Y.merge=function(e){var t=arguments,n=2;if(!xe(e))return e;if("number"!=typeof t[2]&&(n=t.length),3<n&&"function"==typeof t[n-2])var r=ne(t[--n-1],t[n--],2);else 2<n&&"function"==typeof t[n-1]&&(r=t[--n]);t=d(arguments,1,n);for(var i=-1,o=s(),a=s();++i<n;)se(e,t[i],r,o,a);return l(o),l(a),e},Y.min=function(e,t,n){var i=1/0,o=i;if("function"!=typeof t&&n&&n[t]===e&&(t=null),null==t&&Dt(e)){n=-1;for(var a=e.length;++n<a;){var s=e[n];s<o&&(o=s)}}else t=null==t&&Ce(e)?r:Y.createCallback(t,n,3),Pe(e,function(e,n,r){(n=t(e,n,r))<i&&(i=n,o=e)});return o},Y.omit=function(e,t,n){var r={};if("function"!=typeof t){var i=[];b(e,function(e,t){i.push(t)});for(var o=-1,a=(i=ie(i,oe(arguments,!0,!1,1))).length;++o<a;){var s=i[o];r[s]=e[s]}}else t=Y.createCallback(t,n,3),b(e,function(e,n,i){t(e,n,i)||(r[n]=e)});return r},Y.once=function(e){var t,n;if(!_e(e))throw new at;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},Y.pairs=function(e){for(var t=-1,n=At(e),r=n.length,i=Xe(r);++t<r;){var o=n[t];i[t]=[o,e[o]]}return i}
65,Y.partial=function(e){return de(e,16,d(arguments,1))},Y.partialRight=function(e){return de(e,32,null,d(arguments,1))},Y.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=-1,o=oe(arguments,!0,!1,1),a=xe(e)?o.length:0;++i<a;){var s=o[i];s in e&&(r[s]=e[s])}else t=Y.createCallback(t,n,3),b(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},Y.pluck=qt,Y.property=Ge,Y.pull=function(e){for(var t=arguments,n=0,r=t.length,i=e?e.length:0;++n<r;)for(var o=-1,a=t[n];++o<i;)e[o]===a&&(_t.call(e,o--,1),i--);return e},Y.range=function(e,t,n){e=+e||0,null==t&&(t=e,e=0);var r=-1;t=Et(0,ft((t-e)/((n="number"==typeof n?n:+n||1)||1)));for(var i=Xe(t);++r<t;)i[r]=e,e+=n;return i},Y.reject=function(e,t,n){return t=Y.createCallback(t,n,3),Ee(e,function(e,n,r){return!t(e,n,r)})},Y.remove=function(e,t,n){var r=-1,i=e?e.length:0,o=[];for(t=Y.createCallback(t,n,3);++r<i;)t(n=e[r],r,e)&&(o.push(n),_t.call(e,r--,1),i--);return o},Y.rest=Le,Y.shuffle=Ae,Y.sortBy=function(e,t,n){var r=-1,o=Dt(t),a=e?e.length:0,d=Xe("number"==typeof a?a:0);for(o||(t=Y.createCallback(t,n,3)),Pe(e,function(e,n,i){var a=d[++r]=u();o?a.m=Ne(t,function(t){return e[t]}):(a.m=s())[0]=t(e,n,i),a.n=r,a.o=e}),a=d.length,d.sort(i);a--;)e=d[a],d[a]=e.o,o||l(e.m),c(e);return d},Y.tap=function(e,t){return t(e),e},Y.throttle=function(e,t,n){var r=!0,i=!0;if(!_e(e))throw new at;return!1===n?r=!1:xe(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),q.leading=r,q.maxWait=t,q.trailing=i,We(e,t,q)},Y.times=function(e,t,n){e=-1<(e=+e)?e:0;var r=-1,i=Xe(e);for(t=ne(t,n,1);++r<e;)i[r]=t(r);return i},Y.toArray=function(e){return e&&"number"==typeof e.length?d(e):ke(e)},Y.transform=function(e,t,n,r){var i=Dt(e);if(null==n)if(i)n=[];else{var o=e&&e.constructor;n=te(o&&o.prototype)}return t&&(t=Y.createCallback(t,r,4),(i?Pe:m)(e,function(e,r,i){return t(n,e,r,i)})),n},Y.union=function(){return le(oe(arguments,!0,!0))},Y.uniq=Be,Y.values=ke,Y.where=Ee,Y.without=function(e){return ie(e,d(arguments,1))},Y.wrap=function(e,t){return de(t,16,[e])},Y.xor=function(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Dt(n)||ve(n))var r=r?le(ie(r,n).concat(ie(n,r))):n}return r||[]},Y.zip=Ue,Y.zipObject=qe,Y.collect=Ne,Y.drop=Le,Y.each=Pe,Y.eachRight=$e,Y.extend=Q,Y.methods=ye,Y.object=qe,Y.select=Ee,Y.tail=Le,Y.unique=Be,Y.unzip=Ue,Ke(Y),Y.clone=function(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n=t,t=!1),ee(e,t,"function"==typeof n&&ne(n,r,1))},Y.cloneDeep=function(e,t,n){return ee(e,!0,"function"==typeof t&&ne(t,n,1))},Y.contains=Se,Y.escape=function(e){return null==e?"":ot(e).replace(Lt,fe)},Y.every=je,Y.find=Te,Y.findIndex=function(e,t,n){var r=-1,i=e?e.length:0;for(t=Y.createCallback(t,n,3);++r<i;)if(t(e[r],r,e))return r;return-1},Y.findKey=function(e,t,n){var r;return t=Y.createCallback(t,n,3),m(e,function(e,n,i){return t(e,n,i)?(r=n,!1):void 0}),r},Y.findLast=function(e,t,n){var r;return t=Y.createCallback(t,n,3),$e(e,function(e,n,i){return t(e,n,i)?(r=e,!1):void 0}),r},Y.findLastIndex=function(e,t,n){var r=e?e.length:0;for(t=Y.createCallback(t,n,3);r--;)if(t(e[r],r,e))return r;return-1},Y.findLastKey=function(e,t,n){var r;return t=Y.createCallback(t,n,3),ge(e,function(e,n,i){return t(e,n,i)?(r=n,!1):void 0}),r},Y.has=function(e,t){return!!e&>.call(e,t)},Y.identity=Ve,Y.indexOf=Fe,Y.isArguments=ve,Y.isArray=Dt,Y.isBoolean=function(e){return!0===e||!1===e||e&&"object"==typeof e&&ct.call(e)==A||!1},Y.isDate=function(e){return e&&"object"==typeof e&&ct.call(e)==I||!1},Y.isElement=function(e){return e&&1===e.nodeType||!1},Y.isEmpty=function(e){var t=!0;if(!e)return t;var n=ct.call(e),r=e.length;return n==D||n==B||n==M||n==L&&"number"==typeof r&&_e(e.splice)?!r:(m(e,function(){return t=!1}),t)},Y.isEqual=function(e,t,n,r){return ae(e,t,"function"==typeof n&&ne(n,r,2))},Y.isFinite=function(e){return kt(e)&&!St(parseFloat(e))},Y.isFunction=_e,Y.isNaN=function(e){return we(e)&&e!=+e},Y.isNull=function(e){return null===e},Y.isNumber=we,Y.isObject=xe,Y.isPlainObject=p,Y.isRegExp=function(e){return e&&"object"==typeof e&&ct.call(e)==H||!1},Y.isString=Ce,Y.isUndefined=function(e){return void 0===e},Y.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Et(0,r+n):Tt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},Y.mixin=Ke,Y.noConflict=function(){return n._=lt,this},Y.noop=Qe,Y.now=zt,Y.parseInt=Wt,Y.random=function(e,t,n){var r=null==e,i=null==t;return null==n&&("boolean"==typeof e&&i?(n=e,e=1):i||"boolean"!=typeof t||(n=t,i=!0)),r&&i&&(t=1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1?(n=$t(),Tt(e+n*(t-e+parseFloat("1e-"+((n+"").length-1))),t)):ue
65(e,t)},Y.reduce=Me,Y.reduceRight=De,Y.result=function(e,t){if(e){var n=e[t];return _e(n)?e[t]():n}},Y.runInContext=f,Y.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:At(e).length},Y.some=Ie,Y.sortedIndex=He,Y.template=function(e,t,n){var r=Y.templateSettings;e=ot(e||"");var i,o=V({},(n=V({},n,r)).imports,r.imports),s=(r=At(o),o=ke(o),0),u=n.interpolate||P,l="__p+='";u=it((n.escape||P).source+"|"+u.source+"|"+(u===E?k:P).source+"|"+(n.evaluate||P).source+"|$","g");e.replace(u,function(t,n,r,o,u,c){return r||(r=o),l+=e.slice(s,c).replace(N,a),n&&(l+="'+__e("+n+")+'"),u&&(i=!0,l+="';"+u+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),s=c+t.length,t}),l+="';",(u=n=n.variable)||(l="with("+(n="obj")+"){"+l+"}"),l=(i?l.replace(x,""):l).replace(w,"$1").replace(C,"$1;"),l="function("+n+"){"+(u?"":n+"||("+n+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=et(r,"return "+l).apply(h,o)}catch(d){throw d.source=l,d}return t?c(t):(c.source=l,c)},Y.unescape=function(e){return null==e?"":ot(e).replace(Ft,me)},Y.uniqueId=function(e){var t=++v;return ot(null==e?"":e)+t},Y.all=je,Y.any=Ie,Y.detect=Te,Y.findWhere=Te,Y.foldl=Me,Y.foldr=De,Y.include=Se,Y.inject=Me,Ke(function(){var e={};return m(Y,function(t,n){Y.prototype[n]||(e[n]=t)}),e}(),!1),Y.first=Oe,Y.last=function(e,t,n){var r=0,i=e?e.length:0;if("number"!=typeof t&&null!=t){var o=i;for(t=Y.createCallback(t,n,3);o--&&t(e[o],o,e);)r++}else if(null==(r=t)||n)return e?e[i-1]:h;return d(e,Et(0,i-r))},Y.sample=function(e,t,n){return e&&"number"!=typeof e.length&&(e=ke(e)),null==t||n?e?e[ue(0,e.length-1)]:h:((e=Ae(e)).length=Tt(Et(0,t),e.length),e)},Y.take=Oe,Y.head=Oe,m(Y,function(e,t){var n="sample"!==t;Y.prototype[t]||(Y.prototype[t]=function(t,r){var i=this.__chain__,o=e(this.__wrapped__,t,r);return i||null!=t&&(!r||n&&"function"==typeof t)?new X(o,i):o})}),Y.VERSION="2.4.0",Y.prototype.chain=function(){return this.__chain__=!0,this},Y.prototype.toString=function(){return ot(this.__wrapped__)},Y.prototype.value=Ye,Y.prototype.valueOf=Ye,Pe(["join","pop","shift"],function(e){var t=st[e];Y.prototype[e]=function(){var e=this.__chain__,n=t.apply(this.__wrapped__,arguments);return e?new X(n,e):n}}),Pe(["push","reverse","sort","unshift"],function(e){var t=st[e];Y.prototype[e]=function(){return t.apply(this.__wrapped__,arguments),this}}),Pe(["concat","slice","splice"],function(e){var t=st[e];Y.prototype[e]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Y}var h,p=[],m=[],v=0,g=+new Date+"",y=75,b=40,_=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",x=/\b__p\+='';/g,w=/\b(__p\+=)''\+/g,C=/(__e\(.*?\)|\b__t\))\+'';/g,k=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,j=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,T=RegExp("^["+_+"]*0+(?=.$)"),P=/($^)/,$=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),M="[object Arguments]",D="[object Array]",A="[object Boolean]",I="[object Date]",O="[object Function]",F="[object Number]",L="[object Object]",H="[object RegExp]",B="[object String]",U={};U[O]=!1,U[M]=U[D]=U[A]=U[I]=U[F]=U[L]=U[H]=U[B]=!0;var q={leading:!1,maxWait:0,trailing:!1},z={configurable:!1,enumerable:!1,value:null,writable:!1},W={boolean:!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},V={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},K=W[typeof window]&&window||this,Q=W[typeof exports]&&exports&&!exports.nodeType&&exports,G=W[typeof module]&&module&&!module.nodeType&&module,Y=G&&G.exports===Q&&Q,X=W[typeof global]&&global;!X||X.global!==X&&X.window!==X||(K=X);var J=f();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K._=J,define(function(){return J})):Q&&G?Y?(G.exports=J)._=J:Q._=J:K._=J}.call(this), 66/* ========================================================= 67 * bootstrap-slider.js v2.0.0 68 * http://www.eyecon.ro/bootstrap-slider 69 * ========================================================= 70 * Copyright 2012 Stefan Petre 71 * 72 * Licensed under the Apache License, Version 2.0 (the "License");
73 * you may not use this file except in compliance with the License. 74 * You may obtain a copy of the License at 75 * 76 * http://www.apache.org/licenses/LICENSE-2.0 77 * 78 * Unless required by applicable law or agreed to in writing, software 79 * distributed under the License is distributed on an "AS IS" BASIS, 80 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 81 * See the License for the specific language governing permissions and 82 * limitations under the License. 83 * ========================================================= */ 84function(e){function t(e,t){if(a[e]){var r=n(this);return a[e].apply(r,t)}throw new Error("method '"+e+"()' does not exist for slider.")}function n(t){var n=e(t).data("slider");if(n&&n instanceof o)return n;throw new Error(i.callingContextNotSliderInstance)}function r(t){var n=e(this),r=n.data("slider"),i="object"==typeof t&&t;return r||n.data("slider",r=new o(this,e.extend({},e.fn.slider.defaults,i))),n}var i={formatInvalidInputErrorMsg:function(e){return"Invalid input value '"+e+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"},o=function(t,n){var r=this.element=e(t).hide(),i=(r.outerWidth(),!1),o=this.element.parent();!0===o.hasClass("slider")?(i=!0,this.picker=o):this.picker=e('<div class="slider"><div class="slider-track"><div class="slider-selection"></div><div class="slider-handle"></div><div class="slider-handle"></div></div><div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div></div>').insertBefore(this.element).append(this.element),this.id=this.element.data("slider-id")||n.id,this.id&&(this.picker[0].id=this.id),"undefined"!=typeof Modernizr&&Modernizr.touch&&(this.touchCapable=!0);var a=this.element.data("slider-tooltip")||n.tooltip;switch(this.tooltip=this.picker.find(".tooltip"),this.tooltipInner=this.tooltip.find("div.tooltip-inner"),this.orientation=this.element.data("slider-orientation")||n.orientation,this.orientation){case"vertical":this.picker.addClass("slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight",this.tooltip.addClass("right")[0].style.left="100%";break;default:this.picker.addClass("slider-horizontal"),this.orientation="horizontal",this.stylePos="left",this.mousePos="pageX",this.sizePos="offsetWidth",this.tooltip.addClass("top")[0].style.top=-this.tooltip.outerHeight()-14+"px"}switch(["min","max","step","value"].forEach(function(e){this[e]=r.data("slider-"+e)||n[e]||r.prop(e)||0},this),this.value instanceof Array&&(this.range=!0),this.selection=this.element.data("slider-selection")||n.selection,this.selectionEl=this.picker.find(".slider-selection"),"none"===this.selection&&this.selectionEl.addClass("hide"),this.selectionElStyle=this.selectionEl[0].style,this.handle1=this.picker.find(".slider-handle:first"),this.handle1Stype=this.handle1[0].style,this.handle2=this.picker.find(".slider-handle:last"),this.handle2Stype=this.handle2[0].style,this.element.data("slider-handle")||n.handle){case"round":this.handle1.addClass("round"),this.handle2.addClass("round");break;case"triangle":this.handle1.addClass("triangle"),this.handle2.addClass("triangle")}if(this.range?(this.value[0]=Math.max(this.min,Math.min(this.max,this.value[0])),this.value[1]=Math.max(this.min,Math.min(this.max,this.value[1]))):(this.value=[Math.max(this.min,Math.min(this.max,this.value))],this.handle2.addClass("hide"),"after"===this.selection?this.value[1]=this.max:this.value[1]=this.min),this.diff=this.max-this.min,this.percentage=[100*(this.value[0]-this.min)/this.diff,100*(this.value[1]-this.min)/this.diff,100*this.step/this.diff],this.offset=this.picker.offset(),this.size=this.picker[0][this.sizePos],this.formater=n.formater,this.reversed=this.element.data("slider-reversed")||n.reversed,this.layout(),this.touchCapable?this.picker.on({touchstart:e.proxy(this.mousedown,this)}):this.picker.on({mousedown:e.proxy(this.mousedown,this)}),"show"===a?this.picker.on({mouseenter:e.proxy(this.showTooltip,this),mouseleave:e.proxy(this.hideTooltip,this)}):this.tooltip.addClass("hide"),!0===i){var s=this.getValue(),u=this.calculateValue();this.element.trigger({type:"slide",value:u}).data("value",u).prop("value",u),s!==u&&this.element.trigger({type:"slideChange","new":u,old:s}).data("value",u).prop("value",u)}this.enabled=n.enabled&&(this.element.data("slider-enabled")===undefined||!0===this.element.data("slider-enabled")),this.enabled||this.disable()};o.prototype={constructor:o,over:!1,inDrag:!1,showTooltip:function(){this.tooltip.addClass("in"),this.over=!0},hideTooltip:function(){!1===this.inDrag&&this.tooltip.removeClass("in"),this.over=!1},layout:function(){var e;e=this.reversed?[100-this.percentage[0],this.percentage[1]]:[this.percentage[0],this.percentage[1]],this.handle1Stype[this.stylePos]=e[0]+"
84%",this.handle2Stype[this.stylePos]=e[1]+"%","vertical"===this.orientation?(this.selectionElStyle.top=Math.min(e[0],e[1])+"%",this.selectionElStyle.height=Math.abs(e[0]-e[1])+"%"):(this.selectionElStyle.left=Math.min(e[0],e[1])+"%",this.selectionElStyle.width=Math.abs(e[0]-e[1])+"%"),this.range?(this.tooltipInner.text(this.formater(this.value[0])+" : "+this.formater(this.value[1])),this.tooltip[0].style[this.stylePos]=this.size*(e[0]+(e[1]-e[0])/2)/100-("vertical"===this.orientation?this.tooltip.outerHeight()/2:this.tooltip.outerWidth()/2)+"px"):(this.tooltipInner.text(this.formater(this.value[0])),this.tooltip[0].style[this.stylePos]=this.size*e[0]/100-("vertical"===this.orientation?this.tooltip.outerHeight()/2:this.tooltip.outerWidth()/2)+"px")},mousedown:function(t){if(!this.isEnabled())return!1;this.touchCapable&&"touchstart"===t.type&&(t=t.originalEvent),this.offset=this.picker.offset(),this.size=this.picker[0][this.sizePos];var n=this.getPercentage(t);if(this.range){var r=Math.abs(this.percentage[0]-n),i=Math.abs(this.percentage[1]-n);this.dragged=r<i?0:1}else this.dragged=0;this.percentage[this.dragged]=this.reversed?100-n:n,this.layout(),this.touchCapable?e(document).on({touchmove:e.proxy(this.mousemove,this),touchend:e.proxy(this.mouseup,this)}):e(document).on({mousemove:e.proxy(this.mousemove,this),mouseup:e.proxy(this.mouseup,this)}),this.inDrag=!0;var o=this.calculateValue();return this.setValue(o),this.element.trigger({type:"slideStart",value:o}).trigger({type:"slide",value:o}),!1},mousemove:function(e){if(!this.isEnabled())return!1;this.touchCapable&&"touchmove"===e.type&&(e=e.originalEvent);var t=this.getPercentage(e);this.range&&(0===this.dragged&&this.percentage[1]<t?(this.percentage[0]=this.percentage[1],this.dragged=1):1===this.dragged&&this.percentage[0]>t&&(this.percentage[1]=this.percentage[0],this.dragged=0)),this.percentage[this.dragged]=this.reversed?100-t:t,this.layout();var n=this.calculateValue();return this.setValue(n),this.element.trigger({type:"slide",value:n}).data("value",n).prop("value",n),!1},mouseup:function(){if(!this.isEnabled())return!1;this.touchCapable?e(document).off({touchmove:this.mousemove,touchend:this.mouseup}):e(document).off({mousemove:this.mousemove,mouseup:this.mouseup}),this.inDrag=!1,!1===this.over&&this.hideTooltip();var t=this.calculateValue();return this.layout(),this.element.data("value",t).prop("value",t).trigger({type:"slideStop",value:t}),!1},calculateValue:function(){var e;return this.range?(e=[Math.max(this.min,this.min+Math.round(this.diff*this.percentage[0]/100/this.step)*this.step),Math.min(this.max,this.min+Math.round(this.diff*this.percentage[1]/100/this.step)*this.step)],this.value=e):((e=this.min+Math.round(this.diff*this.percentage[0]/100/this.step)*this.step)<this.min?e=this.min:e>this.max&&(e=this.max),e=parseFloat(e),this.value=[e,this.value[1]]),e},getPercentage:function(e){this.touchCapable&&(e=e.touches[0]);var t=100*(e[this.mousePos]-this.offset[this.stylePos])/this.size;return t=Math.round(t/this.percentage[2])*this.percentage[2],Math.max(0,Math.min(100,t))},getValue:function(){return this.range?this.value:this.value[0]},setValue:function(e){this.value=this.validateInputValue(e),this.range?(this.value[0]=Math.max(this.min,Math.min(this.max,this.value[0])),this.value[1]=Math.max(this.min,Math.min(this.max,this.value[1]))):(this.value=[Math.max(this.min,Math.min(this.max,this.value))],this.handle2.addClass("hide"),"after"===this.selection?this.value[1]=this.max:this.value[1]=this.min),this.diff=this.max-this.min,this.percentage=[100*(this.value[0]-this.min)/this.diff,100*(this.value[1]-this.min)/this.diff,100*this.step/this.diff],this.layout()},validateInputValue:function(e){if("number"==typeof e)return e;if(e instanceof Array)return e.forEach(function(e){if("number"!=typeof e)throw new Error(i.formatInvalidInputErrorMsg(e))}),e;throw new Error(i.formatInvalidInputErrorMsg(e))},destroy:function(){this.element.show().insertBefore(this.picker),this.picker.remove(),e(this.element).removeData("slider"),e(this.element).off()},disable:function(){this.enabled=!1,this.picker.addClass("slider-
84disabled"),this.element.trigger("slideDisabled")},enable:function(){this.enabled=!0,this.picker.removeClass("slider-disabled"),this.element.trigger("slideEnabled")},toggle:function(){this.enabled?this.disable():this.enable()},isEnabled:function(){return this.enabled}};var a={getValue:o.prototype.getValue,setValue:o.prototype.setValue,destroy:o.prototype.destroy,disable:o.prototype.disable,enable:o.prototype.enable,toggle:o.prototype.toggle,isEnabled:o.prototype.isEnabled};e.fn.slider=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);return t.call(this,e,n)}return r.call(this,e)},e.fn.slider.defaults={min:0,max:10,step:1,orientation:"horizontal",value:5,selection:"before",tooltip:"show",handle:"round",reversed:!1,enabled:!0,formater:function(e){return e}},e.fn.slider.Constructor=o}(window.jQuery),function(e){"use strict";function t(t){var n=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return e.each(n,function(){t=t.replace(this.re,this.ch)}),t}function n(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},n="(?:"+Object.keys(t).join("|")+")",r=new RegExp(n),i=new RegExp(n,"g"),o=null==e?"":""+e;return r.test(o)?o.replace(i,function(e){return t[e]}):o}function r(t,n){var r,i=arguments,o=t,a=n;[].shift.apply(i);var s=this.each(function(){var t=e(this);if(t.is("select")){var n=t.data("selectpicker"),s="object"==typeof o&&o;if(n){if(s)for(var l in s)s.hasOwnProperty(l)&&(n.options[l]=s[l])}else{var c=e.extend({},u.DEFAULTS,e.fn.selectpicker.defaults||{},t.data(),s);c.template=e.extend({},u.DEFAULTS.template,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.template:{},t.data().template,s.template),t.data("selectpicker",n=new u(this,c,a))}"string"==typeof o&&(r=n[o]instanceof Function?n[o].apply(n,i):n.options[o])}});return void 0!==r?r:s}var i,o,a,s;String.prototype.includes||(i={}.toString,o=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(r){}return n}(),a="".indexOf,s=function(e){if(null==this)throw new TypeError;var t=String(this);if(e&&"[object RegExp]"==i.call(e))throw new TypeError;var n=t.length,r=String(e),o=r.length,s=arguments.length>1?arguments[1]:undefined,u=s?Number(s):0;return u!=u&&(u=0),!(o+Math.min(Math.max(u,0),n)>n)&&-1!=a.call(t,r,u)},o?o(String.prototype,"includes",{value:s,configurable:!0,writable:!0}):String.prototype.includes=s),String.prototype.startsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(r){}return n}(),t={}.toString,n=function(e){if(null==this)throw new TypeError;var n=String(this);if(e&&"[object RegExp]"==t.call(e))throw new TypeError;var r=n.length,i=String(e),o=i.length,a=arguments.length>1?arguments[1]:undefined,s=a?Number(a):0;s!=s&&(s=0);var u=Math.min(Math.max(s,0),r);if(o+u>r)return!1;for(var l=-1;++l<o;)if(n.charCodeAt(u+l)!=i.charCodeAt(l))return!1;return!0};e?e(String.prototype,"startsWith",{value:n,configurable:!0,writable:!0}):String.prototype.startsWith=n}(),Object.keys||(Object.keys=function(e,t,n){for(t in n=[],e)n.hasOwnProperty.call(e,t)&&n.push(t);return n}),e.fn.triggerNative=function(e){var t,n=this[0];n.dispatchEvent?("function"==typeof Event?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),n.dispatchEvent(t)):(n.fireEvent&&((t=document.createEventObject()).eventType=e,n.fireEvent("on"+e,t)),this.trigger(e))},e.expr[":"].icontains=function(t,n,r){var i=e(t);return(i.data("tokens")||i.text()).toUpperCase().includes(r[3].toUpperCase())},e.expr[":"].ibegins=function(t,n,r){var i=e(t);return(i.data("tokens")||i.text()).toUpperCase().startsWith(r[3].toUpperCase())},e.expr[":"].aicontains=function(t,n,r){var i=e(t);return(i.data("tokens")||i.data("normalizedText")||i.text()).toUpperCase().includes(r[3].toUpperCase())},e.expr[":"].aibegins=function(t,n,r){var i=e(t);return(i.data("tokens")||i.data("normalizedText")||i.text()).toUpperCase().startsWith(r[3].toUpperCase())};var u=function(t,n,r){r&&(r.stopPropagation(),r.preventDefault()),this.$element=e(t),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=n,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=u.prototype.val,this.render=u.prototype.render,this.refresh=u.prototype.refresh,this.setStyle=u.prototype.setStyle,this.selectAll=u.prototype.selectAll,this.deselectAll=u.prototype.deselectAll,this.destroy=u.prototype.destroy,this.remove=u.prototype.remove,this.show=u.prototype.show,this.hide=u.prototype.hide,this.init()};u.VERSION="1.10.0",u.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},u.prototype={constructor:u,init:function(){var t=this,n=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),void 0!==n&&(this.$button.attr("data-id",n),e('label[for="'+n+'"]').click(function(e){e.preventDefault(),t.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){t.$element.trigger("hide.bs.select",e)},"hidden.bs.dropdown":function(e){t.$element.trigger("hidden.bs.select",e)},"show.bs.dropdown":function(e){t.$element.trigger("show.bs.select",e)},"shown.bs.dropdown":function(e){t.$element.trigger("shown.bs.select",e)}}),t.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){t.$button.addClass("bs-invalid").focus(),t.$element.on({"focus.bs.select":function(){t.$button.focus(),t.$element.off("focus.bs.select")},"shown.bs.select":function(){t.$element.val(t.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&t.$button.removeClass("bs-invalid"),t.$element.off("rendered.bs.select")}})}),setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",r=this.$element.parent().hasClass("input-group")?" input-group-btn":"",i=this.autofocus?" autofocus":"",o=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true"><i class="fa fa-times"></i></button>'+this.options.header+"</div>":"",a=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+n(this.options.liveSearchPlaceholder)+'"')+"></div>":"",s=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"",u=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"",l='<div class="btn-group bootstrap-select'+t+r+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+i+'><span class="filter-option pull-left"></span> <span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open">'+o+a+s+'<ul class="dropdown-menu inner" role="menu"></ul>'+u+"</div></div>";return e(l)},createView:function(){var e=this.createDropdown(),t=this.createLi();return e.find("ul")[0].innerHTML=t,e},reloadLi:function(){this.destroyLi();var e=this.createLi();this.$menuInner[0].innerHTML=e},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var r=this,i=[],o=0,a=document.createElement("option"),s=-1,u=function(e,t,n,r){return"<li"+(void 0!==n&""!==n?' class="'+n+'"':"")+(void 0!==t&null!==t?' data-original-index="'+t+'"':"")+(void 0!==r&null!==r?'data-optgroup="'+r+'"':"")+">"+e+"</li>"},l=function(e,i,o,a){return'<a tabindex="0"'+(void 0!==i?' class="'+i+'"':"")+(void 0!==o?' style="'+o+'"':"")+(r.options.liveSearchNormalize?' data-normalized-text="'+t(n(e))+'"':"")+(void 0!==a||null!==a?' data-tokens="'+a+'"':"")+">"+e+'<span class="'+r.options.iconBase+" "+r.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple&&(s--,!this.$element.find(".bs-title-option").length)){var c=this.$element[0];a.className="bs-title-option",a.appendChild(document.createTextNode(this.options.title)),a.value="",c.insertBefore(a,c.firstChild),e(c.options[c.selectedIndex]).attr("selected")===undefined&&(a.selected=!0)}return this.$element.find("option").each(function(t){var n=e(this);if(s++,!n.hasClass("bs-title-option")){var a=this.className||"",c=this.style.cssText,d=n.data("c
84ontent")?n.data("content"):n.html(),f=n.data("tokens")?n.data("tokens"):null,h=void 0!==n.data("subtext")?'<small class="text-muted">'+n.data("subtext")+"</small>":"",p=void 0!==n.data("icon")?'<span class="'+r.options.iconBase+" "+n.data("icon")+'"></span> ':"",m="OPTGROUP"===this.parentNode.tagName,v=this.disabled||m&&this.parentNode.disabled;if(""!==p&&v&&(p="<span>"+p+"</span>"),r.options.hideDisabled&&v&&!m)s--;else{if(n.data("content")||(d=p+'<span class="text">'+d+h+"</span>"),m&&!0!==n.data("divider")){var g=" "+this.parentNode.className||"";if(0===n.index()){o+=1;var y=this.parentNode.label,b=void 0!==n.parent().data("subtext")?'<small class="text-muted">'+n.parent().data("subtext")+"</small>":"";y=(n.parent().data("icon")?'<span class="'+r.options.iconBase+" "+n.parent().data("icon")+'"></span> ':"")+'<span class="text">'+y+b+"</span>",0!==t&&i.length>0&&(s++,i.push(u("",null,"divider",o+"div"))),s++,i.push(u(y,null,"dropdown-header"+g,o))}if(r.options.hideDisabled&&v)return void s--;i.push(u(l(d,"opt "+a+g,c,f),t,"",o))}else!0===n.data("divider")?i.push(u("",t,"divider")):!0===n.data("hidden")?i.push(u(l(d,a,c,f),t,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(s++,i.push(u("",null,"divider",o+"div"))),i.push(u(l(d,a,c,f),t)));r.liObj[t]=s}}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),i.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(t){var n,r=this;!1!==t&&this.$element.find("option").each(function(e){var t=r.findLis().eq(r.liObj[e]);r.setDisabled(e,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,t),r.setSelected(e,this.selected,t)}),this.tabIndex();var i=this.$element.find("option").map(function(){if(this.selected){if(r.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var t,n=e(this),i=n.data("icon")&&r.options.showIcon?'<i class="'+r.options.iconBase+" "+n.data("icon")+'"></i> ':"";return t=r.options.showSubtext&&n.data("subtext")&&!r.multiple?' <small class="text-muted">'+n.data("subtext")+"</small>":"",void 0!==n.attr("title")?n.attr("title"):n.data("content")&&r.options.showContent?n.data("content"):i+n.html()+t}}).toArray(),o=this.multiple?i.join(this.options.multipleSeparator):i[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var a=this.options.selectedTextFormat.split(">");if(a.length>1&&i.length>a[1]||1==a.length&&i.length>=2){n=this.options.hideDisabled?", [disabled]":"";var s=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+n).length;o=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(i.length,s):this.options.countSelectedText).replace("{0}",i.length.toString()).replace("{1}",s.toString())}}this.options.title==undefined&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(o=this.options.title),o||(o="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",e.trim(o.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(o),this.$element.trigger("rendered.bs.select")},setStyle:function(e,t){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var n=e||this.options.style;"add"==t?this.$button.addClass(n):"remove"==t?this.$button.removeClass(n):(this.$button.removeClass(this.options.style),this.$button.addClass(n))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){var n=document.createElement("div"),r=document.createElement("div"),i=document.createElement("ul"),o=document.createElement("li"),a=document.createElement("li"),s=document.createElement("a"),u=document.createElement("span"),l=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,c=this.options.liveSearch?document.createElement("div"):null,d=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,f=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(u.className="text",n.className=this.$menu[0].parentNode.className+" open",r.className="dropdown-menu open",i.className="dropdown-menu inner",o.className="divider",u.appendChild(document.createTextNode("Inner text")),s.appendChild(u),a.appendChild(s),i.appendChild(a),i.appendChild(o),l&&r.appendChild(l),c){var h=document.createElement("span");c.className="bs-searchbox",h.className="form-control",c.appendChild(h),r.appendChild(c)}d&&r.appendChild(d),r.appendChild(i),f&&r.appendChild(f),n.appendChild(r),document.body.appendChild(n);var p=s.offsetHeight,m=l?l.offsetHeight:0,v=c?c.offsetHeight:0,g=d?d.offsetHeight:0,y=f?f.offsetHeight:0,b=e(o).outerHeight(!0),_="function"==typeof getComputedStyle&&getComputedStyle(r),x=_?null:e(r),w=parseInt(_?_.paddingTop:x.css("paddingTop"))+parseInt(_?_.paddingBottom:x.css("paddingBottom"))+parseInt(_?_.borderTopWidth:x.css("borderTopWidth"))+parseInt(_?_.borderBottomWidth:x.css("borderBottomWidth")),C=w+parseInt(_?_.marginTop:x.css("marginTop"))+parseInt(_?_.marginBottom:x.css("marginBottom"))+2;document.body.removeChild(n),this.sizeInfo={liHeight:p,headerHeight:m,searchHeight:v,actionsHeight:g,doneButtonHeight:y,dividerHeight:b,menuPadding:w,menuExtras:C}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var t,n,r,i,o=this,a=this.$menu,s=this.$menuInner,u=e(window),l=this.$newElement[0].offsetHeight,c=this.sizeInfo.liHeight,d=this.sizeInfo.headerHeight,f=this.sizeInfo.searchHeight,h=this.sizeInfo.actionsHeight,p=this.sizeInfo.doneButtonHeight,m=this.sizeInfo.dividerHeight,v=this.sizeInfo.menuPadding,g=this.sizeInfo.menuExtras,y=this.options.hideDisabled?".disabled":"",b=function(){r=o.$newElement.offset().top-u.scrollTop(),i=u.height()-r-l};if(b(),"auto"===this.options.size){var _=function(){var u,l=function(t,n){return function(r){return n?r.classList?r.classList.contains(t):e(r).hasClass(t):!(r.classList?r.classList.contains(t):e(r).hasClass(t))}},m=o.$menuInner[0].getElementsByTagName("li"),y=Array.prototype.filter?Array.prototype.filter.call(m,l("hidden",!1)):o.$lis.not(".hidden"),_=Array.prototype.filter?Array.prototype.filter.call(y,l("dropdown-header",!0)):y.filter(".dropdown-header");b(),t=i-g,o.options.container?(a.data("height")||a.data("height",a.height()),n=a.data("height")):n=a.height(),o.options.dropupAuto&&o.$newElement.toggleClass("dropup",r>i&&t-g<n),o.$newElement.hasClass("dropup")&&(t=r-g),u=y.length+_.length>3?3*c+g-2:0,a.css({"max-height":t+"px",overflow:"hidden","min-height":u+d+f+h+p+"px"}),s.css({"max-height":t-d-f-h-p-v+"px","overflow-y":"auto","min-height":Math.max(u-v,0)+"px"})};_(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",_),u.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",_)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(y).length>this.options.size){var x=this.$lis.not(".divider").not(y).children().slice(0,this.options.size).last().parent().index(),w=this.$lis.slice(0,x+1).filter(".divider").length;t=c*this.options.size+w*m+v,o.options.container?(a.data("height")||a.data("height",a.height()),n=a.data("height")):n=a.height(),o.options.dropupAuto&&this.$newElement.toggleClass("dropup",r>i&&t-g<n),a.css({"max-height":t+d+f+h+p+"px",overflow:"hidden","min-height":""}),s.css({"max-height":t-v+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var e=this.$menu.parent().clone().appendTo("body"),t=this.options.container?this.$newElement.clone().appendTo("body"):e,n=e.children(".dropdown-menu").outerWidth(),r=t.css("width","auto").children("button").outerWidth();e.remove(),t.remove(),this.$newElement.css("width",Math.max(n,r)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=e('<div class="bs-container" />');var t,n,r=this,i=function(e){r.$bsContainer.addClass(e.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",e.hasClass("dropup")),t=e.offset(),n=e.hasClass("dropup")?0:e[0].offsetHeight,r.$bsContainer.css({top:t.top+n,left:t.left,width:e[0].offsetWidth})};this.$button.on("click",function(){var t=e(this);r.isDisabled()||(i(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass("open",!t.hasClass("open")).append(r.$menu))}),e(window).on("resize scroll",function(){i(r.$newElement)}),this.$element.on("hide.bs.select",function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setSelected:function(e,t,n){n||(n=this.findLis().eq(this.liObj[e])),n.toggleClass("selected",t)},setDisabled:function(e,t,n){n||(n=this.findLis().eq(this.liObj[e])),t?n.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):n.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var e=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!e.isDisabled()})},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var t=this,n=e(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(e){e.stopPropagation()}),n.data("spaceSelect",!1),this.$button.on("keyup",function(e){/(32)/.test(e.keyCode.toString(10))&&n.data("spaceSelect")&&(e.preventDefault(),n.data("spaceSelect",!1))}),this.$button.on("click",function(){t.setSize()}),this.$element.on("shown.bs.select",function(){if(t.options.liveSearch||t.multiple){if(!t.multiple){var e=t.liObj[t.$element[0].selectedIndex];if("number"!=typeof e||!1===t.options.size)return;var n=t.$lis.eq(e)[0].offsetTop-t.$menuInner[0].offsetTop;n=n-t.$menuInner[0].offsetHeight/2+t.sizeInfo.liHeight/2,t.$menuInner[0].scrollTop=n}}else t.$menuInner.find(".selected a").focus()}),this.$menuInner.on("click","li a",function(n){var r=e(this),i=r.parent().data("originalIndex"),o=t.$element.val(),a=t.$element.prop("selectedIndex");if(t.multiple&&n.stopPropagation(),n.preventDefault(),!t.isDisabled()&&!r.parent().hasClass("disabled")){var s=t.$element.find("option"),u=s.eq(i),l=u.prop("selected"),c=u.parent("optgroup"),d=t.options.maxOptions,f=c.data("maxOptions")||!1;if(t.multiple){if(u.prop("selected",!l),t.setSelected(i,!l),r.blur(),!1!==d||!1!==f){var h=d<s.filter(":selected").length,p=f<c.find("option:selected").length;if(d&&h||f&&p)if(d&&1==d)s.prop("selected",!1),u.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(i,!0);else if(f&&1==f){c.find("option:selected").prop("selected",!1),u.prop("selected",!0);var m=r.parent().data("optgroup");t.$menuInner.find('[data-optgroup="'+m+'"]').removeClass("selected"),t.setSelected(i,!0)}else{var v="function"==typeof t.options.maxOptionsText?t.options.maxOptionsText(d,f):t.options.maxOptionsText,g=v[0].replace("{n}",d),y=v[1].replace("{n}",f),b=e('<div class="notify"></div>');v[2]&&(g=g.replace("{var}",v[2][d>1?0:1]),y=y.replace("{var}",v[2][f>1?0:1])),u.prop("selected",!1),t.$menu.append(b),d&&h&&(b.append(e("<div>"+g+"</div>")),t.$element.trigger("maxReached.bs.select")),f&&p&&(b.append(e("<div>"+y+"</div>")),t.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){t.setSelected(i,!1)},10),b.delay(750).fadeOut(300,function(){e(this).remove()})}}}else s.prop("selected",!1),u.prop("selected",!0),t.$menuInner.find(".selected").removeClass("selected"),t.setSelected(i,!0);t.multiple?t.options.liveSearch&&t.$searchbox.focus():t.$button.focus(),(o!=t.$element.val()&&t.multiple||a!=t.$element.prop("selectedIndex")&&!t.multiple)&&t.$element.trigger("changed.bs.select",[i,u.prop("selected"),l]).triggerNative("change")}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(n){n.currentTarget==this&&(n.preventDefault(),n.stopPropagation(),t.options.liveSearch&&!e(n.target).hasClass("close")?t.$searchbox.focus():t.$button.focus())}
84),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),t.options.liveSearch?t.$searchbox.focus():t.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){t.$button.click()}), 85this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(n){t.options.liveSearch?t.$searchbox.focus():t.$button.focus(),n.preventDefault(),n.stopPropagation(),e(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll()}),this.$element.change(function(){t.render(!1)})},liveSearchListener:function(){var r=this,i=e('<li class="no-results"></li>');this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){r.$menuInner.find(".active").removeClass("active"),r.$searchbox.val()&&(r.$searchbox.val(""),r.$lis.not(".is-hidden").removeClass("hidden"),i.parent().length&&i.remove()),r.multiple||r.$menuInner.find(".selected").addClass("active"),setTimeout(function(){r.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(r.$searchbox.val()){var o=r.$lis.not(".is-hidden").removeClass("hidden").children("a");(o=r.options.liveSearchNormalize?o.not(":a"+r._searchStyle()+'("'+t(r.$searchbox.val())+'")'):o.not(":"+r._searchStyle()+'("'+r.$searchbox.val()+'")')).parent().addClass("hidden"),r.$lis.filter(".dropdown-header").each(function(){var t=e(this),n=t.data("optgroup");0===r.$lis.filter("[data-optgroup="+n+"]").not(t).not(".hidden").length&&(t.addClass("hidden"),r.$lis.filter("[data-optgroup="+n+"div]").addClass("hidden"))});var a=r.$lis.not(".hidden");a.each(function(t){var n=e(this);n.hasClass("divider")&&(n.index()===a.first().index()||n.index()===a.last().index()||a.eq(t+1).hasClass("divider"))&&n.addClass("hidden")}),r.$lis.not(".hidden, .no-results").length?i.parent().length&&i.remove():(i.parent().length&&i.remove(),i.html(r.options.noneResultsText.replace("{0}",'"'+n(r.$searchbox.val())+'"')).show(),r.$menuInner.append(i))}else r.$lis.not(".is-hidden").removeClass("hidden"),i.parent().length&&i.remove();r.$lis.filter(".active").removeClass("active"),r.$searchbox.val()&&r.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),e(this).focus()})},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(e){return void 0!==e?(this.$element.val(e),this.render(),this.$element):this.$element.val()},changeAll:function(t){void 0===t&&(t=!0),this.findLis();for(var n=this.$element.find("option"),r=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",t),i=r.length,o=[],a=0;a<i;a++){var s=r[a].getAttribute("data-original-index");o[o.length]=n.eq(s)[0]}e(o).prop("selected",t),this.render(!1),this.$element.trigger("changed.bs.select").triggerNative("change")},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(e){(e=e||window.event)&&e.stopPropagation(),this.$button.trigger("click")},keydown:function(n){var r,i,o,a,s,u,l,c,d,f=e(this),h=f.is("input")?f.parent().parent():f.parent(),p=h.data("this"),m=":not(.disabled, .hidden, .dropdown-header, .divider)",v={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(p.options.liveSearch&&(h=f.parent().parent()),p.options.container&&(h=p.$menu),r=e("[role=menu] li",h),!(d=p.$newElement.hasClass("open"))&&(n.keyCode>=48&&n.keyCode<=57||n.keyCode>=96&&n.keyCode<=105||n.keyCode>=65&&n.keyCode<=90)&&(p.options.container?p.$button.trigger("click"):(p.setSize(),p.$menu.parent().addClass("open"),d=!0),p.$searchbox.focus()),p.options.liveSearch&&(/(^9$|27)/.test(n.keyCode.toString(10))&&d&&0===p.$menu.find(".active").length&&(n.preventDefault(),p.$menu.parent().removeClass("open"),p.options.container&&p.$newElement.removeClass("open"),p.$button.focus()),r=e("[role=menu] li"+m,h),f.val()||/(38|40)/.test(n.keyCode.toString(10))||0===r.filter(".active").length&&(r=p.$menuInner.find("li"),r=p.options.liveSearchNormalize?r.filter(":a"+p._searchStyle()+"("+t(v[n.keyCode])+")"):r.filter(":"+p._searchStyle()+"("+v[n.keyCode]+")"))),r.length){if(
85/(38|40)/.test(n.keyCode.toString(10)))i=r.index(r.find("a").filter(":focus").parent()),a=r.filter(m).first().index(),s=r.filter(m).last().index(),o=r.eq(i).nextAll(m).eq(0).index(),u=r.eq(i).prevAll(m).eq(0).index(),l=r.eq(o).prevAll(m).eq(0).index(),p.options.liveSearch&&(r.each(function(t){e(this).hasClass("disabled")||e(this).data("index",t)}),i=r.index(r.filter(".active")),a=r.first().data("index"),s=r.last().data("index"),o=r.eq(i).nextAll().eq(0).data("index"),u=r.eq(i).prevAll().eq(0).data("index"),l=r.eq(o).prevAll().eq(0).data("index")),c=f.data("prevIndex"),38==n.keyCode?(p.options.liveSearch&&i--,i!=l&&i>u&&(i=u),i<a&&(i=a),i==c&&(i=s)):40==n.keyCode&&(p.options.liveSearch&&i++,-1==i&&(i=0),i!=l&&i<o&&(i=o),i>s&&(i=s),i==c&&(i=a)),f.data("prevIndex",i),p.options.liveSearch?(n.preventDefault(),f.hasClass("dropdown-toggle")||(r.removeClass("active").eq(i).addClass("active").children("a").focus(),f.focus())):r.eq(i).children("a").focus();else if(!f.is("input")){var g,y=[];r.each(function(){e(this).hasClass("disabled")||e.trim(e(this).children("a").text().toLowerCase()).substring(0,1)==v[n.keyCode]&&y.push(e(this).index())}),g=e(document).data("keycount"),g++,e(document).data("keycount",g),e.trim(e(":focus").text().toLowerCase()).substring(0,1)!=v[n.keyCode]?(g=1,e(document).data("keycount",g)):g>=y.length&&(e(document).data("keycount",0),g>y.length&&(g=1)),r.eq(y[g-1]).children("a").focus()}if((/(13|32)/.test(n.keyCode.toString(10))||/(^9$)/.test(n.keyCode.toString(10))&&p.options.selectOnTab)&&d){if(/(32)/.test(n.keyCode.toString(10))||n.preventDefault(),p.options.liveSearch)/(32)/.test(n.keyCode.toString(10))||(p.$menuInner.find(".active a").click(),f.focus());else{var b=e(":focus");b.click(),b.focus(),n.preventDefault(),e(document).data("spaceSelect",!0)}e(document).data("keycount",0)}(/(^9$|27)/.test(n.keyCode.toString(10))&&d&&(p.multiple||p.options.liveSearch)||/(27)/.test(n.keyCode.toString(10))&&!d)&&(p.$menu.parent().removeClass("open"),p.options.container&&p.$newElement.removeClass("open"),p.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var l=e.fn.selectpicker;e.fn.selectpicker=r,e.fn.selectpicker.Constructor=u,e.fn.selectpicker.noConflict=function(){return e.fn.selectpicker=l,this},e(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',u.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(e){e.stopPropagation()}),e(window).on("load.bs.select.data-api",function(){e(".selectpicker").each(function(){var t=e(this);r.call(t,t.data())})})}(jQuery),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");!function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;return e(this).one(e.support.transition.end,function(){n=!0}),setTimeout(function(){n||e(r).trigger(e.support.transition.end)},t),this},e(function(){e.support.transition=t()})}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function n(){o.trigger("closed.bs.alert").remove()}var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var o=e(i);t&&t.preventDefault(),o.length||(o=r.hasClass("alert")?r:r.parent()),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one(e.support.transition.end,n).emulateTransitionEnd(150):n())};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){"loadingText"==e?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons"]');e.length&&("radio"===this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change").prop("type")&&e.find(".active").removeClass("active"));this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".
85item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},t.prototype.to=function(t){var n=this,r=this.getActiveIndex();return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid",function(){n.to(t)}):r==t?this.pause().cycle():this.slide(t>r?"next":"prev",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){return this.sliding?void 0:this.slide("next")},t.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},t.prototype.slide=function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),o=this.interval,a="next"==t?"left":"right",s="next"==t?"first":"last",u=this;if(!i.length){if(!this.options.wrap)return;i=this.$element.find(".item")[s]()}this.sliding=!0,o&&this.pause();var l=e.Event("slide.bs.carousel",{relatedTarget:i[0],direction:a});if(!i.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(u.$indicators.children()[u.getActiveIndex()]);t&&t.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(l),l.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(a),i.addClass(a),r.one(e.support.transition.end,function(){i.removeClass([t,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(l),l.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return o&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),a="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):a?i[a]():o.interval&&i.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n,r=e(this),i=e(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),o=e.extend({},i.data(),r.data()),a=r.attr("data-slide-to");a&&(o.interval=!1),i.carousel(o),(a=r.attr("data-slide-to"))&&i.data("bs.carousel").to(a),t.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=e.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1;var o=function(){this.$element.removeClass("collapsing").addClass("in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return o.call(this);var a=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(o,this)).emulateTransitionEnd(350)[i](this.$element[0][a])}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};
vendor: 19,942 bytes, lines 85-94
85return e.support.transition?void this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350):r.call(this)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n,r=e(this),i=r.attr("data-target")||t.preventDefault()||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),o=e(i),a=o.data("bs.collapse"),s=a?"toggle":r.data(),u=r.attr("data-parent"),l=u&&e(u);a&&a.transitioning||(l&&l.find('[data-toggle=collapse][data-parent="'+u+'"]').not(r).addClass("collapsed"),r[o.hasClass("in")?"addClass":"removeClass"]("collapsed")),o.collapse(s)})}(jQuery),function(e){"use strict";function t(){e(r).remove(),e(i).each(function(t){var r=n(e(this));r.hasClass("open")&&(r.trigger(t=e.Event("hide.bs.dropdown")),t.isDefaultPrevented()||r.removeClass("open").trigger("hidden.bs.dropdown"))})}function n(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var r=".dropdown-backdrop",i="[data-toggle=dropdown]",o=function(t){e(t).on("click.bs.dropdown",this.toggle)};o.prototype.toggle=function(r){var i=e(this);if(!i.is(".disabled, :disabled")){var o=n(i),a=o.hasClass("open");if(t(),!a){if("disable-ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",t),o.trigger(r=e.Event("show.bs.dropdown")),r.isDefaultPrevented())return;o.toggleClass("open").trigger("shown.bs.dropdown"),i.focus()}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=n(r),a=o.hasClass("open");if(!a||a&&27==t.keyCode)return 27==t.which&&o.find(i).focus(),r.click();var s=e("[role=menu] li:not(.divider):visible a",o);if(s.length){var u=s.index(s.filter(":focus"));38==t.keyCode&&u>0&&u--,40==t.keyCode&&u<s.length-1&&u++,~u||(u=0),s.eq(u).focus()}}}};var a=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),r=n.data("dropdown");r||n.data("dropdown",r=new o(this)),"string"==typeof t&&r[t].call(n)})},e.fn.dropdown.Constructor=o,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=a,this},e(document).on("click.bs.dropdown.data-api",t).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",i,o.prototype.toggle).on("keydown.bs.dropdown.data-api",i+", [role=menu]",o.prototype.keydown)}(jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)}))},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;r?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),o=i.data("bs.modal"),a=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);o||i.data("bs.modal",o=new t(this,a)),"string"==typeof n?o[n](r):a.show&&o.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),o=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(o,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(jQuery),function(e){"use strict";var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);for(var i=this.options.trigger.split(" "),o=i.length;o--;){var a=i[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focus",u="hover"==a?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return(t=e.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show()},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,o=i.test(r);o&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var a=this.getPosition(),s=n[0].offsetWidth,u=n[0].offsetHeight;if(o){var l=this.$element.parent(),c=r,d=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:l.outerWidth(),h="body"==this.options.container?window.innerHeight:l.outerHeight(),p="body"==this.options.container?0:l.offset().left;r="bottom"==r&&a.top+a.height+u-d>h?"top":"top"==r&&a.top-d-u<0?"bottom":"right"==r&&a.right+s>f?"left":"left"==r&&a.left-s<p?"right":r,n.removeClass(c).addClass(r)}var m=this.getCalculatedOffset(r,a,s,u);this.applyPlacement(m,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,o=r[0].offsetHeight,a=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),e.top=e.top+a,e.left=e.left+s,r.offset(e).addClass("in");var u=r[0].offsetWidth,l=r[0].offsetHeight;if("top"==t&&l!=o&&(n=!0,e.top=e.top+o-l),/bottom|top/.test(t)){var c=0;e.left<0&&(c=-2*e.left,e.left=0,r.offset(e),u=r[0].offsetWidth,l=r[0].offsetHeight),this.replaceArrow(c-i+u,u,"left")}else this.replaceArrow(l-o,l,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function t(){"in"!=n.hoverState&&r.detach()}var n=this,r=this.tip(),i=e.Event("hide.bs."+this.type);return this.$element.trigger(i),i.isDefaultPrevented()?void 0:(r.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r.one(e.support.transition.end,t).emulateTransitionEnd(150):t(),this.$element.trigger("hidden.bs."+this.type),this)},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),o="object"==typeof n&&n;i||r.data("bs.tooltip",i=new t(this,o)),"string"==typeof n&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),function(e){"use strict";function t(n,r){var i,o=e.proxy(this.process,this);this.$element=e(n).is("body")?e(window):e(n),this.$body=e("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",o),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||(i=e(n).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var t=this.$element[0]==window?"offset":"position";this.offsets=e([]),this.targets=e([]);var n=this;this.$body.find(this.selector).map(function(){var r=e(this),i=r.data("target")||r.attr("href"),o=/^#\w/.test(i)&&e(i);return o&&o.length&&[[o[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget;if(t>=n)return o!=(e=i.last()[0])&&this.activate(e);for(e=r.length;e--;)o!=i[e]&&t>=r[e]&&(!r[e+1]||t<=r[e+1])&&this.activate(i[e])},t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parents(".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',r=e(n).parents("li").addClass("active");r.parent(".dropdown-menu").length&&(r=r.closest("li.dropdown").addClass("active")),r.trigger("activate")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(jQuery),function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.data("target");if(r||(r=(r=t.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var i=n.find(".active:last a")[0],o=e.Event("show.bs.tab",{relatedTarget:i});if(t.trigger(o),!o.isDefaultPrevented()){var a=e(r);this.activate(t.parent("li"),n),this.activate(a,a.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})}}},t.prototype.activate=function(t,n,r){function i(){ 86o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var o=n.find("> .active"),a=r&&e.support.transition&&o.hasClass("fade");a?o.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),o.removeClass("in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),"string"==typeof n&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=null,this.checkPosition()};t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),o=this.options.offset,a=o.top,s=o.bottom;"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom());var u=!(null!=this.unpin&&r+this.unpin<=i.top)&&(null!=s&&i.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=r&&"top");this.affixed!==u&&(this.unpin&&this.$element.css("top",""),this.affixed=u,this.unpin="bottom"==u?i.top-r:null,this.$element.removeClass(t.RESET).addClass("affix"+(u?"-"+u:"")),"bottom"==u&&this.$element.offset({top:document.body.offsetHeight-s-this.$element.height()}))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(jQuery), 87/*! 88 * Chart.js 89 * http://chartjs.org/ 90 * 91 * Copyright 2013 Nick Downie 92 * Released under the MIT license 93 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md 94 */
95window.Chart=function(e){function t(e,t,n){var r=t.steps*t.stepValue,i=l((e-t.graphMin)/r,1,0);return n*t.steps*i}function n(e,t,n,r){function i(){var i=e.animation?l(s(u),null,0):1;g(r),e.scaleOverlay?(n(i),t()):(t(),n(i))}function o(){u+=a,i(),u<=1?k(o):"function"==typeof e.onAnimationComplete&&e.onAnimationComplete()}var a=e.animation?1/l(e.animationSteps,Number.MAX_VALUE,1):1,s=p[e.animationEasing],u=e.animation?0:1;"function"!=typeof t&&(t=function(){}),k(o)}function r(e,t,n,r,o,a){function s(e){return Math.floor(Math.log(e)/Math.LN10)}var u,l,c,d,f;for(f=s(r-o),u=Math.floor(o/(1*Math.pow(10,f)))*Math.pow(10,f),l=Math.ceil(r/(1*Math.pow(10,f)))*Math.pow(10,f)-u,c=Math.pow(10,f),d=Math.round(l/c);d<n||d>t;)d<n?(c/=2,d=Math.round(l/c)):(c*=2,d=Math.round(l/c));var h=[];return i(a,h,d,u,c),{steps:d,stepValue:c,graphMin:u,labels:h}}function i(e,t,n,r,i){if(e)for(var o=1;o<n+1;o++)t.push(f(e,{value:(r+i*o).toFixed(c(i))}))}function o(e){return Math.max.apply(Math,e)}function a(e){return Math.min.apply(Math,e)}function s(e,t){return e||t}function u(e){return!isNaN(parseFloat(e))&&isFinite(e)}function l(e,t,n){return u(t)&&e>t?t:u(n)&&e<n?n:e}function c(e){return e%1!=0?e.toString().split(".")[1].length:0}function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e,t){var n=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):S[e]=S[e]||f(document.getElementById(e).innerHTML);return t?n(t):n}var h=this,p={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-1*e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1*((e=e/1-1)*e*e+1)},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-1*((e=e/1-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return 1*(e/=1)*e*e*e*e},easeOutQuint:function(e){return 1*((e=e/1-1)*e*e*e*e+1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-1*Math.cos(e/1*(Math.PI/2))+1},easeOutSine:function(e){return 1*Math.sin(e/1*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e/1)-1)},easeInExpo:function(e){return 0==e?1:1*Math.pow(2,10*(e/1-1))},easeOutExpo:function(e){return 1==e?1:1*(1-Math.pow(2,-10*e/1))},easeInOutExpo:function(e){return 0==e?0:1==e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-1*(Math.sqrt(1-(e/=1)*e)-1)},easeOutCirc:function(e){return 1*Math.sqrt(1-(e=e/1-1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;if(0==e)return 0;if(1==(e/=1))return 1;if(n||(n=.3),r<Math.abs(1)){r=1;t=n/4}else t=n/(2*Math.PI)*Math.asin(1/r);return-r*Math.pow(2,10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n)},easeOutElastic:function(e){var t=1.70158,n=0,r=1;if(0==e)return 0;if(1==(e/=1))return 1;if(n||(n=.3),r<Math.abs(1)){r=1;t=n/4}else t=n/(2*Math.PI)*Math.asin(1/r);return r*Math.pow(2,-10*e)*Math.sin((1*e-t)*(2*Math.PI)/n)+1},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;if(0==e)return 0;if(2==(e/=.5))return 1;
95if(n||(n=.3*1.5*1),r<Math.abs(1)){r=1;t=n/4}else t=n/(2*Math.PI)*Math.asin(1/r);return e<1?r*Math.pow(2,10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((1*e-t)*(2*Math.PI)/n)*.5+1},easeInBack:function(e){var t=1.70158;return 1*(e/=1)*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return 1*((e=e/1-1)*e*((t+1)*e+t)+1)},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-p.easeOutBounce(1-e)},easeOutBounce:function(e){return(e/=1)<1/2.75?7.5625*e*e*1:e<2/2.75?1*(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1*(7.5625*(e-=2.25/2.75)*e+.9375):1*(7.5625*(e-=2.625/2.75)*e+.984375)},easeInOutBounce:function(e){return e<.5?.5*p.easeInBounce(2*e):.5*p.easeOutBounce(2*e-1)+.5}},m=e.canvas.width,v=e.canvas.height;window.devicePixelRatio&&(e.canvas.style.width=m+"px",e.canvas.style.height=v+"px",e.canvas.height=v*window.devicePixelRatio,e.canvas.width=m*window.devicePixelRatio,e.scale(window.devicePixelRatio,window.devicePixelRatio)),this.PolarArea=function(t,n){h.PolarArea.defaults={scaleOverlay:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,onAnimationComplete:null};var r=n?d(h.PolarArea.defaults,n):h.PolarArea.defaults;return new y(t,r,e)},this.Radar=function(t,n){h.Radar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!1,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,angleShowLineOut:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:12,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var r=n?d(h.Radar.defaults,n):h.Radar.defaults;return new b(t,r,e)},this.Pie=function(t,n){h.Pie.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,onAnimationComplete:null};var r=n?d(h.Pie.defaults,n):h.Pie.defaults;return new _(t,r,e)},this.Doughnut=function(t,n){h.Doughnut.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,onAnimationComplete:null};var r=n?d(h.Doughnut.defaults,n):h.Doughnut.defaults;return new x(t,r,e)},this.Line=function(t,n){h.Line.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:2,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var r=n?d(h.Line.defaults,n):h.Line.defaults;return new w(t,r,e)},this.Bar=function(t,n){h.Bar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var r=n?d(h.Bar.defaults,n):h.Bar.defaults;return new C(t,r,e)};var g=function(e){e.clearRect(0,0,m,v)},y=function(e,u,l){function c(){p=a([m,v])/2,p-=o([.5*u.scaleFontSize,.5*u.scaleLineWidth]),b=2*u.scaleFontSize,u.scaleShowLabelBackdrop&&(b+=2*u.scaleBackdropPaddingY,p-=1.5*u.scaleBackdropPaddingY),_=p,b=s(b,5)}function d(){for(var e=0;e<y.steps;e++)if(u.scaleShowLine&&(l.beginPath(),l.arc(m/2,v/2,g*(e+1),0,2*Math.PI,!0),l.strokeStyle=u.scaleLineColor,l.lineWidth=u.scaleLineWidth,l.stroke()),u.scaleShowLabels){l.textAlign="center",l.font=u.scaleFontStyle+" "+u.scaleFontSize+"px "+u.scaleFontFamily;var t=y.labels[e];if(u.scaleShowLabelBackdrop){var n=l.measureText(t).width;l.fillStyle=u.scaleBackdropColor,l.beginPath(),l.rect(Math.round(m/2-n/2-u.scaleBackdropPaddingX),Math.round(v/2-g*(e+1)-.5*u.scaleFontSize-u.scaleBackdropPaddingY),Math.round(n+2*u.scaleBackdropPaddingX),Math.round(u.scaleFontSize+2*u.scaleBackdropPaddingY)),l.fill()}l.textBaseline="middle",l.fillStyle=u.scaleFontColor,l.fillText(t,m/2,v/2-g*(e+1))}}function f(n){var r=-Math.PI/2,i=2*Math.PI/e.length,o=1,a=1;u.animation&&(u.animateScale&&(o=n),u.animateRotate&&(a=n));for(var s=0;s<e.length;s++)l.beginPath(),l.arc(m/2,v/2,o*t(e[s].value,y,g),r,r+a*i,!1),l.lineTo(m/2,v/2),l.closePath(),l.fillStyle=e[s].c
95olor,l.fill(),u.segmentShowStroke&&(l.strokeStyle=u.segmentStrokeColor,l.lineWidth=u.segmentStrokeWidth,l.stroke()),r+=a*i}function h(){for(var t=Number.MIN_VALUE,n=Number.MAX_VALUE,r=0;r<e.length;r++)e[r].value>t&&(t=e[r].value),e[r].value<n&&(n=e[r].value);return{maxValue:t,minValue:n,maxSteps:Math.floor(_/(.66*b)),minSteps:Math.floor(_/b*.5)}}var p,g,y,b,_,x,w;c(),x=h(),w=u.scaleShowLabels?u.scaleLabel:null,u.scaleOverride?i(w,(y={steps:u.scaleSteps,stepValue:u.scaleStepWidth,graphMin:u.scaleStartValue,labels:[]}).labels,y.steps,u.scaleStartValue,u.scaleStepWidth):y=r(_,x.maxSteps,x.minSteps,x.maxValue,x.minValue,w),g=p/y.steps,n(u,d,f,l)},b=function(e,u,c){function d(n){var r=2*Math.PI/e.datasets[0].data.length;c.save(),c.translate(m/2,v/2);for(var i=0;i<e.datasets.length;i++){c.beginPath(),c.moveTo(0,n*(-1*t(e.datasets[i].data[0],b,y)));for(var o=1;o<e.datasets[i].data.length;o++)c.rotate(r),c.lineTo(0,n*(-1*t(e.datasets[i].data[o],b,y)));if(c.closePath(),c.fillStyle=e.datasets[i].fillColor,c.strokeStyle=e.datasets[i].strokeColor,c.lineWidth=u.datasetStrokeWidth,c.fill(),c.stroke(),u.pointDot){c.fillStyle=e.datasets[i].pointColor,c.strokeStyle=e.datasets[i].pointStrokeColor,c.lineWidth=u.pointDotStrokeWidth;for(var a=0;a<e.datasets[i].data.length;a++)c.rotate(r),c.beginPath(),c.arc(0,n*(-1*t(e.datasets[i].data[a],b,y)),u.pointDotRadius,2*Math.PI,!1),c.fill(),c.stroke()}c.rotate(r)}c.restore()}function f(){var t=2*Math.PI/e.datasets[0].data.length;if(c.save(),c.translate(m/2,v/2),u.angleShowLineOut){c.strokeStyle=u.angleLineColor,c.lineWidth=u.angleLineWidth;for(var n=0;n<e.datasets[0].data.length;n++)c.rotate(t),c.beginPath(),c.moveTo(0,0),c.lineTo(0,-g),c.stroke()}for(var r=0;r<b.steps;r++){if(c.beginPath(),u.scaleShowLine){c.strokeStyle=u.scaleLineColor,c.lineWidth=u.scaleLineWidth,c.moveTo(0,-y*(r+1));for(var i=0;i<e.datasets[0].data.length;i++)c.rotate(t),c.lineTo(0,-y*(r+1));c.closePath(),c.stroke()}if(u.scaleShowLabels){if(c.textAlign="center",c.font=u.scaleFontStyle+" "+u.scaleFontSize+"px "+u.scaleFontFamily,c.textBaseline="middle",u.scaleShowLabelBackdrop){var o=c.measureText(b.labels[r]).width;c.fillStyle=u.scaleBackdropColor,c.beginPath(),c.rect(Math.round(-o/2-u.scaleBackdropPaddingX),Math.round(-y*(r+1)-.5*u.scaleFontSize-u.scaleBackdropPaddingY),Math.round(o+2*u.scaleBackdropPaddingX),Math.round(u.scaleFontSize+2*u.scaleBackdropPaddingY)),c.fill()}c.fillStyle=u.scaleFontColor,c.fillText(b.labels[r],0,-y*(r+1))}}for(var a=0;a<e.labels.length;a++){c.font=u.pointLabelFontStyle+" "+u.pointLabelFontSize+"px "+u.pointLabelFontFamily,c.fillStyle=u.pointLabelFontColor;var s=Math.sin(t*a)*(g+u.pointLabelFontSize),l=Math.cos(t*a)*(g+u.pointLabelFontSize);t*a==Math.PI||t*a==0?c.textAlign="center":t*a>Math.PI?c.textAlign="right":c.textAlign="left",c.textBaseline="middle",c.fillText(e.labels[a],s,-l)}c.restore()}function h(){g=a([m,v])/2,_=2*u.scaleFontSize;for(var t=0,n=0;n<e.labels.length;n++){c.font=u.pointLabelFontStyle+" "+u.pointLabelFontSize+"px "+u.pointLabelFontFamily;var r=c.measureText(e.labels[n]).width;r>t&&(t=r)}g-=o([t,u.pointLabelFontSize/2*1.5]),g=l(g-=u.pointLabelFontSize,null,0),x=g,_=s(_,5)}function p(){for(var t=Number.MIN_VALUE,n=Number.MAX_VALUE,r=0;r<e.datasets.length;r++)for(var i=0;i<e.datasets[r].data.length;i++)e.datasets[r].data[i]>t&&(t=e.datasets[r].data[i]),e.datasets[r].data[i]<n&&(n=e.datasets[r].data[i]);return{maxValue:t,minValue:n,maxSteps:Math.floor(x/(.66*_)),minSteps:Math.floor(x/_*.5)}}var g,y,b,_,x,w;e.labels||(e.labels=[]),h();var C=p();w=u.scaleShowLabels?u.scaleLabel:null,u.scaleOverride?i(w,(b={steps:u.scaleSteps,stepValue:u.scaleStepWidth,graphMin:u.scaleStartValue,labels:[]}).labels,b.steps,u.scaleStartValue,u.scaleStepWidth):b=r(x,C.maxSteps,C.minSteps,C.maxValue,C.minValue,w),y=g/b.steps,n(u,f,d,c)},_=function(e,t,r){function i(n){var i=-Math.PI/2,a=1,u=1;t.animation&&(t.animateScale&&(a=n),t.animateRotate&&(u=n));for(var l=0;l<e.length;l++){var c=u*(e[l].value/o*(2*Math.PI));r.beginPath(),r.arc(m/2,v/2,a*s,i,i+c),r.lineTo(m/2,v/2),r.closePath(),r.fillStyle=e[l].color,r.fill(),t.segmentShowStroke&&(r.lineWidth=t.segmentStrokeWidth,r.strokeStyle=t.segmentStrokeColor,r.stroke()),i+=c}}for(var o=0,s=a([v/2,m/2])-5,u=0;u<e.length;u++)o+=e[u].value;n(t,null,i,r)},x=function(e,t,r){function i(n){var i=-Math.PI/2,a=1,l=1;t.animation&&(t.animateScale&&(a=n),t.animateRotate&&(l=n));for(var c=0;c<e.length;c++){var d=l*(e[c].value/o*(2*Math.PI));r.beginPath(),r.arc(m/2,v/2,a*s,i,i+d,!1),r.arc(m/2,v/2,a*u,i+d,i,!0),r.closePath(),r.fillStyle=e[c].color,r.fill(),t.segmentShowStroke&&(r.lineWidth=t.segmentStrokeWidth,r.strokeStyle=t.segmentStrokeColor,r.stroke()),i+=d}}for(var o=0,s=a([v/2,m/2])-5,u=s*(t.percentageInnerCutout/100),l=0;l<e.length;l++)o+=e[l].value;n(t,null,i,r)},w=function(e,o,a){function s(n){function r(r,i){return S-n*t(e.datasets[r].data[i],p,h)}function i(e){return k+x*e}for(var s=0;s<e.datasets.length;s++){a.strokeStyle=e.datasets[s].strokeColor,a.lineWidth=o.datasetStrokeWidth,a.beginPath(),a.moveTo(k,S-n*t(e.datasets[s].data[0],p,h));for(var u=1;u<e.datasets[s].data.length;u++)o.bezierCurve?a.bezierCurveTo(i(u-.5),r(s,u-1),i(u-.5),r(s,u),i(u),r(s,u)):a.lineTo(i(u),r(s,u));if(a.stroke(),o.datasetFill?(a.lineTo(k+x*(e.datasets[s].data.length-1),S),a.lineTo(k,S),a.closePath(),a.fillStyle=e.datasets[s].fillColor,a.fill()):a.closePath(),o.pointDot){a.fillStyle=e.datasets[s].pointColor,a.strokeStyle=e.datasets[s].pointStrokeColor,a.lineWidth=o.pointDotStrokeWidth;for(var l=0;l<e.datasets[s].data.length;l++)a.beginPath(),a.arc(k+x*l,S-n*t(e.datasets[s].data[l],p,h),o.pointDotRadius,0,2*Math.PI,!0),a.fill(),a.stroke()}}}function u(){a.lineWidth=o.scaleLineWidth,a.strokeStyle=o.scaleLineColor,a.beginPath(),a.moveTo(m-w/2+5,S),a.lineTo(m-w/2-C-5,S),a.stroke(),j>0?(a.save(),a.textAlign="right"):a.textAlign="center",a.fillStyle=o.scaleFontColor;for(var t=0;t<e.labels.length;t++)a.save(),j>0?(a.translate(k+t*x,S+o.scaleFontSize),a.rotate(-j*(Math.PI/180)
95),a.fillText(e.labels[t],0,0),a.restore()):a.fillText(e.labels[t],k+t*x,S+o.scaleFontSize+3),a.beginPath(),a.moveTo(k+t*x,S+3),o.scaleShowGridLines&&t>0?(a.lineWidth=o.scaleGridLineWidth,a.strokeStyle=o.scaleGridLineColor,a.lineTo(k+t*x,5)):a.lineTo(k+t*x,S+3),a.stroke();a.lineWidth=o.scaleLineWidth,a.strokeStyle=o.scaleLineColor,a.beginPath(),a.moveTo(k,S+5),a.lineTo(k,5),a.stroke(),a.textAlign="right",a.textBaseline="middle";for(var n=0;n<p.steps;n++)a.beginPath(),a.moveTo(k-3,S-(n+1)*h),o.scaleShowGridLines?(a.lineWidth=o.scaleGridLineWidth,a.strokeStyle=o.scaleGridLineColor,a.lineTo(k+C+5,S-(n+1)*h)):a.lineTo(k-.5,S-(n+1)*h),a.stroke(),o.scaleShowLabels&&a.fillText(p.labels[n],k-8,S-(n+1)*h)}function l(){var t=1;if(o.scaleShowLabels){a.font=o.scaleFontStyle+" "+o.scaleFontSize+"px "+o.scaleFontFamily;for(var n=0;n<p.labels.length;n++){var r=a.measureText(p.labels[n]).width;t=r>t?r:t}t+=10}C=m-t-w,x=Math.floor(C/(e.labels.length-1)),k=m-w/2-C,S=y+o.scaleFontSize/2}function c(){f=v,a.font=o.scaleFontStyle+" "+o.scaleFontSize+"px "+o.scaleFontFamily,w=1;for(var t=0;t<e.labels.length;t++){var n=a.measureText(e.labels[t]).width;w=n>w?n:w}m/e.labels.length<w?(j=45,m/e.labels.length<Math.cos(j)*w?(j=90,f-=w):f-=Math.sin(j)*w):f-=o.scaleFontSize,f-=5,g=o.scaleFontSize,y=f-=g}function d(){for(var t=Number.MIN_VALUE,n=Number.MAX_VALUE,r=0;r<e.datasets.length;r++)for(var i=0;i<e.datasets[r].data.length;i++)e.datasets[r].data[i]>t&&(t=e.datasets[r].data[i]),e.datasets[r].data[i]<n&&(n=e.datasets[r].data[i]);return{maxValue:t,minValue:n,maxSteps:Math.floor(y/(.66*g)),minSteps:Math.floor(y/g*.5)}}var f,h,p,g,y,b,_,x,w,C,k,S,j=0;c(),b=d(),_=o.scaleShowLabels?o.scaleLabel:"",o.scaleOverride?i(_,(p={steps:o.scaleSteps,stepValue:o.scaleStepWidth,graphMin:o.scaleStartValue,labels:[]}).labels,p.steps,o.scaleStartValue,o.scaleStepWidth):p=r(y,b.maxSteps,b.minSteps,b.maxValue,b.minValue,_),h=Math.floor(y/p.steps),l(),n(o,u,s,a)},C=function(e,o,a){function s(n){a.lineWidth=o.barStrokeWidth;for(var r=0;r<e.datasets.length;r++){a.fillStyle=e.datasets[r].fillColor,a.strokeStyle=e.datasets[r].strokeColor;for(var i=0;i<e.datasets[r].data.length;i++){var s=k+o.barValueSpacing+x*i+j*r+o.barDatasetSpacing*r+o.barStrokeWidth*r;a.beginPath(),a.moveTo(s,S),a.lineTo(s,S-n*t(e.datasets[r].data[i],p,h)+o.barStrokeWidth/2),a.lineTo(s+j,S-n*t(e.datasets[r].data[i],p,h)+o.barStrokeWidth/2),a.lineTo(s+j,S),o.barShowStroke&&a.stroke(),a.closePath(),a.fill()}}}function u(){a.lineWidth=o.scaleLineWidth,a.strokeStyle=o.scaleLineColor,a.beginPath(),a.moveTo(m-w/2+5,S),a.lineTo(m-w/2-C-5,S),a.stroke(),E>0?(a.save(),a.textAlign="right"):a.textAlign="center",a.fillStyle=o.scaleFontColor;for(var t=0;t<e.labels.length;t++)a.save(),E>0?(a.translate(k+t*x,S+o.scaleFontSize),a.rotate(-E*(Math.PI/180)),a.fillText(e.labels[t],0,0),a.restore()):a.fillText(e.labels[t],k+t*x+x/2,S+o.scaleFontSize+3),a.beginPath(),a.moveTo(k+(t+1)*x,S+3),a.lineWidth=o.scaleGridLineWidth,a.strokeStyle=o.scaleGridLineColor,a.lineTo(k+(t+1)*x,5),a.stroke();a.lineWidth=o.scaleLineWidth,a.strokeStyle=o.scaleLineColor,a.beginPath(),a.moveTo(k,S+5),a.lineTo(k,5),a.stroke(),a.textAlign="right",a.textBaseline="middle";for(var n=0;n<p.steps;n++)a.beginPath(),a.moveTo(k-3,S-(n+1)*h),o.scaleShowGridLines?(a.lineWidth=o.scaleGridLineWidth,a.strokeStyle=o.scaleGridLineColor,a.lineTo(k+C+5,S-(n+1)*h)):a.lineTo(k-.5,S-(n+1)*h),a.stroke(),o.scaleShowLabels&&a.fillText(p.labels[n],k-8,S-(n+1)*h)}function l(){var t=1;if(o.scaleShowLabels){a.font=o.scaleFontStyle+" "+o.scaleFontSize+"px "+o.scaleFontFamily;for(var n=0;n<p.labels.length;n++){var r=a.measureText(p.labels[n]).width;t=r>t?r:t}t+=10}C=m-t-w,x=Math.floor(C/e.labels.length),j=(x-2*o.scaleGridLineWidth-2*o.barValueSpacing-(o.barDatasetSpacing*e.datasets.length-1)-(o.barStrokeWidth/2*e.datasets.length-1))/e.datasets.length,k=m-w/2-C,S=y+o.scaleFontSize/2}function c(){f=v,a.font=o.scaleFontStyle+" "+o.scaleFontSize+"px "+o.scaleFontFamily,w=1;for(var t=0;t<e.labels.length;t++){var n=a.measureText(e.labels[t]).width;w=n>w?n:w}m/e.labels.length<w?(E=45,m/e.labels.length<Math.cos(E)*w?(E=90,f-=w):f-=Math.sin(E)*w):f-=o.scaleFontSize,f-=5,g=o.scaleFontSize,y=f-=g}function d(){for(var t=Number.MIN_VALUE,n=Number.MAX_VALUE,r=0;r<e.datasets.length;r++)for(var i=0;i<e.datasets[r].data.length;i++)e.datasets[r].data[i]>t&&(t=e.datasets[r].data[i]),e.datasets[r].data[i]<n&&(n=e.datasets[r].data[i]);return{maxValue:t,minValue:n,maxSteps:Math.floor(y/(.66*g)),minSteps:Math.floor(y/g*.5)}}var f,h,p,g,y,b,_,x,w,C,k,S,j,E=0;c(),b=d(),_=o.scaleShowLabels?o.scaleLabel:"",o.scaleOverride?i(_,(p={steps:o.scaleSteps,stepValue:o.scaleStepWidth,graphMin:o.scaleStartValue,labels:[]}).labels,p.steps,o.scaleStartValue,o.scaleStepWidth):p=r(y,b.maxSteps,b.minSteps,b.maxValue,b.minValue,_),h=Math.floor(y/p.steps),l(),n(o,u,s,a)},k=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},S={}},function(){function e(e){return null!=e&&!isNaN(e)}function t(e){return e.length}function n(e){for(var t=1;e*t%1;)t*=10;return t}function r(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function i(){}function o(e){return aa+e in this}function a(e){return(e=aa+e)in this&&delete this[e]}function s(){var e=[];return this.forEach(function(t){e.push(t)}),e}function u(){var e=0;for(var t in this)t.charCodeAt(0)===sa&&++e;return e}function l(){for(var e in this)if(e.charCodeAt(0)===sa)return!1;return!0}function c(){}function d(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function f(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var n=0,r=ua.length;n<r;++n){var i=ua[n]+t;if(i in e)return i}}function h(){}function p(){}function m(e){function t(){for(var t,r=n,i=-1,o=r.length;++i<o;)(t=r[i].on)&&t.apply(this,arguments);return e}var n=[],r=new i;return t.on=function(t,i){var o,a=r.get(t);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),r.remove(t)),i&&n.push(r.set(t,{on:i})),e)},t}function v(){Ko.event.preventDefault()}function g(){for(var e,t=Ko.event;e=t.sourceEvent;)t=e;return t}function y(e){for(var t=new p,n=0,r=arguments.length;++n<r;)t[arguments[n]]=m(t);return t.of=function(n,r){return function(i){try{var o=i.sourceEvent=Ko.event;i.target=e,Ko.event=i,t[i.type].apply(n,r)}finally{Ko.event=o}}},t}function b(e){return ca(e,ma),e}function _(e){return"function"==typeof e?e:function(){return da(e,this)}}function x(e){return"function"==typeof e?e:function(){return fa(e,this)}}function w(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=Ko.ns.qualify(e),null==t?e.local?r:n:"function"==typeof t?e.local?s:a:e.local?o:i}function C(e){return e.trim().replace(/\s+/g," ")}function k(e){return new RegExp("(?:^|\\s+)"+Ko.requote(e)+"(?:\\s+|$)","g")}function S(e){return e.trim().split(/^|\s+/)}function j(e,t){function n(){for(var n=-1;++n<i;)e[n](this,t)}function r(){for(var n=-1,r=t.apply(this,arguments);++n<i;)e[n](this,r)}var i=(e=S(e).map(E)).length;return"function"==typeof t?r:n}function E(e){var t=k(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",C(i+" "+e))):n.setAttribute("class",C(i.replace(t," ")))}}function T(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function o(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return null==t?r:"function"==typeof t?o:i}function P(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?i:r}function $(e){return"function"==typeof e?e:(e=Ko.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function N(e){return{__data__:e}}function R(e){return function(){return pa(this,e)}}function M(e){return arguments.length||(e=Ko.ascending),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function D(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function A(e){return ca(e,ga),e}function I(e){var t,n;return function(r,i,o){var a,s=e[o].update,u=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<u;);return a}}function O(){var e=this.__transition__;e&&++e.active}function F(e,t,n){function r(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}function i(){var i=u(t,Go(arguments));r.call(this),this.addEventListener(e,this[a]=i,i.$=n),i._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+Ko.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var a="__on"+e,s=e.indexOf("."),u=L;s>0&&(e=e.substring(0,s));var l=ba.get(e);return l&&(e=l,u=H),s?t?i:r:t?h:o}function L(e,t){return function(n){var r=Ko.event;Ko.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{Ko.event=r}}}function H(e,t){var n=L(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function B(){var e=".dragsuppress-"+ ++xa,t="click"+e,n=Ko.select(Jo).on("touchmove"+e,v).on("dragstart"+e,v).on("selectstart"+e,v);if(_a){var r=Xo.style,i=r[_a];r[_a]="none"}
95return function(o){if(n.on(e,null),_a&&(r[_a]=i),o){function a(){n.on(t,null)}n.on(t,function(){v(),a()},!0),setTimeout(a,0)}}}function U(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(wa<0&&(Jo.scrollX||Jo.scrollY)){var i=(n=Ko.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();wa=!(i.f||i.e),n.remove()}return wa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function q(e){return e>0?1:e<0?-1:0}function z(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function W(e){return e>1?0:e<-1?Ca:Math.acos(e)}function V(e){return e>1?Sa:e<-1?-Sa:Math.asin(e)}function K(e){return((e=Math.exp(e))-1/e)/2}function Q(e){return((e=Math.exp(e))+1/e)/2}function G(e){return((e=Math.exp(2*e))-1)/(e+1)}function Y(e){return(e=Math.sin(e/2))*e}function X(){}function J(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.s=t,this.l=n}function ee(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,o=2*(n=n<0?0:n>1?1:n)-(a=n<=.5?n*(1+t):n+t-n*t),he(i(e+120),i(e),i(e-120))}function te(e,t,n){return new ne(e,t,n)}function ne(e,t,n){this.h=e,this.c=t,this.l=n}function re(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),ie(n,Math.cos(e*=Ta)*t,Math.sin(e)*t)}function ie(e,t,n){return new oe(e,t,n)}function oe(e,t,n){this.l=e,this.a=t,this.b=n}function ae(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return he(ce(3.2404542*(i=ue(i)*La)-1.5371385*(r=ue(r)*Ha)-.4985314*(o=ue(o)*Ba)),ce(-.969266*i+1.8760108*r+.041556*o),ce(.0556434*i-.2040259*r+1.0572252*o))}function se(e,t,n){return e>0?te(Math.atan2(n,t)*Pa,Math.sqrt(t*t+n*n),e):te(NaN,NaN,e)}function ue(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function le(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ce(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function de(e){return he(e>>16,e>>8&255,255&e)}function fe(e){return de(e)+""}function he(e,t,n){return new pe(e,t,n)}function pe(e,t,n){this.r=e,this.g=t,this.b=n}function me(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ve(e,t,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/i.exec(e))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(_e(i[0]),_e(i[1]),_e(i[2]))}return(o=za.get(e))?t(o.r,o.g,o.b):(null!=e&&"#"===e.charAt(0)&&(4===e.length?(a=e.charAt(1),a+=a,s=e.charAt(2),s+=s,u=e.charAt(3),u+=u):7===e.length&&(a=e.substring(1,3),s=e.substring(3,5),u=e.substring(5,7)),a=parseInt(a,16),s=parseInt(s,16),u=parseInt(u,16)),t(a,s,u))}function ge(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),J(r,i,u)}function ye(e,t,n){var r=le((.4124564*(e=be(e))+.3575761*(t=be(t))+.1804375*(n=be(n)))/La),i=le((.2126729*e+.7151522*t+.072175*n)/Ha);return ie(116*i-16,500*(r-i),200*(i-le((.0193339*e+.119192*t+.9503041*n)/Ba)))}function be(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _e(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function xe(e){return"function"==typeof e?e:function(){return e}}function we(e){return e}function Ce(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),ke(t,n,e,r)}}function ke(e,t,n,r){function i(){var e,t=u.status;if(!t&&u.responseText||t>=200&&t<300||304===t){try{e=n.call(o,u)}catch(r){return void a.error.call(o,r)}a.load.call(o,e)}else a.error.call(o,u)}var o={},a=Ko.dispatch("beforesend","progress","load","error"),s={},u=new XMLHttpRequest,l=null;
95return!Jo.XDomainRequest||"withCredentials"in u||!/^(http(s)?:)?\/\//.test(e)||(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=i:u.onreadystatechange=function(){u.readyState>3&&i()},u.onprogress=function(e){var t=Ko.event;Ko.event=e;try{a.progress.call(o,u)}finally{Ko.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(l=e,o):l},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(Go(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),u.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),u.setRequestHeader)for(var c in s)u.setRequestHeader(c,s[c]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=l&&(u.responseType=l),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,u),u.send(null==r?null:r),o},o.abort=function(){return u.abort(),o},Ko.rebind(o,a,"on"),null==r?o:o.get(Se(r))}function Se(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function je(){var e=Ee(),t=Te()-e;t>24?(isFinite(t)&&(clearTimeout(Qa),Qa=setTimeout(je,t)),Ka=0):(Ka=1,Ya(je))}function Ee(){var e=Date.now();for(Ga=Wa;Ga;)e>=Ga.t&&(Ga.f=Ga.c(e-Ga.t)),Ga=Ga.n;return e}function Te(){for(var e,t=Wa,n=Infinity;t;)t.f?t=e?e.n=t.n:Wa=t.n:(t.t<n&&(n=t.t),t=(e=t).n);return Va=e,n}function Pe(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function $e(e,t){var n=Math.pow(10,3*oa(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Ne(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r?function(e){for(var t=e.length,i=[],o=0,a=r[0];t>0&&a>0;)i.push(e.substring(t-=a,t+a)),a=r[o=(o+1)%r.length];return i.reverse().join(n)}:we;return function(e){var n=Ja.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"",u=n[4]||"",l=n[5],c=+n[6],d=n[7],f=n[8],h=n[9],p=1,m="",v="",g=!1;switch(f&&(f=+f.substring(1)),(l||"0"===r&&"="===a)&&(l=r="0",a="=",d&&(c-=Math.floor((c-1)/4))),h){case"n":d=!0,h="g";break;case"%":p=100,v="%",h="f";break;case"p":p=100,v="%",h="r";break;case"b":case"o":case"x":case"X":"#"===u&&(m="0"+h.toLowerCase());case"c":case"d":g=!0,f=0;break;case"s":p=-1,h="r"}"$"===u&&(m=i[0],v=i[1]),"r"!=h||f||(h="g"),null!=f&&("g"==h?f=Math.max(1,Math.min(21,f)):"e"!=h&&"f"!=h||(f=Math.max(0,Math.min(20,f)))),h=Za.get(h)||Re;var y=l&&d;return function(e){if(g&&e%1)return"";var n=e<0||0===e&&1/e<0?(e=-e,"-"):s;if(p<0){var i=Ko.formatPrefix(e,f);e=i.scale(e),v=i.symbol}else e*=p;var u=(e=h(e,f)).lastIndexOf("."),b=u<0?e:e.substring(0,u),_=u<0?"":t+e.substring(u+1);!l&&d&&(b=o(b));var x=m.length+b.length+_.length+(y?0:n.length),w=x<c?new Array(x=c-x+1).join(r):"";return y&&(b=o(w+b)),n+=m,e=b+_,("<"===a?n+e+w:">"===a?w+n+e:"^"===a?w.substring(0,x>>=1)+n+e+w.substring(x):n+(y?e:w+e))+v}}}function Re(e){return e+""}function Me(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function De(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new ts(n-1)),1),n}function o(e,n){ 96return t(e=new ts(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;a<r;)s.push(new Date(+a)),t(a,1);return s}function s(e,t,n){try{ts=Me;var r=new Me;return r._=e,a(r,t,n)}finally{ts=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var u=e.utc=Ae(e);return u.floor=u,u.round=Ae(r),u.ceil=Ae(i),u.offset=Ae(o),u.range=s,e}function Ae(e){return function(t,n){try{ts=Me;var r=new Me;return r._=t,e(r,n)._}finally{ts=Date}}}function Ie(e){function t(e){function t(t){for(var n,i,o,a=[],s=-1,u=0;++s<r;)37===e.charCodeAt(s)&&(a.push(e.substring(u,s)),null!=(i=rs[n=e.charAt(++s)])&&(n=e.charAt(++s)),(o=T[n])&&(n=o(t,null==i?"e"===n?" ":"0":i)),a.push(n),u=s+1);return a.push(e.substring(u,s)),a.join("")}var r=e.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(n(r,e,t,0)!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&ts!==Me,o=new(i?Me:ts);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return e},t}function n(e,t,n,r){for(var i,o,a,s=0,u=t.length,l=n.length;s<u;){if(r>=l)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=P[a in rs?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){w.lastIndex=0;var r=w.exec(t.substring(n));return r?(e.w=C.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){_.lastIndex=0;var r=_.exec(t.substring(n));return r?(e.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){j.lastIndex=0;var r=j.exec(t.substring(n));return r?(e.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){k.lastIndex=0;var r=k.exec(t.substring(n));return r?(e.m=S.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,T.c.toString(),t,r)}function u(e,t,r){return n(e,T.x.toString(),t,r)}function l(e,t,r){return n(e,T.X.toString(),t,r)}
96function c(e,t,n){var r=b.get(t.substring(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var d=e.dateTime,f=e.date,h=e.time,p=e.periods,m=e.days,v=e.shortDays,g=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{var t=new(ts=Me);return t._=e,r(t)}finally{ts=Date}}var r=t(e);return n.parse=function(e){try{ts=Me;var t=r.parse(e);return t&&t._}finally{ts=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=nt;var b=Ko.map(),_=Fe(m),x=Le(m),w=Fe(v),C=Le(v),k=Fe(g),S=Le(g),j=Fe(y),E=Le(y);p.forEach(function(e,t){b.set(e.toLowerCase(),t)});var T={a:function(e){return v[e.getDay()]},A:function(e){return m[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return g[e.getMonth()]},c:t(d),d:function(e,t){return Oe(e.getDate(),t,2)},e:function(e,t){return Oe(e.getDate(),t,2)},H:function(e,t){return Oe(e.getHours(),t,2)},I:function(e,t){return Oe(e.getHours()%12||12,t,2)},j:function(e,t){return Oe(1+es.dayOfYear(e),t,3)},L:function(e,t){return Oe(e.getMilliseconds(),t,3)},m:function(e,t){return Oe(e.getMonth()+1,t,2)},M:function(e,t){return Oe(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Oe(e.getSeconds(),t,2)},U:function(e,t){return Oe(es.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Oe(es.mondayOfYear(e),t,2)},x:t(f),X:t(h),y:function(e,t){return Oe(e.getFullYear()%100,t,2)},Y:function(e,t){return Oe(e.getFullYear()%1e4,t,4)},Z:et,"%":function(){return"%"}},P={a:r,A:i,b:o,B:a,c:s,d:Qe,e:Qe,H:Ye,I:Ye,j:Ge,L:Ze,m:Ke,M:Xe,p:c,S:Je,U:Be,w:He,W:Ue,x:u,X:l,y:ze,Y:qe,Z:We,"%":tt};return t}function Oe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Fe(e){return new RegExp("^(?:"+e.map(Ko.requote).join("|")+")","i")}function Le(e){for(var t=new i,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function He(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Be(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n));return r?(e.U=+r[0],n+r[0].length):-1}function Ue(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n));return r?(e.W=+r[0],n+r[0].length):-1}function qe(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ze(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.y=Ve(+r[0]),n+r[0].length):-1}function We(e,t,n){return/^[+-]\d{4}$/.test(t=t.substring(n,n+5))?(e.Z=+t,n+5):-1}function Ve(e){return e+(e>68?1900:2e3)}function Ke(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Qe(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ge(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function Ye(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Xe(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Je(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ze(e,t,n){is.lastIndex=0;var r=is.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function et(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(oa(t)/60),i=oa(t)%60;return n+Oe(r,"0",2)+Oe(i,"0",2)}function tt(e,t,n){os.lastIndex=0;var r=os.exec(t.substring(n,n+1));return r?n+r[0].length:-1}function nt(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function rt(){}function it(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function ot(e,t){e&&ls.hasOwnProperty(e.type)&&ls[e.type](e,t)}function at(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function st(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)at(e[n],t,1);t.polygonEnd()}function ut(){function e(e,t){t=t*Ta/2+Ca/4;var n=(e*=Ta)-r,a=Math.cos(t),s=Math.sin(t),u=o*s,l=i*a+u*Math.cos(n),c=u*Math.sin(n);ws.add(Math.atan2(c,l)),r=e,i=a,o=s}var t,n,r,i,o;Cs.point=function(a,s){Cs.point=e,r=(t=a)*Ta,i=Math.cos(s=(n=s)*Ta/2+Ca/4),o=Math.sin(s)},Cs.lineEnd=function(){e(t,n)}}function lt(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function ct(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function dt(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function ft(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function ht(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function pt(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function mt(e){return[Math.atan2(e[1],e[0]),V(e[2])]}function vt(e,t){return oa(e[0]-t[0])<ja&&oa(e[1]-t[1])<ja}function gt(e,t){e*=Ta;var n=Math.cos(t*=Ta);
96yt(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function yt(e,t,n){hs+=(e-hs)/++ds,ps+=(t-ps)/ds,ms+=(n-ms)/ds}function bt(){function e(e,i){e*=Ta;var o=Math.cos(i*=Ta),a=o*Math.cos(e),s=o*Math.sin(e),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=n*u-r*s)*l+(l=r*a-t*u)*l+(l=t*s-n*a)*l),t*a+n*s+r*u);fs+=l,vs+=l*(t+(t=a)),gs+=l*(n+(n=s)),ys+=l*(r+(r=u)),yt(t,n,r)}var t,n,r;ks.point=function(i,o){i*=Ta;var a=Math.cos(o*=Ta);t=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),ks.point=e,yt(t,n,r)}}function _t(){ks.point=gt}function xt(){function e(e,t){e*=Ta;var n=Math.cos(t*=Ta),a=n*Math.cos(e),s=n*Math.sin(e),u=Math.sin(t),l=i*u-o*s,c=o*a-r*u,d=r*s-i*a,f=Math.sqrt(l*l+c*c+d*d),h=r*a+i*s+o*u,p=f&&-W(h)/f,m=Math.atan2(f,h);bs+=p*l,_s+=p*c,xs+=p*d,fs+=m,vs+=m*(r+(r=a)),gs+=m*(i+(i=s)),ys+=m*(o+(o=u)),yt(r,i,o)}var t,n,r,i,o;ks.point=function(a,s){t=a,n=s,ks.point=e,a*=Ta;var u=Math.cos(s*=Ta);r=u*Math.cos(a),i=u*Math.sin(a),o=Math.sin(s),yt(r,i,o)},ks.lineEnd=function(){e(t,n),ks.lineEnd=_t,ks.point=gt}}function wt(){return!0}function Ct(e,t,n,r,i){var o=[],a=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(vt(n,r)){i.lineStart();for(var s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd()}else{var u=new St(n,e,null,!0),l=new St(n,null,u,!1);u.o=l,o.push(u),a.push(l),l=new St(r,null,u=new St(r,e,null,!1),!0),u.o=l,o.push(u),a.push(l)}}}),a.sort(t),kt(o),kt(a),o.length){for(var s=0,u=n,l=a.length;s<l;++s)a[s].e=u=!u;for(var c,d,f=o[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((d=c[s])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=(c=h.p.z).length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function kt(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function St(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function jt(e,t,n,r){return function(i,o){function a(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function s(e,t){var n=i(e,t);v.point(n[0],n[1])}function u(){y.point=s,v.lineStart()}function l(){y.point=a,v.lineEnd()}function c(e,t){m.push([e,t]);var n=i(e,t);_.point(n[0],n[1])}function d(){_.lineStart(),m=[]}function f(){c(m[0][0],m[0][1]),_.lineEnd();var e,t=_.clean(),n=b.buffer(),r=n.length;if(m.pop(),p.push(m),m=null,r)if(1&t){r=(e=n[0]).length-1;var i,a=-1;for(o.lineStart();++a<r;)o.point((i=e[a])[0],i[1]);o.lineEnd()}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),h.push(n.filter(Et))}var h,p,m,v=t(o),g=i.invert(r[0],r[1]),y={point:a,lineStart:u,lineEnd:l,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=f,h=[],p=[],o.polygonStart()},polygonEnd:function(){y.point=a,y.lineStart=u,y.lineEnd=l,h=Ko.merge(h);var e=$t(g,p);h.length?Ct(h,Pt,e,n,o):e&&(o.lineStart(),n(null,null,1,o),o.lineEnd()),o.polygonEnd(),h=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=Tt(),_=t(b);return y}}function Et(e){return e.length>1}function Tt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:h,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pt(e,t){return((e=e.x)[0]<0?e[1]-Sa-ja:Sa-e[1])-((t=t.x)[0]<0?t[1]-Sa-ja:Sa-t[1])}function $t(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;ws.reset();for(var s=0,u=t.length;s<u;++s){var l=t[s],c=l.length;if(c)for(var d=l[0],f=d[0],h=d[1]/2+Ca/4,p=Math.sin(h),m=Math.cos(h),v=1;;){v===c&&(v=0);var g=(e=l[v])[0],y=e[1]/2+Ca/4,b=Math.sin(y),_=Math.cos(y),x=g-f,w=oa(x)>Ca,C=p*b;if(ws.add(Math.atan2(C*Math.sin(x),m*_+C*Math.cos(x))),o+=w?x+(x>=0?ka:-ka):x,w^f>=n^g>=n){var k=dt(lt(d),lt(e));pt(k);var S=dt(i,k);pt(S);var j=(w^x>=0?-1:1)*V(S[2]);(r>j||r===j&&(k[0]||k[1]))&&(a+=w^x>=0?1:-1)}if(!v++)break;f=g,p=b,m=_,d=e}}return(o<-ja||o<ja&&ws<0)^1&a}function Nt(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ca:-Ca,u=oa(o-n);
96oa(u-Ca)<ja?(e.point(n,r=(r+a)/2>0?Sa:-Sa),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&u>=Ca&&(oa(n-i)<ja&&(n-=i*ja),oa(o-s)<ja&&(o-=s*ja),r=Rt(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}function Rt(e,t,n,r){var i,o,a=Math.sin(e-n);return oa(a)>ja?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function Mt(e,t,n,r){var i;if(null==e)i=n*Sa,r.point(-Ca,i),r.point(0,i),r.point(Ca,i),r.point(Ca,0),r.point(Ca,-i),r.point(0,-i),r.point(-Ca,-i),r.point(-Ca,0),r.point(-Ca,i);else if(oa(e[0]-t[0])>ja){var o=e[0]<t[0]?Ca:-Ca;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function Dt(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(d,f){var h,p=[d,f],m=t(d,f),v=a?m?0:i(d,f):m?i(d+(d<0?Ca:-Ca),f):0;if(!n&&(l=u=m)&&e.lineStart(),m!==u&&(h=r(n,p),(vt(n,h)||vt(p,h))&&(p[0]+=ja,p[1]+=ja,m=t(p[0],p[1]))),m!==u)c=0,m?(e.lineStart(),h=r(p,n),e.point(h[0],h[1])):(h=r(n,p),e.point(h[0],h[1]),e.lineEnd()),n=h;else if(s&&n&&a^m){var g;v&o||!(g=r(p,n,!0))||(c=0,a?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1])))}!m||n&&vt(n,p)||e.point(p[0],p[1]),n=p,u=m,o=v},lineEnd:function(){u&&e.lineEnd(),n=null},clean:function(){return c|(l&&u)<<1}}}function r(e,t,n){var r=[1,0,0],i=dt(lt(e),lt(t)),a=ct(i,i),s=i[0],u=a-s*s;if(!u)return!n&&e;var l=o*a/u,c=-o*s/u,d=dt(r,i),f=ht(r,l);ft(f,ht(i,c));var h=d,p=ct(f,h),m=ct(h,h),v=p*p-m*(ct(f,f)-1);if(!(v<0)){var g=Math.sqrt(v),y=ht(h,(-p-g)/m);if(ft(y,f),y=mt(y),!n)return y;var b,_=e[0],x=t[0],w=e[1],C=t[1];x<_&&(b=_,_=x,x=b);var k=x-_,S=oa(k-Ca)<ja;if(!S&&C<w&&(b=w,w=C,C=b),S||k<ja?S?w+C>0^y[1]<(oa(y[0]-_)<ja?w:C):w<=y[1]&&y[1]<=C:k>Ca^(_<=y[0]&&y[0]<=x)){var j=ht(h,(-p+g)/m);return ft(j,f),[y,mt(j)]}}}function i(t,n){var r=a?e:Ca-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=oa(o)>ja;return jt(t,n,ln(e,6*Ta),a?[0,-e]:[-Ca,e-Ca])}function At(e,t,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,l=a.y,c=0,d=1,f=s.x-u,h=s.y-l;if(o=e-u,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<d&&(d=o)}else if(f>0){if(o>d)return;o>c&&(c=o)}if(o=n-u,f||!(o<0)){if(o/=f,f<0){if(o>d)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<d&&(d=o)}if(o=t-l,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<d&&(d=o)}else if(h>0){if(o>d)return;o>c&&(c=o)}if(o=r-l,h||!(o<0)){if(o/=h,h<0){if(o>d)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<d&&(d=o)}return c>0&&(i.a={x:u+c*f,y:l+c*h}),d<1&&(i.b={x:u+d*f,y:l+d*h}),i}}}}}}function It(e,t,n,r){function i(r,i){return oa(r[0]-e)<ja?i>0?0:3:oa(r[0]-n)<ja?i>0?2:1:oa(r[1]-t)<ja?i>0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function u(e){for(var t=0,n=v.length,r=e[1],i=0;i<n;++i)for(var o,a=1,s=v[i],u=s.length,l=s[0];a<u;++a)o=s[a],l[1]<=r?o[1]>r&&z(l,o,e)>0&&++t:o[1]<=r&&z(l,o,e)<0&&--t,l=o;return 0!==t}function l(o,s,u,l){var c=0,d=0;if(null==o||(c=i(o,u))!==(d=i(s,u))||a(o,s)<0^u>0){do{l.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+u+4)%4)!==d)}else l.point(s[0],s[1])}function c(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function d(e,t){c(e,t)&&s.point(e,t)}function f(){P.point=p,v&&v.push(g=[]),k=!0,C=!1,x=w=NaN}function h(){m&&(p(y,b),_&&C&&E.rejoin(),m.push(E.buffer())),P.point=d,C&&s.lineEnd()}function p(e,t){var n=c(e=Math.max(-js,Math.min(js,e)),t=Math.max(-js,Math.min(js,t)));if(v&&g.push([e,t]),k)y=e,b=t,_=n,k=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&C)s.point(e,t);else{var r={a:{x:x,y:w},b:{x:e,y:t}};T(r)?(C||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),S=!1):n&&(s.lineStart(),s.point(e,t),S=!1)}x=e,w=t,C=n}var m,v,g,y,b,_,x,w,C,k,S,j=s,E=Tt(),T=At(e,t,n,r),P={point:d,lineStart:f,lineEnd:h,polygonStart:function(){s=E,m=[],v=[],S=!0},polygonEnd:function(){s=j,m=Ko.merge(m);var t=u([e,r]),n=S&&t,i=m.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),l(null,null,1,s),s.lineEnd()),i&&Ct(m,o,t,l,s),s.polygonEnd()),m=v=g=null}};return P}}function Ot(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Ft(e){var t=0,n=Ca/3,r=en(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Ca/180,n=e[1]*Ca/180):[t/Ca*180,n/Ca*180]},i}function Lt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,V((o-(e*e+n*n)*i*i)/(2*i))]},n}function Ht(){function e(e,t){Ts+=i*e-r*t,r=e,i=t}var t,n,r,i;Ds.point=function(o,a){Ds.point=e,t=r=o,n=i=a},Ds.lineEnd=function(){e(t,n)}}function Bt(e,t){e<Ps&&(Ps=e),e>Ns&&(Ns=e),t<$s&&($s=t),t>Rs&&(Rs=t)}function Ut(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=qt(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=qt(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function qt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function zt(e,t){hs+=e,ps+=t,++ms}function Wt(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);vs+=a*(t+e)/2,gs+=a*(n+r)/2,ys+=a,zt(t=e,n=r)}var t,n;Is.point=function(r,i){Is.point=e,zt(t=r,n=i)}}function Vt(){Is.point=zt}function Kt(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);vs+=a*(r+e)/2,gs+=a*(i+t)/2,ys+=a,bs+=(a=i*e-r*t)*(r+e),_s+=a*(i+t),xs+=3*a,zt(r=e,i=t)}var t,n,r,i;Is.point=function(o,a){Is.point=e,zt(t=r=o,n=i=a)},Is.lineEnd=function(){e(t,n)}}function Qt(e){function t(t,n){e.moveTo(t,n),e.arc(t,n,a,0,ka)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o}
96,polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:h};return s}function Gt(e){function t(e){return(s?r:n)(e)}function n(t){return Jt(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){y=NaN,C.point=o,t.lineStart()}function o(n,r){var o=lt([n,r]),a=e(n,r);i(y,b,g,_,x,w,y=a[0],b=a[1],g=n,_=o[0],x=o[1],w=o[2],s,t),t.point(y,b)}function a(){C.point=n,t.lineEnd()}function u(){r(),C.point=l,C.lineEnd=c}function l(e,t){o(d=e,t),f=y,h=b,p=_,m=x,v=w,C.point=o}function c(){i(y,b,g,_,x,w,f,h,d,p,m,v,s,t),C.lineEnd=a,a()}var d,f,h,p,m,v,g,y,b,_,x,w,C={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),C.lineStart=u},polygonEnd:function(){t.polygonEnd(),C.lineStart=r}};return C}function i(t,n,r,s,u,l,c,d,f,h,p,m,v,g){var y=c-t,b=d-n,_=y*y+b*b;if(_>4*o&&v--){var x=s+h,w=u+p,C=l+m,k=Math.sqrt(x*x+w*w+C*C),S=Math.asin(C/=k),j=oa(oa(C)-1)<ja||oa(r-f)<ja?(r+f)/2:Math.atan2(w,x),E=e(j,S),T=E[0],P=E[1],$=T-t,N=P-n,R=b*$-y*N;(R*R/_>o||oa((y*$+b*N)/_-.5)>.3||s*h+u*p+l*m<a)&&(i(t,n,r,s,u,l,T,P,j,x/=k,w/=k,C,v,g),g.point(T,P),i(T,P,j,x,w,C,c,d,f,h,p,m,v,g))}}var o=.5,a=Math.cos(30*Ta),s=16;return t.precision=function(e){return arguments.length?(s=(o=e*e)>0&&16,t):Math.sqrt(o)},t}function Yt(e){var t=Gt(function(t,n){return e([t*Pa,n*Pa])});return function(e){return tn(t(e))}}function Xt(e){this.stream=e}function Jt(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Zt(e){return en(function(){return e})()}function en(e){function t(e){return[(e=s(e[0]*Ta,e[1]*Ta))[0]*f+u,l-e[1]*f]}function n(e){return(e=s.invert((e[0]-u)/f,(l-e[1])/f))&&[e[0]*Pa,e[1]*Pa]}function r(){s=Ot(a=on(g,y,b),o);var e=o(m,v);return u=h-e[0]*f,l=p+e[1]*f,i()}function i(){return c&&(c.valid=!1,c=null),t}var o,a,s,u,l,c,d=Gt(function(e,t){return[(e=o(e,t))[0]*f+u,l-e[1]*f]}),f=150,h=480,p=250,m=0,v=0,g=0,y=0,b=0,_=Ss,x=we,w=null,C=null;return t.stream=function(e){return c&&(c.valid=!1),(c=tn(_(a,d(x(e))))).valid=!0,c},t.clipAngle=function(e){return arguments.length?(_=null==e?(w=e,Ss):Dt((w=+e)*Ta),i()):w},t.clipExtent=function(e){return arguments.length?(C=e,x=e?It(e[0][0],e[0][1],e[1][0],e[1][1]):we,i()):C},t.scale=function(e){return arguments.length?(f=+e,r()):f},t.translate=function(e){return arguments.length?(h=+e[0],p=+e[1],r()):[h,p]},t.center=function(e){return arguments.length?(m=e[0]%360*Ta,v=e[1]%360*Ta,r()):[m*Pa,v*Pa]},t.rotate=function(e){return arguments.length?(g=e[0]%360*Ta,y=e[1]%360*Ta,b=e.length>2?e[2]%360*Ta:0,r()):[g*Pa,y*Pa,b*Pa]},Ko.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function tn(e){return Jt(e,function(t,n){e.point(t*Ta,n*Ta)})}function nn(e,t){return[e,t]}function rn(e,t){return[e>Ca?e-ka:e<-Ca?e+ka:e,t]}function on(e,t,n){return e?t||n?Ot(sn(e),un(t,n)):sn(e):t||n?un(t,n):rn}function an(e){return function(t,n){return[(t+=e)>Ca?t-ka:t<-Ca?t+ka:t,n]}}function sn(e){var t=an(e);return t.invert=an(-e),t}function un(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,u=Math.sin(e)*n,l=Math.sin(t),c=l*r+s*i;return[Math.atan2(u*o-c*a,s*r-l*i),V(c*o+u*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,u=Math.sin(e)*n,l=Math.sin(t),c=l*o-u*a;return[Math.atan2(u*o+l*a,s*r+c*i),V(c*r-s*i)]},n}function ln(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var u=a*t;null!=i?(i=cn(n,i),o=cn(n,o),(a>0?i<o:i>o)&&(i+=a*ka)):(i=e+a*ka,o=e-.5*u);for(var l,c=i;a>0?c>o:c<o;c-=u)s.point((l=mt([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function cn(e,t){var n=lt(t);n[0]-=e,pt(n);var r=W(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-ja)%(2*Math.PI)}function dn(e,t,n){var r=Ko.range(e,t-ja,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function fn(e,t,n){var r=Ko.range(e,t-ja,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function hn(e){return e.source}function pn(e){return e.target}function mn(e,t,n,r){var i=Math.cos(t),o=Math.sin(t),a=Math.cos(r),s=Math.sin(r),u=i*Math.cos(e),l=i*Math.sin(e),c=a
96*Math.cos(n),d=a*Math.sin(n),f=2*Math.asin(Math.sqrt(Y(r-t)+i*a*Y(n-e))),h=1/Math.sin(f),p=f?function(e){var t=Math.sin(e*=f)*h,n=Math.sin(f-e)*h,r=n*u+t*c,i=n*l+t*d,a=n*o+t*s;return[Math.atan2(i,r)*Pa,Math.atan2(a,Math.sqrt(r*r+i*i))*Pa]}:function(){return[e*Pa,t*Pa]};return p.distance=f,p}function vn(){function e(e,i){var o=Math.sin(i*=Ta),a=Math.cos(i),s=oa((e*=Ta)-t),u=Math.cos(s);Ms+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=r*o-n*a*u)*s),n*o+r*a*u),t=e,n=o,r=a}var t,n,r;Os.point=function(i,o){t=i*Ta,n=Math.sin(o*=Ta),r=Math.cos(o),Os.point=e},Os.lineEnd=function(){Os.point=Os.lineEnd=h}}function gn(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}function yn(e,t){function n(e,t){var n=oa(oa(t)-Sa)<ja?0:a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(Ca/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=q(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Sa]},n):_n}function bn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return oa(i)<ja?nn:(n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,o-q(i)*Math.sqrt(e*e+n*n)]},n)}function _n(e,t){return[e,Math.log(Math.tan(Ca/4+t/2))]}function xn(e){var t,n=Zt(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Ca*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}function wn(e,t){return[Math.log(Math.tan(Ca/4+t/2)),-e]}function Cn(e){return e[0]}function kn(e){return e[1]}function Sn(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&z(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function jn(e,t){return e[0]-t[0]||e[1]-t[1]}function En(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Tn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,u=e[1],l=n[1],c=t[1]-u,d=r[1]-l,f=(s*(u-l)-d*(i-o))/(d*a-s*c);return[i+f*a,u+f*c]}function Pn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function $n(){Xn(this),this.edge=this.site=this.circle=null}function Nn(e){var t=Gs.pop()||new $n;return t.site=e,t}function Rn(e){Un(e),Vs.remove(e),Gs.push(e),Xn(e)}function Mn(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Rn(e);for(var u=o;u.circle&&oa(n-u.circle.x)<ja&&oa(r-u.circle.cy)<ja;)o=u.P,s.unshift(u),Rn(u),u=o;s.unshift(u),Un(u);for(var l=a;l.circle&&oa(n-l.circle.x)<ja&&oa(r-l.circle.cy)<ja;)a=l.N,s.push(l),Rn(l),l=a;s.push(l),Un(l);var c,d=s.length;for(c=1;c<d;++c)l=s[c],u=s[c-1],Qn(l.edge,u.site,l.site,i);u=s[0],(l=s[d-1]).edge=Vn(u.site,l.site,null,i),Bn(u),Bn(l)}function Dn(e){for(var t,n,r,i,o=e.x,a=e.y,s=Vs._;s;)if((r=An(s,a)-o)>ja)s=s.L;else{if(!((i=o-In(s,a))>ja)){r>-ja?(t=s.P,n=s):i>-ja?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var u=Nn(e);if(Vs.insert(t,u),t||n){if(t===n)return Un(t),n=Nn(t.site),Vs.insert(u,n),u.edge=n.edge=Vn(t.site,u.site),Bn(t),void Bn(n);if(n){Un(t),Un(n);var l=t.site,c=l.x,d=l.y,f=e.x-c,h=e.y-d,p=n.site,m=p.x-c,v=p.y-d,g=2*(f*v-h*m),y=f*f+h*h,b=m*m+v*v,_={x:(v*y-h*b)/g+c,y:(f*b-m*y)/g+d};Qn(n.edge,l,p,_),u.edge=Vn(l,e,null,_),n.edge=Vn(e,p,null,_),Bn(t),Bn(n)}else u.edge=Vn(t.site,u.site)}}function An(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-Infinity;var s=(n=a.site).x,u=n.y,l=u-t;if(!l)return s;var c=s-r,d=1/o-1/l,f=c/l;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*l)-u+l/2+i-o/2)))/d+r:(r+s)/2}function In(e,t){var n=e.N;if(n)return An(n,t);var r=e.site;return r.y===t?r.x:Infinity}function On(e){this.site=e,this.edges=[]}function Fn(e){for(var t,n,r,i,o,a,s,u,l,c,d=e[0][0],f=e[1][0],h=e[0][1],p=e[1][1],m=Ws,v=m.length;v--;)if((o=m[v])&&o.prepare())for(u=(s=o.edges).length,a=0;a<u;)r=(c=s[a].end()).x,i=c.y,t=(l=s[++a%u].start()).x,n=l.y,(oa(r-t)>ja||oa(i-n)>ja)&&(s.splice(a,0,new Gn(Kn(o.site,c,oa(r-d)<ja&&p-i>ja?{x:d,y:oa(t-d)<ja?n:p}:oa(i-p)<ja&&f-r>
96ja?{x:oa(n-p)<ja?t:f,y:p}:oa(r-f)<ja&&i-h>ja?{x:f,y:oa(t-f)<ja?n:h}:oa(i-h)<ja&&r-d>ja?{x:oa(n-h)<ja?t:d,y:h}:null),o.site,null)),++u)}function Ln(e,t){return t.angle-e.angle}function Hn(){Xn(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bn(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,l=r.y-s,c=o.x-a,d=2*(u*(v=o.y-s)-l*c);if(!(d>=-Ea)){var f=u*u+l*l,h=c*c+v*v,p=(v*f-l*h)/d,m=(u*h-c*f)/d,v=m+s,g=Ys.pop()||new Hn;g.arc=e,g.site=i,g.x=p+a,g.y=v+Math.sqrt(p*p+m*m),g.cy=v,e.circle=g;for(var y=null,b=Qs._;b;)if(g.y<b.y||g.y===b.y&&g.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}Qs.insert(y,g),y||(Ks=g)}}}}function Un(e){var t=e.circle;t&&(t.P||(Ks=t.N),Qs.remove(t),Ys.push(t),Xn(t),e.circle=null)}function qn(e){for(var t,n=zs,r=At(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!zn(t=n[i],e)||!r(t)||oa(t.a.x-t.b.x)<ja&&oa(t.a.y-t.b.y)<ja)&&(t.a=t.b=null,n.splice(i,1))}function zn(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],u=t[0][1],l=t[1][1],c=e.l,d=e.r,f=c.x,h=c.y,p=d.x,m=d.y,v=(f+p)/2,g=(h+m)/2;if(m===h){if(v<a||v>=s)return;if(f>p){if(o){if(o.y>=l)return}else o={x:v,y:u};n={x:v,y:l}}else{if(o){if(o.y<u)return}else o={x:v,y:l};n={x:v,y:u}}}else if(i=g-(r=(f-p)/(m-h))*v,r<-1||r>1)if(f>p){if(o){if(o.y>=l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else if(h<m){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return e.a=o,e.b=n,!0}function Wn(e,t){this.l=e,this.r=t,this.a=this.b=null}function Vn(e,t,n,r){var i=new Wn(e,t);return zs.push(i),n&&Qn(i,e,t,n),r&&Qn(i,t,e,r),Ws[e.i].edges.push(new Gn(i,e,t)),Ws[t.i].edges.push(new Gn(i,t,e)),i}function Kn(e,t,n){var r=new Wn(e,null);return r.a=t,r.b=n,zs.push(r),r}function Qn(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function Gn(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Yn(){this._=null}function Xn(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Jn(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Zn(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function er(e){for(;e.L;)e=e.L;return e}function tr(e,t){var n,r,i,o=e.sort(nr).pop();for(zs=[],Ws=new Array(e.length),Vs=new Yn,Qs=new Yn;;)if(i=Ks,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(Ws[o.i]=new On(o),Dn(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Mn(i.arc)}t&&(qn(t),Fn(t));var a={cells:Ws,edges:zs};return Vs=Qs=zs=Ws=null,a}function nr(e,t){return t.y-e.y||t.x-e.x}function rr(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ir(e){return e.x}function or(e){return e.y}function ar(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function sr(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),u=t.nodes;u[0]&&sr(e,u[0],n,r,a,s),u[1]&&sr(e,u[1],a,r,i,s),u[2]&&sr(e,u[2],n,s,a,o),u[3]&&sr(e,u[3],a,s,i,o)}}function ur(e,t){e=Ko.rgb(e),t=Ko.rgb(t);var n=e.r,r=e.g,i=e.b,o=t.r-n,a=t.g-r,s=t.b-i;return function(e){return"#"+me(Math.round(n+o*e))+me(Math.round(r+a*e))+me(Math.round(i+s*e))}}function lr(e,t){var n,r={},i={};for(n in e)n in t?r[n]=fr(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function cr(e,t){return t-=e=+e,function(n){return e+t*n}}function dr(e,t){var n,r,i,o,a,s=0,u=[],l=[];for(e+="",t+="",Js.lastIndex=0,r=0;n=Js.exec(t);++r)n.index&&u.push(t.substring(s,n.index)),l.push({i:u.length,x:n[0]}),u.push(null),s=Js.lastIndex;for(s<t.length&&u.push(t.substring(s)),r=0,o=l.length;(n=Js.exec(e))&&r<o;++r)if((a=l[r]).x==n[0]){if(a.i)if(null==u[a.i+1])for(u[a.i-1]+=a.x,u.splice(a.i,1),i=r+1;i<o;++i)l[i].i--;else for(u[a.i-1]+=a.x+u[a.i+1],u.splice(a.i,2),i=r+1;i<o;++i)l[i].i-=2;else if(null==u[a.i+1])u[a.i]=a.x;else for(u[a.i]=a.x+u[a.i+1],u.splice(a.i+1,1),i=r+1;i<o;++i)l[i].i--;l.splice(r,1),o--,r--}else a.x=cr(parseFloat(n[0]),parseFloat(a.x));for(;r<o;)a=l.pop(),null==u[a.i+1]?u[a.i]=a.x:(u[a.i]=a.x+u[a.i+1],u.splice(a.i+1,1)),o--;return 1===u.length?null==u[0]?(a=l[0].x,function(e){return a(e)+""}):function(){return t}:function(e){for(r=0;r<o;++r)u[(a=l[r]).i]=a.x(e);return u.join("")}}function fr(e,t){for(var n,r=Ko.interpolators.length;--r>=0&&!(n=Ko.interpolators[r](e,t)););return n}function hr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(fr(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}function pr(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function mr(e){return function(t){return 1-e(1-t)}}function vr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function gr(e){return e*e}function yr(e){return e*e*e}function br(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function _r(e){return function(t){return Math.pow(t,e)}}function xr(e){return 1-Math.cos(e*Sa)}function wr(e){return Math.pow(2,10*(e-1))}function Cr(e){return 1-Math.sqrt(1-e*e)}function kr(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/ka*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*ka/t)}}function Sr(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function jr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Er(e,t){e=Ko.hcl(e),t=Ko.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return re(n+o*e,r+a*e,i+s*e)+""}}function Tr(e,t){e=Ko.hsl(e),t=Ko.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ee(n+o*e,r+a*e,i+s*e)+""}}function Pr(e,t){e=Ko.lab(e),t=Ko.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return ae(n+o*e,r+a*e,i+s*e)+""}}function $r(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Nr(e){var t=[e.a,e.b],n=[e.c,e.d],r=Mr(t),i=Rr(t,n),o=Mr(Dr(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Pa, 97this.translate=[e.e,e.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Pa:0}function Rr(e,t){return e[0]*t[0]+e[1]*t[1]}function Mr(e){var t=Math.sqrt(Rr(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Dr(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Ar(e,t){var n,r=[],i=[],o=Ko.transform(e),a=Ko.transform(t),s=o.translate,u=a.translate,l=o.rotate,c=a.rotate,d=o.skew,f=a.skew,h=o.scale,p=a.scale;return s[0]!=u[0]||s[1]!=u[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:cr(s[0],u[0])},{i:3,x:cr(s[1],u[1])})):u[0]||u[1]?r.push("translate("+u+")"):r.push(""),l!=c?(l-c>180?c+=360:c-l>180&&(l+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:cr(l,c)})):c&&r.push(r.pop()+"rotate("+c+")"),d!=f?i.push({i:r.push(r.pop()+"skewX(",
97null,")")-2,x:cr(d,f)}):f&&r.push(r.pop()+"skewX("+f+")"),h[0]!=p[0]||h[1]!=p[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:cr(h[0],p[0])},{i:n-2,x:cr(h[1],p[1])})):1==p[0]&&1==p[1]||r.push(r.pop()+"scale("+p+")"),n=i.length,function(e){for(var t,o=-1;++o<n;)r[(t=i[o]).i]=t.x(e);return r.join("")}}function Ir(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function Or(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Fr(e){for(var t=e.source,n=e.target,r=Hr(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function Lr(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Hr(e,t){if(e===t)return e;for(var n=Lr(e),r=Lr(t),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}function Br(e){e.fixed|=2}function Ur(e){e.fixed&=-7}function qr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function zr(e){e.fixed&=-5}function Wr(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,u=-1;++u<s;)null!=(o=a[u])&&(Wr(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var l=t*n[e.point.index];e.charge+=e.pointCharge=l,r+=l*e.point.x,i+=l*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Vr(e,t){return Ko.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Yr,e}function Kr(e){return e.children}function Qr(e){return e.value}function Gr(e,t){return t.value-e.value}function Yr(e){return Ko.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function Xr(e){return e.x}function Jr(e){return e.y}function Zr(e,t,n){e.y0=t,e.y=n}function ei(e){return Ko.range(e.length)}function ti(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function ni(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function ri(e){return e.reduce(ii,0)}function ii(e,t){return e+t[1]}function oi(e,t){return ai(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ai(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function si(e){return[Ko.min(e),Ko.max(e)]}function ui(e,t){return e.parent==t.parent?1:2}function li(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function ci(e){var t,n=e.children;return n&&(t=n.length)?n[t-1]:e._tree.thread}function di(e,t){var n=e.children;if(n&&(i=n.length))for(var r,i,o=-1;++o<i;)t(r=di(n[o],t),e)>0&&(e=r);return e}function fi(e,t){return e.x-t.x}function hi(e,t){return t.x-e.x}function pi(e,t){return e.depth-t.depth}function mi(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length))for(var o,a,s=null,u=-1;++u<a;)n(o=i[u],s),s=o;t(e,r)}n(e,null)}function vi(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]._tree).prelim+=n,t.mod+=n,n+=t.shift+(r+=t.change)}function gi(e,t,n){e=e._tree;var r=n/((t=t._tree).number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function yi(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function bi(e,t){return e.value-t.value}function _i(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function xi(e,t){e._pack_next=t,t._pack_prev=e}function wi(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Ci(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),f=Math.min(e.y-e.r,f),h=Math.max(e.y+e.r,h)}if((n=e.children)&&(l=n.length)){var n,r,i,o,a,s,u,l,c=Infinity,d=-Infinity,f=Infinity,h=-Infinity;if(n.forEach(ki),(r=n[0]).x=-r.r,r.y=0,t(r),l>1&&((i=n[1]).x=i.r,i.y=0,t(i),l>2))for(Ei(r,i,o=n[2]),t(o),_i(r,o),r._pack_prev=o,_i(o,i),i=r._pack_next,a=3;a<l;a++){Ei(r,i,o=n[a]);var p=0,m=1,v=1;for(s=i._pack_next;s!==i;s=s._pack_next,m++)if(wi(s,o)){p=1;break}if(1==p)for(u=r._pack_prev;u!==s._pack_prev&&!wi(u,o);u=u._pack_prev,v++);p?(m<v||m==v&&i.r<r.r?xi(r,i=s):xi(r=u,i),a--):(_i(r,o),i=o,t(o))}var g=(c+d)/2,y=(f+h)/2,b=0;for(a=0;a<l;a++)(o=n[a]).x-=g,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));e.r=b,n.forEach(Si)}}function ki(e){e._pack_next=e._pack_prev=e}function Si(e){delete e._pack_next,delete e._pack_prev}function ji(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)ji(i[o],t,n,r)}function Ei(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),l=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+u*i+l*o,n.y=e.y+u*o-l*i}else n.x=e.x+r,n.y=e.y}function Ti(e){return 1+Ko.max(e,function(e){return e.y})}function Pi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function $i(e){var t=e.children;return t&&t.length?$i(t[0]):e}function Ni(e){var t,n=e.children;return n&&(t=n.length)?Ni(n[t-1]):e}function Ri(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Mi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Di(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Ai(e){return e.rangeExtent?e.rangeExtent():Di(e.range())}function Ii(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Oi(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Fi(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:lu}function Li(e,t,n,r){var i=[],o=[],a=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<=s;)i.push(n(e[a-1],e[a])),o.push(r(t[a-1],t[a]));return function(t){var n=Ko.bisect(e,t,1,s)-1;return o[n](i[n](t))}}function Hi(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Li:Ii,u=r?Or:Ir;return a=i(e,t,u,n),s=i(t,e,u,fr),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate($r)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return zi(e,t)},o.tickFormat=function(t,n){return Wi(e,t,n)},o.nice=function(t){return Ui(e,t),i()},o.copy=function(){return Hi(e,t,n,r)},i()}function Bi(e,t){return Ko.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Ui(e,t){return Oi(e,Fi(qi(e,t)[2]))}function qi(e,t){null==t&&(t=10);var n=Di(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function zi(e,t){return Ko.range.apply(Ko,qi(e,t))}function Wi(e,t,n){var r=qi(e,t);return Ko.format(n?n.replace(Ja,function(e,t,n,i,o,a,s,u,l,c){return[t,n,i,o,a,s,u,l||"."+Ki(c,r),c].join("")}):",."+Vi(r[2])+"f")}function Vi(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Ki(e,t){var n=Vi(t[2]);return e in cu?Math.abs(n-Vi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==e):n-2*("%"===e)}function Qi(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Oi(r.map(i),n?Math:fu);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Di(r),a=[],s=e[0],u=e[1],l=Math.floor(i(s)),c=Math.ceil(i(u)),d=t%1?2:t;if(isFinite(c-l)){if(n){for(;l<c;l++)for(var f=1;f<d;f++)a.push(o(l)*f);a.push(o(l))}else for(a.push(o(l));l++<c;)for(f=d-1;f>0;f--)a.push(o(l)*f);for(l=0;a[l]<s;l++);for(c=a.length;a[c-1]>u;c--);a=a.slice(l,c)}return a},a.tickFormat=function(e,t){if(!arguments.length)return du;arguments.length<2?t=du:"function"!=typeof t&&(t=Ko.format(t));var r,s=Math.max(.1,e/a.ticks().length),u=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(e){return e/o(u(i(e)+r))<=s?t(e):""}},a.copy=function(){return Qi(e.copy(),t,n,r)},Bi(a,e)}function Gi(e,t,n){function r(t){return e(i(t))}var i=Yi(t),o=Yi(1/t);return r.invert=function(t){return o(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),r):n},r.ticks=function(e){return zi(n,e)},r.tickFormat=function(e,t){return Wi(n,e,t)},r.nice=function(e){return r.domain(Ui(n,e))},r.exponent=function(a){return arguments.length?(i=Yi(t=a),o=Yi(1/t),e.domain(n.map(i)),r):t},r.copy=function(){return Gi(e.copy(),t,n)},Bi(r,e)}function Yi(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Xi(e,t){function n(n){return a[((o.get(n)||"range"===t.t&&o.set(n,e.push(n)))-1)%a.length]}function r(t,n){return Ko.range(e.length).map(function(e){return t+n*e})}var o,a,s;return n.domain=function(r){if(!arguments.length)return e;e=[],o=new i;for(var a,s=-1,u=r.length;++s<u;)o.has(a=r[s])||o.set(a,e.push(a));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(a=e,s=0,t={t:"range",a:arguments},n):a},n.rangePoints=function(i,o){arguments.length<2&&(o=0);var u=i[0],l=i[1],c=(l-u)/(Math.max(1,e.length-1)+o);return a=r(e.length<2?(u+l)/2:u+c*o/2,c),s=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(i,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=
97o);var l=i[1]<i[0],c=i[l-0],d=(i[1-l]-c)/(e.length-o+2*u);return a=r(c+d*u,d),l&&a.reverse(),s=d*(1-o),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,o,u){arguments.length<2&&(o=0),arguments.length<3&&(u=o);var l=i[1]<i[0],c=i[l-0],d=i[1-l],f=Math.floor((d-c)/(e.length-o+2*u)),h=d-c-(e.length-o)*f;return a=r(c+Math.round(h/2),f),l&&a.reverse(),s=Math.round(f*(1-o)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return s},n.rangeExtent=function(){return Di(t.a[0])},n.copy=function(){return Xi(e,t)},n.domain(e)}function Ji(e,t){function n(){var n=0,o=t.length;for(i=[];++n<o;)i[n-1]=Ko.quantile(e,n/o);return r}function r(e){if(!isNaN(e=+e))return t[Ko.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(Ko.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.invertExtent=function(n){return(n=t.indexOf(n))<0?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},r.copy=function(){return Ji(e,t)},n()}function Zi(e,t,n){function r(t){return n[Math.max(0,Math.min(a,Math.floor(o*(t-e))))]}function i(){return o=n.length/(t-e),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/o+e,t+1/o]},r.copy=function(){return Zi(e,t,n)},i()}
97function eo(e,t){function n(n){if(n<=n)return t[Ko.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return eo(e,t)},n}function to(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return zi(e,t)},t.tickFormat=function(t,n){return Wi(e,t,n)},t.copy=function(){return to(e)},t}function no(e){return e.innerRadius}function ro(e){return e.outerRadius}function io(e){return e.startAngle}function oo(e){return e.endAngle}function ao(e){function t(t){function a(){l.push("M",o(e(c),s))}for(var u,l=[],c=[],d=-1,f=t.length,h=xe(n),p=xe(r);++d<f;)i.call(this,u=t[d],d)?c.push([+h.call(this,u,d),+p.call(this,u,d)]):c.length&&(a(),c=[]);return c.length&&a(),l.length?l.join(""):null}var n=Cn,r=kn,i=wt,o=so,a=o.key,s=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(a="function"==typeof e?o=e:(o=bu.get(e)||so).key,t):a},t.tension=function(e){return arguments.length?(s=e,t):s},t}function so(e){return e.join("L")}function uo(e){return so(e)+"Z"}function lo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")}function co(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function fo(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function ho(e,t){return e.length<4?so(e):e[1]+vo(e.slice(1,e.length-1),go(e,t))}function po(e,t){return e.length<3?so(e):e[0]+vo((e.push(e[0]),e),go([e[e.length-2]].concat(e,[e[1]]),t))}function mo(e,t){return e.length<3?so(e):e[0]+vo(e,go(e,t))}function vo(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return so(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],u=2),t.length>1){s=t[1],o=e[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var l=2;l<t.length;l++,u++)o=e[u],s=t[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function go(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,u=e.length;++s<u;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function yo(e){if(e.length<3)return so(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",wo(wu,a),",",wo(wu,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Co(u,a,s);return e.pop(),u.push("L",r),u.join("")}function bo(e){if(e.length<4)return so(e);for(var t,n=[],r=-1,i=e.length,o=[0],a=[0];++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);for(n.push(wo(wu,o)+","+wo(wu,a)),--r;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Co(n,o,a);return n.join("")}function _o(e){for(var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);for(t=[wo(wu,a),",",wo(wu,s)],--r;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Co(t,a,s);return t.join("")}function xo(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,u=e[n][1]-a,l=-1;++l<=n;)i=l/n,(r=e[l])[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*u);return yo(e)}function wo(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Co(e,t,n){e.push("C",wo(_u,t),",",wo(_u,n),",",wo(xu,t),",",wo(xu,n),",",wo(wu,t),",",wo(wu,n))}function ko(e,t){return(t[1]-e[1])/(t[0]-e[0])}function So(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=ko(i,o);++t<n;)r[t]=(a+(a=ko(i=o,o=e[t+1])))/2;return r[t]=a,r}function jo(e){for(var t,n,r,i,o=[],a=So(e),s=-1,u=e.length-1;++s<u;)t=ko(e[s],e[s+1]),oa(t)<ja?a[s]=a[s+1]=0:(i=(n=a[s]/t)*n+(r=a[s+1]/t)*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);for(s=-1;++s<=u;)i=(e[Math.min(u,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Eo(e){return e.length<3?so(e):e[0]+vo(e,jo(e))}function To(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]+gu,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Po(e){function t(t){function u(){m.push("M",s(e(g),d),c,l(e(v.reverse()),d),"Z")}for(var f,h,p,m=[],v=[],g=[],y=-1,b=t.length,_=xe(n),x=xe(i),w=n===r?function(){return h}:xe(r),C=i===o?function(){return p}:xe(o);++y<b;)a.call(this,f=t[y],y)?(v.push([h=+_.call(this,f,y),p=+x.call(this,f,y)]),g.pu
97sh([+w.call(this,f,y),+C.call(this,f,y)])):v.length&&(u(),v=[],g=[]);return v.length&&u(),m.length?m.join(""):null}var n=Cn,r=Cn,i=0,o=kn,a=wt,s=so,u=s.key,l=s,c="L",d=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=o=e,t):o},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(o=e,t):o},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(u="function"==typeof e?s=e:(s=bu.get(e)||so).key,l=s.reverse||s,c=s.closed?"M":"L",t):u},t.tension=function(e){return arguments.length?(d=e,t):d},t}function $o(e){return e.radius}function No(e){return[e.x,e.y]}function Ro(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+gu;return[n*Math.cos(r),n*Math.sin(r)]}}function Mo(){return 64}function Do(){return"circle"}function Ao(e){var t=Math.sqrt(e/Ca);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(e,t){return ca(e,Tu),e.id=t,e}function Oo(e,t,n,r){var i=e.id;return D(e,"function"==typeof n?function(e,o,a){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,o,a)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Fo(e){return null==e&&(e=""),function(){this.textContent=e}}function Lo(e,t,n,r){var o=e.__transition__||(e.__transition__={active:0,count:0}),a=o[n];if(!a){var s=r.time;a=o[n]={tween:new i,time:s,ease:r.ease,delay:r.delay,duration:r.duration},++o.count,Ko.timer(function(r){function i(r){if(o.active>n)return l();o.active=n,a.event&&a.event.start.call(e,c,t),a.tween.forEach(function(n,r){(r=r.call(e,c,t))&&m.push(r)}),Ko.timer(function(){return p.c=u(r||1)?wt:u,1},0,s)}function u(r){if(o.active!==n)return l();for(var i=r/h,s=d(i),u=m.length;u>0;)m[--u].call(e,s);return i>=1?(a.event&&a.event.end.call(e,c,t),l()):void 0}function l(){return--o.count?delete o[n]:delete e.__transition__,1}var c=e.__data__,d=a.ease,f=a.delay,h=a.duration,p=Ga,m=[];if(p.t=f+s,f<=r)return i(r-f);p.c=i},0,s)}}function Ho(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function Bo(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Uo(e){return e.toISOString()}function qo(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=Ko.bisect(Ou,r);return i==Ou.length?[t.year,qi(e.map(function(e){return e/31536e6}),n)[2]]:i?t[r/Ou[i-1]<Ou[i]/r?i-1:i]:[Hu,qi(e,n)[2]]}return r.invert=function(t){return zo(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(zo)},r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,zo(+n+1),t).length}var o=r.domain(),a=Di(o),s=null==e?i(a,10):"number"==typeof e&&i(a,e);return s&&(e=s[0],t=s[1]),r.domain(Oi(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=zo(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=zo(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Di(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],zo(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return qo(e.copy(),t,n)},Bi(r,e)}function zo(e){return new Date(e)}function Wo(e){return JSON.parse(e.responseText)}function Vo(e){var t=Yo.createRange();return t.selectNode(Yo.body),t.createContextualFragment(e.responseText)}var Ko={version:"3.4.1"};Date.now||(Date.now=function(){return+new Date});var Qo=[].slice,Go=function(e){return Qo.call(e)},Yo=document,Xo=Yo.documentElement,Jo=window;try{Go(Xo.childNodes)[0].nodeType}catch(qu){Go=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{Yo.createElement("div").style.setProperty("opacity",0,"")}catch(zu){var Zo=Jo.Element.prototype,ea=Zo.setAttribute,ta=Zo.setAttributeNS,na=Jo.CSSStyleDeclaration.prototype,ra=na.setProperty;Zo.setAttribute=function(e,t){ea.call(this,e,t+"")},Zo.setAttributeNS=function(e,t,n){ta.call(this,e,t,n+"")},na.setProperty=function(e,t,n){ra.call(this,e,t+"",n)}}Ko.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},Ko.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},Ko.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o&&!(null!=(n=e[i])&&n<=n);)n=undefined;for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o&&!(null!=(n=t.call(e,e[i],i))&&n<=n);)n=undefined;for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},Ko.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o&&!(null!=(n=e[i])&&n<=n);)n=undefined;for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o&&!(null!=(n=t.call(e,e[i],i))&&n<=n);)n=undefined;for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},Ko.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a&&!(null!=(n=i=e[o])&&n<=n);)n=i=undefined;for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a&&!(null!=(n=i=t.call(e,e[o],o))&&n<=n);)n=undefined;for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},Ko.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)isNaN(n=+e[o])||(r+=n);else for(;++o<i;)isNaN(n=+t.call(e,e[o],o))||(r+=n);return r},Ko.mean=function(t,n){var r,i=t.length,o=0,a=-1,s=0;if(1===arguments.length)for(;++a<i;)e(r=t[a])&&(o+=(r-o)/++s);else for(;++a<i;)e(r=n.call(t,t[a],a))&&(o+=(r-o)/++s);return s?o:undefined},Ko.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},Ko.median=function(t,n){return arguments.length>1&&(t=t.map(n)),(t=t.filter(e)).length?Ko.quantile(t.sort(Ko.ascending),.5):undefined},Ko.bisector=function(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e.call(t,t[o],o)<n?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;n<e.call(t,t[o],o)?i=o:r=o+1}return r}}};var ia=Ko.bisector(function(e){return e});
97Ko.bisectLeft=ia.left,Ko.bisect=Ko.bisectRight=ia.right,Ko.shuffle=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e},Ko.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},Ko.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},Ko.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,n=Ko.min(arguments,t),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=arguments[o][e];return r},Ko.transpose=function(e){return Ko.zip.apply(Ko,e)},Ko.keys=function(e){var t=[];for(var n in e)t.push(n);return t},Ko.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},Ko.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},Ko.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var oa=Math.abs;Ko.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r===Infinity)throw new Error("infinite range");var i,o=[],a=n(oa(r)),s=-1;if(e*=a,t*=a,(r*=a)<0)for(;(i=e+r*++s)>t;)o.push(i/a);else for(;(i=e+r*++s)<t;)o.push(i/a);return o},Ko.map=function(e){var t=new i;if(e instanceof i)e.forEach(function(e,n){t.set(e,n)});else for(var n in e)t.set(n,e[n]);return t},r(i,{has:o,get:function(e){return this[aa+e]},set:function(e,t){return this[aa+e]=t},remove:a,keys:s,values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},size:u,empty:l,forEach:function(e){for(var t in this)t.charCodeAt(0)===sa&&e.call(this,t.substring(1),this[t])}});var aa="\0",sa=aa.charCodeAt(0);Ko.nest=function(){function e(t,s,u){if(u>=a.length)return r?r.call(o,s):n?s.sort(n):s;for(var l,c,d,f,h=-1,p=s.length,m=a[u++],v=new i;++h<p;)(f=v.get(l=m(c=s[h])))?f.push(c):v.set(l,[c]);return t?(c=t(),d=function(n,r){c.set(n,e(t,r,u))}):(c={},d=function(n,r){c[n]=e(t,r,u)}),v.forEach(d),c}function t(e,n){if(n>=a.length)return e;var r=[],i=s[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,o={},a=[],s=[];return o.map=function(t,n){return e(n,t,0)},o.entries=function(n){return t(e(Ko.map,n,0),0)},o.key=function(e){return a.push(e),o},o.sortKeys=function(e){return s[a.length-1]=e,o},o.sortValues=function(e){return n=e,o},o.rollup=function(e){return r=e,o},o},Ko.set=function(e){var t=new c;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},r(c,{has:o,add:function(e){return this[aa+e]=!0,e},remove:function(e){return(e=aa+e)in this&&delete this[e]},values:s,size:u,empty:l,forEach:function(e){for(var t in this)t.charCodeAt(0)===sa&&e.call(this,t.substring(1))}}),Ko.behavior={},Ko.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=d(e,t,t[n]);return e};var ua=["webkit","ms","moz","Moz","o","O"];Ko.dispatch=function(){for(var e=new p,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=m(e);return e},p.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.substring(n+1),e=e.substring(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},Ko.event=null,Ko.requote=function(e){return e.replace(la,"\\$&")};var la=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ca={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},da=function(e,t){return t.querySelector(e)},fa=function(e,t){return t.querySelectorAll(e)},ha=Xo[f(Xo,"matchesSelector")],pa=function(e,t){return ha.call(e,t)};"function"==typeof Sizzle&&(da=function(e,t){return Sizzle(e,t)[0]||null},fa=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},pa=Sizzle.matchesSelector),Ko.selection=function(){return ya};var ma=Ko.selection.prototype=[];ma.select=function(e){var t,n,r,i,o=[];e=_(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(t.push(n=e.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return b(o)},ma.selectAll=function(e){var t,n,r=[];e=x(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],s=-1,u=a.length;++s<u;)(n=a[s])&&(r.push(t=Go(e.call(n,n.__data__,s,i))),t.parentNode=n);return b(r)};var va={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Ko.ns={prefix:va,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),va.hasOwnProperty(n)?{space:va[n],local:e}:e}},ma.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=Ko.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(w(t,e[t]));return this}return this.each(w(e,t))},ma.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e
97=S(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!k(e[i]).test(t))return!1;return!0}for(t in e)this.each(j(t,e[t]));return this}return this.each(j(e,t))},ma.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(T(n,e[n],t));return this}if(r<2)return Jo.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(T(e,t,n))},ma.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(P(t,e[t]));return this}return this.each(P(e,t))},ma.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},ma.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},ma.append=function(e){return e=$(e),this.select(function(){return this.appendChild(e.apply(this,arguments))})},ma.insert=function(e,t){return e=$(e),t=_(t),this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})},ma.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},ma.data=function(e,t){function n(e,n){var r,o,a,s=e.length,d=n.length,f=Math.min(s,d),h=new Array(d),p=new Array(d),m=new Array(s);if(t){var v,g=new i,y=new i,b=[];for(r=-1;++r<s;)v=t.call(o=e[r],o.__data__,r),g.has(v)?m[r]=o:g.set(v,o),b.push(v);for(r=-1;++r<d;)v=t.call(n,a=n[r],r),(o=g.get(v))?(h[r]=o,o.__data__=a):y.has(v)||(p[r]=N(a)),y.set(v,a),g.remove(v);for(r=-1;++r<s;)g.has(b[r])&&(m[r]=e[r])}else{for(r=-1;++r<f;)o=e[r],a=n[r],o?(o.__data__=a,h[r]=o):p[r]=N(a);for(;r<d;++r)p[r]=N(n[r]);for(;r<s;++r)m[r]=e[r]}p.update=h,p.parentNode=h.parentNode=m.parentNode=e.parentNode,u.push(p),l.push(h),c.push(m)}var r,o,a=-1,s=this.length;if(!arguments.length){for(e=new Array(s=(r=this[0]).length);++a<s;)(o=r[a])&&(e[a]=o.__data__);return e}var u=A([]),l=b([]),c=b([]);if("function"==typeof e)for(;++a<s;)n(r=this[a],e.call(r,r.parentNode.__data__,a));else for(;++a<s;)n(r=this[a],e);return l.enter=function(){return u},l.exit=function(){return c},l},ma.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},ma.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=R(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return b(i)},ma.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},ma.sort=function(e){e=M.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},ma.each=function(e){return D(this,function(t,n,r){e.call(t,t.__data__,n,r)})},ma.call=function(e){var t=Go(arguments);return e.apply(t[0]=this,t),this},ma.empty=function(){return!this.node()},ma.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},ma.size=function(){var e=0;return this.each(function(){++e}),e};var ga=[];Ko.selection.enter=A,Ko.selection.enter.prototype=ga,ga.append=ma.append,ga.empty=ma.empty,ga.node=ma.node,ga.call=ma.call,ga.size=ma.size,ga.select=function(e){for(var t,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(t.push(r[l]=n=e.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):t.push(null)}return b(a)},ga.insert=function(e,t){return arguments.length<2&&(t=I(this)),ma.insert.call(this,e,t)},ma.transition=function(){for(var e,t,n=ku||++Pu,r=[],i=Su||{time:Date.now(),ease:br,delay:0,duration:250},o=-1,a=this.length;++o<a;
97){r.push(e=[]);for(var s=this[o],u=-1,l=s.length;++u<l;)(t=s[u])&&Lo(t,u,n,i),e.push(t)}return Io(r,n)},ma.interrupt=function(){return this.each(O)},Ko.select=function(e){var t=["string"==typeof e?da(e,Yo):e];return t.parentNode=Xo,b([t])},Ko.selectAll=function(e){var t=Go("string"==typeof e?fa(e,Yo):e);return t.parentNode=Xo,b([t])};var ya=Ko.select(Xo);ma.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(F(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(F(e,t,n))};var ba=Ko.map({mouseenter:"mouseover",mouseleave:"mouseout"});ba.forEach(function(e){"on"+e in Yo&&ba.remove(e)});var _a="onselectstart"in Yo?null:f(Xo.style,"userSelect"),xa=0;Ko.mouse=function(e){return U(e,g())};var wa=/WebKit/.test(Jo.navigator.userAgent)?-1:0;Ko.touches=function(e,t){return arguments.length<2&&(t=g().touches),t?Go(t).map(function(t){var n=U(e,t);return n.identifier=t.identifier,n}):[]}, 98Ko.behavior.drag=function(){function e(){this.on("mousedown.drag",a).on("touchstart.drag",s)}function t(){return Ko.event.changedTouches[0].identifier}function n(e,t){return Ko.touches(e).filter(function(e){return e.identifier===t})[0]}function r(e,t,n,r){return function(){function a(){var e=t(c,h),n=e[0]-m[0],r=e[1]-m[1];v|=n|r,m=e,d({type:"drag",x:e[0]+u[0],y:e[1]+u[1],dx:n,dy:r})}function s(){g.on(n+"."+p,null).on(r+"."+p,null),y(v&&Ko.event.target===f),d({type:"dragend"})}var u,l=this,c=l.parentNode,d=i.of(l,arguments),f=Ko.event.target,h=e(),p=null==h?"drag":"drag-"+h,m=t(c,h),v=0,g=Ko.select(Jo).on(n+"."+p,a).on(r+"."+p,s),y=B();u=o?[(u=o.apply(l,arguments)).x-m[0],u.y-m[1]]:[0,0],d({type:"dragstart"})}}var i=y(e,"drag","dragstart","dragend"),o=null,a=r(h,Ko.mouse,"mousemove","mouseup"),s=r(t,n,"touchmove","touchend");return e.origin=function(t){return arguments.length?(o=t,e):o},Ko.rebind(e,i,"on")};var Ca=Math.PI,ka=2*Ca,Sa=Ca/2,ja=1e-6,Ea=ja*ja,Ta=Ca/180,Pa=180/Ca,$a=Math.SQRT2,Na=2,Ra=4;Ko.interpolateZoom=function(e,t){function n(e){var t=e*g;if(v){var n=Q(m),a=o/(Na*f)*(n*G($a*t+m)-K(m));return[r+a*l,i+a*c,o*n/Q($a*t+m)]}return[r+e*l,i+e*c,o*Math.exp($a*t)]}var r=e[0],i=e[1],o=e[2],a=t[0],s=t[1],u=t[2],l=a-r,c=s-i,d=l*l+c*c,f=Math.sqrt(d),h=(u*u-o*o+Ra*d)/(2*o*Na*f),p=(u*u-o*o-Ra*d)/(2*u*Na*f),m=Math.log(Math.sqrt(h*h+1)-h),v=Math.log(Math.sqrt(p*p+1)-p)-m,g=(v||Math.log(u/o))/$a;return n.duration=1e3*g,n},Ko.behavior.zoom=function(){function e(e){e.on(E,l).on(Aa+".zoom",d).on(T,f).on("dblclick.zoom",h).on($,c)}function t(e){return[(e[0]-k.x)/k.k,(e[1]-k.y)/k.k]}function n(e){return[e[0]*k.k+k.x,e[1]*k.k+k.y]}function r(e){k.k=Math.max(j[0],Math.min(j[1],e))}function i(e,t){t=n(t),k.x+=e[0]-t[0],k.y+=e[1]-t[1]}function o(){x&&x.domain(_.range().map(function(e){return(e-k.x)/k.k}).map(_.invert)),C&&C.domain(w.range().map(function(e){return(e-k.y)/k.k}).map(w.invert))}function a(e){e({type:"zoomstart"})}function s(e){o(),e({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function u(e){e({type:"zoomend"})}function l(){function e(){c=1,i(Ko.mouse(r),h),s(o)}function n(){d.on(T,Jo===r?f:null).on(P,null),p(c&&Ko.event.target===l),u(o)}var r=this,o=N.of(r,arguments),l=Ko.event.target,c=0,d=Ko.select(Jo).on(T,e).on(P,n),h=t(Ko.mouse(r)),p=B();O.call(r),a(o)}function c(){function e(){var e=Ko.touches(h);return f=k.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))}),e}function n(){for(var t=Ko.event.changedTouches,n=0,o=t.length;n<o;++n)m[t[n].identifier]=null;var a=e(),u=Date.now();if(1===a.length){if(u-b<500){var l=a[0],c=m[l.identifier];r(2*k.k),i(l,c),v(),s(p)}b=u}else if(a.length>1){l=a[0];var d=a[1],f=l[0]-d[0],h=l[1]-d[1];g=f*f+h*h}}function o(){for(var e,t,n,o,a=Ko.touches(h),u=0,l=a.length;u<l;++u,o=null)if(n=a[u],o=m[n.identifier]){if(t)break;e=n,t=o}if(o){var c=(c=n[0]-e[0])*c+(c=n[1]-e[1])*c,d=g&&Math.sqrt(c/g);e=[(e[0]+n[0])/2,(e[1]+n[1])/2],t=[(t[0]+o[0])/2,(t[1]+o[1])/2],r(d*f)}b=null,i(e,t),s(p)}function d(){if(Ko.event.touches.length){for(var t=Ko.event.changedTouches,n=0,r=t.length;n<r;++n)delete m[t[n].identifier];for(var i in m)return void e()}w.on(_,null).on(x,null),C.on(E,l).on($,c),S(),u(p)}var f,h=this,p=N.of(h,arguments),m={},g=0,y=Ko.event.changedTouches[0].identifier,_="touchmove.zoom-"+y,x="touchend.zoom-"+y,w=Ko.select(Jo).on(_,o).on(x,d),C=Ko.select(h).on(E,null).on($,n),S=B();O.call(h),n(),a(p)}function d(){var e=N.of(this,arguments);g?clearTimeout(g):(O.call(this),a(e)),g=setTimeout(function(){g=null,u(e)},50),v();var n=m||Ko.mouse(this);p||(p=t(n)),r(Math.pow(2,.002*Ma())*k.k),i(n,p),s(e)}function f(){p=null}function h(){var e=N.of(this,arguments),n=Ko.mouse(this),o=t(n),l=Math.log(k.k)/Math.LN2;a(e),r(Math.pow(2,Ko.event.shiftKey?Math.ceil(l)-1:Math.floor(l)+1)),i(n,o),s(e),u(e)}var p,m,g,b,_,x,w,C,k={x:0,y:0,k:1}
98,S=[960,500],j=Da,E="mousedown.zoom",T="mousemove.zoom",P="mouseup.zoom",$="touchstart.zoom",N=y(e,"zoomstart","zoom","zoomend");return e.event=function(e){e.each(function(){var e=N.of(this,arguments),t=k;ku?Ko.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(e)}).tween("zoom:zoom",function(){var n=S[0],r=S[1],i=n/2,o=r/2,a=Ko.interpolateZoom([(i-k.x)/k.k,(o-k.y)/k.k,n/k.k],[(i-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=a(t),u=n/r[2];this.__chart__=k={x:i-r[0]*u,y:o-r[1]*u,k:u},s(e)}}).each("end.zoom",function(){u(e)}):(this.__chart__=k,a(e),s(e),u(e))})},e.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),e):[k.x,k.y]},e.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),e):k.k},e.scaleExtent=function(t){return arguments.length?(j=null==t?Da:[+t[0],+t[1]],e):j},e.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],e):m},e.size=function(t){return arguments.length?(S=t&&[+t[0],+t[1]],e):S},e.x=function(t){return arguments.length?(x=t,_=t.copy(),k={x:0,y:0,k:1},e):x},e.y=function(t){return arguments.length?(C=t,w=t.copy(),k={x:0,y:0,k:1},e):C},Ko.rebind(e,N,"on")};var Ma,Da=[0,Infinity],Aa="onwheel"in Yo?(Ma=function(){return-Ko.event.deltaY*(Ko.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Yo?(Ma=function(){return Ko.event.wheelDelta},"mousewheel"):(Ma=function(){return-Ko.event.detail},"MozMousePixelScroll");X.prototype.toString=function(){return this.rgb()+""},Ko.hsl=function(e,t,n){return 1===arguments.length?e instanceof Z?J(e.h,e.s,e.l):ve(""+e,ge,J):J(+e,+t,+n)};var Ia=Z.prototype=new X;Ia.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),J(this.h,this.s,this.l/e)},Ia.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),J(this.h,this.s,e*this.l)},Ia.rgb=function(){return ee(this.h,this.s,this.l)},Ko.hcl=function(e,t,n){return 1===arguments.length?e instanceof ne?te(e.h,e.c,e.l):se(e instanceof oe?e.l:(e=ye((e=Ko.rgb(e)).r,e.g,e.b)).l,e.a,e.b):te(+e,+t,+n)};var Oa=ne.prototype=new X;Oa.brighter=function(e){return te(this.h,this.c,Math.min(100,this.l+Fa*(arguments.length?e:1)))},Oa.darker=function(e){return te(this.h,this.c,Math.max(0,this.l-Fa*(arguments.length?e:1)))},Oa.rgb=function(){return re(this.h,this.c,this.l).rgb()},Ko.lab=function(e,t,n){return 1===arguments.length?e instanceof oe?ie(e.l,e.a,e.b):e instanceof ne?re(e.l,e.c,e.h):ye((e=Ko.rgb(e)).r,e.g,e.b):ie(+e,+t,+n)};var Fa=18,La=.95047,Ha=1,Ba=1.08883,Ua=oe.prototype=new X;Ua.brighter=function(e){return ie(Math.min(100,this.l+Fa*(arguments.length?e:1)),this.a,this.b)},Ua.darker=function(e){return ie(Math.max(0,this.l-Fa*(arguments.length?e:1)),this.a,this.b)},Ua.rgb=function(){return ae(this.l,this.a,this.b)},Ko.rgb=function(e,t,n){return 1===arguments.length?e instanceof pe?he(e.r,e.g,e.b):ve(""+e,he,ee):he(~~e,~~t,~~n)};var qa=pe.prototype=new X;qa.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),he(Math.min(255,~~(t/e)),Math.min(255,~~(n/e)),Math.min(255,~~(r/e)))):he(i,i,i)},qa.darker=function(e){return he(~~((e=Math.pow(.7,arguments.length?e:1))*this.r),~~(e*this.g),~~(e*this.b))},qa.hsl=function(){return ge(this.r,this.g,this.b)},qa.toString=function(){return"#"+me(this.r)+me(this.g)+me(this.b)};var za=Ko.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});za.forEach(function(e,t){za.set(e,de(t))}),Ko.functor=xe,Ko.xhr=Ce(we),Ko.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var a=ke(e,t,null==n?r:i(n),o);return a.row=function(e){return arguments.length?a.response(null==(n=e)?r:i(e)):n},a}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(a).join(e)}function a(e){return s.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i})},n.parseRows=function(e,t){function n(){if(c>=l)return a;
98if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(r=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===r&&(i=!0),e.substring(t+1,n).replace(/""/g,'"')}for(;c<l;){var r,s=1;if(10===(r=e.charCodeAt(c++)))i=!0;else if(13===r)i=!0,10===e.charCodeAt(c)&&(++c,++s);else if(r!==u)continue;return e.substring(t,c-s)}return e.substring(t)}for(var r,i,o={},a={},s=[],l=e.length,c=0,d=0;(r=n())!==a;){for(var f=[];r!==o&&r!==a;)f.push(r),r=n();t&&!(f=t(f,d++))||s.push(f)}return s},n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new c,i=[];return t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))}),[i.map(a).join(e)].concat(t.map(function(t){return i.map(function(e){return a(t[e])}).join(e)})).join("\n")},n.formatRows=function(e){return e.map(o).join("\n")},n},Ko.csv=Ko.dsv(",","text/csv"),Ko.tsv=Ko.dsv("\t","text/tab-separated-values");var Wa,Va,Ka,Qa,Ga,Ya=Jo[f(Jo,"requestAnimationFrame")]||function(e){setTimeout(e,17)};Ko.timer=function(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i={c:e,t:n+t,f:!1,n:null};Va?Va.n=i:Wa=i,Va=i,Ka||(Qa=clearTimeout(Qa),Ka=1,Ya(je))},Ko.timer.flush=function(){Ee(),Te()},Ko.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var Xa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map($e);Ko.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=Ko.round(e,Pe(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n<=0?n+1:n-1)/3)))),Xa[8+n/3]};var Ja=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Za=Ko.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=Ko.round(e,Pe(e,t))).toFixed(Math.max(0,Math.min(20,Pe(e*(1+1e-15),t))))}}),es=Ko.time={},ts=Date;Me.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ns.setUTCDate.apply(this._,arguments)},setDay:function(){ns.setUTCDay.apply(this._,arguments)},setFullYear:function(){ns.setUTCFullYear.apply(this._,arguments)},setHours:function(){ns.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ns.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ns.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ns.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ns.setUTCSeconds.apply(this._,arguments)},setTime:function(){ns.setTime.apply(this._,arguments)}};var ns=Date.prototype;es.year=De(function(e){return(e=es.day(e)).setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),es.years=es.year.range,es.years.utc=es.year.utc.range,es.day=De(function(e){var t=new ts(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),es.days=es.day.range,es.days.utc=es.day.utc.range,es.dayOfYear=function(e){var t=es.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=es[e]=De(function(e){return(e=es.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=es.year(e).getDay();return Math.floor((es.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});es[e+"s"]=n.range,es[e+"s"].utc=n.utc.range,es[e+"OfYear"]=function(e){var n=es.year(e).getDay();return Math.floor((es.dayOfYear(e)+(n+t)%7)/7)}}),es.week=es.sunday,es.weeks=es.sunday.range,es.weeks.utc=es.sunday.utc.range,es.weekOfYear=es.sundayOfYear;var rs={"-":"",_:" ",0:"0"},is=/^\s*\d+/,os=/^%/;
98Ko.locale=function(e){return{numberFormat:Ne(e),timeFormat:Ie(e)}};var as=Ko.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Ko.format=as.numberFormat,Ko.geo={},rt.prototype={s:0,t:0,add:function(e){it(e,this.t,ss),it(ss.s,this.s,this),this.s?this.t+=ss.t:this.s=ss.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ss=new rt;Ko.geo.stream=function(e,t){e&&us.hasOwnProperty(e.type)?us[e.type](e,t):ot(e,t)};var us={Feature:function(e,t){ot(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ot(n[r].geometry,t)}},ls={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){at(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)at(n[r],t,0)},Polygon:function(e,t){st(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)st(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ot(n[r],t)}};Ko.geo.area=function(e){return cs=0,Ko.geo.stream(e,Cs),cs};var cs,ds,fs,hs,ps,ms,vs,gs,ys,bs,_s,xs,ws=new rt,Cs={sphere:function(){cs+=4*Ca},point:h,lineStart:h,lineEnd:h,polygonStart:function(){ws.reset(),Cs.lineStart=ut},polygonEnd:function(){var e=2*ws;cs+=e<0?4*Ca+e:e,Cs.lineStart=Cs.lineEnd=Cs.point=h}};Ko.geo.bounds=function(){function e(e,t){b.push(_=[c=e,f=e]),t<d&&(d=t),t>h&&(h=t)}function t(t,n){var r=lt([t*Ta,n*Ta]);if(g){var i=dt(g,r),o=dt([i[1],-i[0],0],i);pt(o),o=mt(o);var a=t-p,u=a>0?1:-1,l=o[0]*Pa*u,m=oa(a)>180;if(m^(u*p<l&&l<u*t))(v=o[1]*Pa)>h&&(h=v);else if(m^(u*p<(l=(l+360)%360-180)&&l<u*t)){var v;(v=-o[1]*Pa)<d&&(d=v)}else n<d&&(d=n),n>h&&(h=n);m?t<p?s(c,t)>s(c,f)&&(f=t):s(t,f)>s(c,f)&&(c=t):f>=c?(t<c&&(c=t),t>f&&(f=t)):t>p?s(c,t)>s(c,f)&&(f=t):s(t,f)>s(c,f)&&(c=t)}else e(t,n);g=r,p=t}function n(){x.point=t}function r(){_[0]=c,_[1]=f,x.point=e,g=null}function i(e,n){if(g){var r=e-p;y+=oa(r)>180?r+(r>0?360:-360):r}else m=e,v=n;Cs.point(e,n),t(e,n)}function o(){Cs.lineStart()}function a(){i(m,v),Cs.lineEnd(),oa(y)>ja&&(c=-(f=180)),_[0]=c,_[1]=f,g=null}function s(e,t){return(t-=e)<0?t+360:t}function u(e,t){return e[0]-t[0]}function l(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var c,d,f,h,p,m,v,g,y,b,_,x={point:e,lineStart:n,lineEnd:r,polygonStart:function(){x.point=i,x.lineStart=o,x.lineEnd=a,y=0,Cs.polygonStart()},polygonEnd:function(){Cs.polygonEnd(),x.point=e,x.lineStart=n,x.lineEnd=r,ws<0?(c=-(f=180),d=-(h=90)):y>ja?h=90:y<-ja&&(d=-90),_[0]=c,_[1]=f}};return function(e){if(h=f=-(c=d=Infinity),b=[],Ko.geo.stream(e,x),i=b.length){b.sort(u);for(var t=1,n=[p=b[0]];t<i;++t)l((o=b[t])[0],p)||l(o[1],p)?(s(p[0],o[1])>s(p[0],p[1])&&(p[1]=o[1]),s(o[0],p[1])>s(p[0],p[1])&&(p[0]=o[0])):n.push(p=o);for(var r,i,o,a=-Infinity,p=(t=0,n[i=n.length-1]);t<=i;p=o,++t)o=n[t],(r=s(p[1],o[0]))>a&&(a=r,c=o[0],f=p[1])}return b=_=null,c===Infinity||d===Infinity?[[NaN,NaN],[NaN,NaN]]:[[c,d],[f,h]]}}(),Ko.geo.centroid=function(e){ds=fs=hs=ps=ms=vs=gs=ys=bs=_s=xs=0,Ko.geo.stream(e,ks);var t=bs,n=_s,r=xs,i=t*t+n*n+r*r;return i<Ea&&(t=vs,n=gs,r=ys,fs<ja&&(t=hs,n=ps,r=ms),(i=t*t+n*n+r*r)<Ea)?[NaN,NaN]:[Math.atan2(n,t)*Pa,V(r/Math.sqrt(i))*Pa]};var ks={sphere:h,point:gt,lineStart:bt,lineEnd:_t,polygonStart:function(){ks.lineStart=xt},polygonEnd:function(){ks.lineStart=bt}},Ss=jt(wt,Nt,Mt,[-Ca,-Ca/2]),js=1e9;Ko.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(s){return arguments.length?(o=It(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(Ko.geo.conicEqualArea=function(){return Ft(Lt)}).raw=Lt,Ko.geo.albers=function(){return Ko.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Ko.geo.albersUsa=function(){function e(e){var o=e[0],a=e[1];return t=null,n(o,a),t||(r(o,a),t)||i(o,a),t}var t,n,r,i,o=Ko.geo.albers(),a=Ko.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Ko.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,n){t=[e,
98n]}};return e.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var l=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*l,d-.238*l],[c+.455*l,d+.238*l]]).stream(u).point,r=a.translate([c-.307*l,d+.201*l]).clipExtent([[c-.425*l+ja,d+.12*l+ja],[c-.214*l-ja,d+.234*l-ja]]).stream(u).point,i=s.translate([c-.205*l,d+.212*l]).clipExtent([[c-.214*l+ja,d+.166*l+ja],[c-.115*l-ja,d+.234*l-ja]]).stream(u).point,e},e.scale(1070)};var Es,Ts,Ps,$s,Ns,Rs,Ms,Ds={point:h,lineStart:h,lineEnd:h,polygonStart:function(){Ts=0,Ds.lineStart=Ht},polygonEnd:function(){Ds.lineStart=Ds.lineEnd=Ds.point=h,Es+=oa(Ts/2)}},As={point:Bt,lineStart:h,lineEnd:h,polygonStart:h,polygonEnd:h},Is={point:zt,lineStart:Wt,lineEnd:Vt,polygonStart:function(){Is.lineStart=Kt},polygonEnd:function(){Is.point=zt,Is.lineStart=Wt,Is.lineEnd=Vt}};Ko.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),Ko.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return Es=0,Ko.geo.stream(e,i(Ds)),Es},e.centroid=function(e){return hs=ps=ms=vs=gs=ys=bs=_s=xs=0,Ko.geo.stream(e,i(Is)),xs?[bs/xs,_s/xs]:ys?[vs/ys,gs/ys]:ms?[hs/ms,ps/ms]:[NaN,NaN]},e.bounds=function(e){return Ns=Rs=-(Ps=$s=Infinity),Ko.geo.stream(e,i(As)),[[Ps,$s],[Ns,Rs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||Yt(e):we,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Ut:new Qt(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(Ko.geo.albersUsa()).context(null)},Ko.geo.transform=function(e){return{stream:function(t){var n=new Xt(t);for(var r in e)n[r]=e[r];return n}}},Xt.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Ko.geo.projection=Zt,Ko.geo.projectionMutator=en,(Ko.geo.equirectangular=function(){return Zt(nn)}).raw=nn.invert=nn,Ko.geo.rotation=function(e){function t(t){return(t=e(t[0]*Ta,t[1]*Ta))[0]*=Pa,t[1]*=Pa,t}return e=on(e[0]%360*Ta,e[1]*Ta,e.length>2?e[2]*Ta:0),t.invert=function(t){return(t=e.invert(t[0]*Ta,t[1]*Ta))[0]*=Pa,t[1]*=Pa,t},t},rn.invert=nn,Ko.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=on(-e[0]*Ta,-e[1]*Ta,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=Pa,e[1]*=Pa}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=ln((t=+r)*Ta,i*Ta),e):t},e.precision=function(r){return arguments.length?(n=ln(t*Ta,(i=+r)*Ta),e):i},e.angle(90)},Ko.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Ta,i=e[1]*Ta,o=t[1]*Ta,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),l=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=l*c-u*d*s)*n),u*c+l*d*s)},Ko.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Ko.range(Math.ceil(o/v)*v,i,v).map(f).concat(Ko.range(Math.ceil(l/g)*g,u,g).map(h)).concat(Ko.range(Math.ceil(r/p)*p,n,p).filter(function(e){return oa(e%v)>ja}).map(c)).concat(Ko.range(Math.ceil(s/m)*m,a,m).filter(function(e){return oa(e%g)>ja}).map(d))}var n,r,i,o,a,s,u,l,c,d,f,h,p=10,m=p,v=90,g=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[f(o).concat(h(u).slice(1),f(i).reverse().slice(1),h(l).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],l=+t[0][1],u=+t[1][1],o>i&&(t=o,o=i,i=t),l>u&&(t=l,l=u,u=t),e.precision(y)):[[o,l],[i,u]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(v=+t[0],g=+t[1],e):[v,g]},e.minorStep=function(t){return arguments.length?(p=+t[0],m=+t[1],e):[p,m]},e.precision=function(t){return arguments.length?(y=+t,c=dn(s,a,90),d=fn(r,n,y),f=dn(l,u,90),h=fn(o,i,y),e):y},e.majorExtent([[-180,-90+ja],[180,90-ja]]).minorExtent([[-180,-80-ja],[180,80+ja]])},Ko.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=hn,i=pn;return e.distance=function(){return Ko.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r}
98,e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},Ko.geo.interpolate=function(e,t){return mn(e[0]*Ta,e[1]*Ta,t[0]*Ta,t[1]*Ta)},Ko.geo.length=function(e){return Ms=0,Ko.geo.stream(e,Os),Ms};var Os={sphere:h,point:h,lineStart:vn,lineEnd:h,polygonStart:h,polygonEnd:h},Fs=gn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(Ko.geo.azimuthalEqualArea=function(){return Zt(Fs)}).raw=Fs;var Ls=gn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},we);(Ko.geo.azimuthalEquidistant=function(){return Zt(Ls)}).raw=Ls,(Ko.geo.conicConformal=function(){return Ft(yn)}).raw=yn,(Ko.geo.conicEquidistant=function(){return Ft(bn)}).raw=bn;var Hs=gn(function(e){return 1/e},Math.atan);(Ko.geo.gnomonic=function(){return Zt(Hs)}).raw=Hs,_n.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Sa]},(Ko.geo.mercator=function(){return xn(_n)}).raw=_n;var Bs=gn(function(){return 1},Math.asin);(Ko.geo.orthographic=function(){return Zt(Bs)}).raw=Bs;var Us=gn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(Ko.geo.stereographic=function(){return Zt(Us)}).raw=Us,wn.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Sa]},(Ko.geo.transverseMercator=function(){var e=xn(wn),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[-(e=t())[1],e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},e.rotate([0,0])}).raw=wn,Ko.geom={},Ko.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=xe(n),o=xe(r),a=e.length,s=[],u=[];for(t=0;t<a;t++)s.push([+i.call(this,e[t],t),+o.call(this,e[t],t),t]);for(s.sort(jn),t=0;t<a;t++)u.push([s[t][0],-s[t][1]]);var l=Sn(s),c=Sn(u),d=c[0]===l[0],f=c[c.length-1]===l[l.length-1],h=[];for(t=l.length-1;t>=0;--t)h.push(e[s[l[t]][2]]);for(t=+d;t<c.length-f;++t)h.push(e[s[c[t]][2]]);return h}var n=Cn,r=kn;return arguments.length?t(e):(t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t)},Ko.geom.polygon=function(e){return ca(e,qs),e};var qs=Ko.geom.polygon.prototype=[];qs.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},qs.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},qs.clip=function(e){for(var t,n,r,i,o,a,s=Pn(e),u=-1,l=this.length-Pn(this),c=this[l-1];++u<l;){for(t=e.slice(),e.length=0,i=this[u],o=t[(r=t.length-s)-1],n=-1;++n<r;)En(a=t[n],c,i)?(En(o,c,i)||e.push(Tn(o,a,c,i)),e.push(a)):En(o,c,i)&&e.push(Tn(o,a,c,i)),o=a;s&&e.push(e[0]),c=i}return e};var zs,Ws,Vs,Ks,Qs,Gs=[],Ys=[];On.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(Ln),t.length},Gn.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Yn.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=er(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Jn(this,n),n=(e=n).U),n.C=!1,r.C=!0,Zn(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Zn(this,n),n=(e=n).U),n.C=!1,r.C=!0,Jn(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?er(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Jn(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Zn(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Jn(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Zn(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Jn(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Zn(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},Ko.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=s[0][0],i=s[0][1],o=s[1][0],a=s[1][1];
98return tr(n(e),s).cells.forEach(function(n,s){var u=n.edges,l=n.site;(t[s]=u.length?u.map(function(e){var t=e.start();return[t.x,t.y]}):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[]).point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/ja)*ja,y:Math.round(a(e,t)/ja)*ja,i:t}})}var r=Cn,i=kn,o=r,a=i,s=Xs;return e?t(e):(t.links=function(e){return tr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return tr(n(e)).cells.forEach(function(n,r){for(var i,o=n.site,a=n.edges.sort(Ln),s=-1,u=a.length,l=a[u-1].edge,c=l.l===o?l.r:l.l;++s<u;)l,i=c,c=(l=a[s].edge).l===o?l.r:l.l,r<i.i&&r<c.i&&rr(o,i,c)<0&&t.push([e[r],e[i.i],e[c.i]])}),t},t.x=function(e){return arguments.length?(o=xe(r=e),t):r},t.y=function(e){return arguments.length?(a=xe(i=e),t):i},t.clipExtent=function(e){return arguments.length?(s=null==e?Xs:e,t):s===Xs?null:s},t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):s===Xs?null:s&&s[1]},t)};var Xs=[[-1e6,-1e6],[1e6,1e6]];Ko.geom.delaunay=function(e){return Ko.geom.voronoi().triangles(e)},Ko.geom.quadtree=function(e,t,n,r,i){function o(e){function o(e,t,n,r,i,o,a,s){if
98(!isNaN(n)&&!isNaN(r))if(e.leaf){var u=e.x,c=e.y;if(null!=u)if(oa(u-n)+oa(c-r)<.01)l(e,t,n,r,i,o,a,s);else{var d=e.point;e.x=e.y=e.point=null,l(e,d,u,c,i,o,a,s),l(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else l(e,t,n,r,i,o,a,s)}function l(e,t,n,r,i,a,s,u){var l=.5*(i+s),c=.5*(a+u),d=n>=l,f=r>=c,h=(f<<1)+d;e.leaf=!1,d?i=l:s=l,f?a=c:u=c,o(e=e.nodes[h]||(e.nodes[h]=ar()),t,n,r,i,a,s,u)}var c,d,f,h,p,m,v,g,y,b=xe(s),_=xe(u);if(null!=t)m=t,v=n,g=r,y=i;else if(g=y=-(m=v=Infinity),d=[],f=[],p=e.length,a)for(h=0;h<p;++h)(c=e[h]).x<m&&(m=c.x),c.y<v&&(v=c.y),c.x>g&&(g=c.x),c.y>y&&(y=c.y),d.push(c.x),f.push(c.y);else for(h=0;h<p;++h){var x=+b(c=e[h],h),w=+_(c,h);x<m&&(m=x),w<v&&(v=w),x>g&&(g=x),w>y&&(y=w),d.push(x),f.push(w)}var C=g-m,k=y-v;C>k?y=v+C:g=m+k;var S=ar();if(S.add=function(e){o(S,e,+b(e,++h),+_(e,h),m,v,g,y)},S.visit=function(e){sr(e,S,m,v,g,y)},h=-1,null==t){for(;++h<p;)o(S,e[h],d[h],f[h],m,v,g,y);--h}else e.forEach(S.add);return d=f=e=c=null,S}var a,s=Cn,u=kn;return(a=arguments.length)?(s=ir,u=or,3===a&&(i=n,r=t,n=t=0),o(e)):(o.x=function(e){return arguments.length?(s=e,o):s},o.y=function(e){return arguments.length?(u=e,o):u},o.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),o):null==t?null:[[t,n],[r,i]]}, 99o.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),o):null==t?null:[r-t,i-n]},o)},Ko.interpolateRgb=ur,Ko.interpolateObject=lr,Ko.interpolateNumber=cr,Ko.interpolateString=dr;var Js=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Ko.interpolate=fr,Ko.interpolators=[function(e,t){var n=typeof t;return("string"===n?za.has(t)||/^(#|rgb\(|hsl\()/.test(t)?ur:dr:t instanceof X?ur:"object"===n?Array.isArray(t)?hr:lr:cr)(e,t)}],Ko.interpolateArray=hr;var Zs=function(){return we},eu=Ko.map({linear:Zs,poly:_r,quad:function(){return gr},cubic:function(){return yr},sin:function(){return xr},exp:function(){return wr},circle:function(){return Cr},elastic:kr,back:Sr,bounce:function(){return jr}}),tu=Ko.map({"in":we,out:mr,"in-out":vr,"out-in":function(e){return vr(mr(e))}});Ko.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=eu.get(n)||Zs,pr((r=tu.get(r)||we)(n.apply(null,Qo.call(arguments,1))))},Ko.interpolateHcl=Er,Ko.interpolateHsl=Tr,Ko.interpolateLab=Pr,Ko.interpolateRound=$r,Ko.transform=function(e){var t=Yo.createElementNS(Ko.ns.prefix.svg,"g");return(Ko.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Nr(n?n.matrix:nu)})(e)},Nr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var nu={a:1,b:0,c:0,d:1,e:0,f:0};Ko.interpolateTransform=Ar,Ko.layout={},Ko.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Fr(e[n]));return t}},Ko.layout.chord=function(){function e(){var e,l,d,f,h,p={},m=[],v=Ko.range(o),g=[];for(n=[],r=[],e=0,f=-1;++f<o;){for(l=0,h=-1;++h<o;)l+=i[f][h];m.push(l),g.push(Ko.range(o)),e+=l}for(a&&v.sort(function(e,t){return a(m[e],m[t])}),s&&g.forEach(function(e,t){e.sort(function(e,n){return s(i[t][e],i[t][n])})}),e=(ka-c*o)/e,l=0,f=-1;++f<o;){for(d=l,h=-1;++h<o;){var y=v[f],b=g[y][h],_=i[y][b],x=l,w=l+=_*e;p[y+"-"+b]={index:y,subindex:b,startAngle:x,endAngle:w,value:_}}r[y]={index:y,startAngle:d,endAngle:l,value:(l-d)/e},l+=c}for(f=-1;++f<o;)for(h=f-1;++h<o;){var C=p[f+"-"+h],k=p[h+"-"+f];(C.value||k.value)&&n.push(C.value<k.value?{source:k,target:C}:{source:C,target:k})}u&&t()}function t(){n.sort(function(e,t){return u((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,r,i,o,a,s,u,l={},c=0;return l.matrix=function(e){return arguments.length?(o=(i=e)&&i.length,n=r=null,l):i},l.padding=function(e){return arguments.length?(c=e,n=r=null,l):c},l.sortGroups=function(e){return arguments.length?(a=e,n=r=null,l):a},l.sortSubgroups=function(e){return arguments.length?(s=e,n=null,l):s},l.sortChords=function(e){return arguments.length?(u=e,n&&t(),l):u},l.chords=function(){return n||e(),n},l.groups=function(){return r||e(),r},l},Ko.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,u=o*o+a*a;if(s*s/v<u){if(u<p){var l=t.charge/u;e.px-=o*l,e.py-=a*l}return!0}if(t.point&&u&&u<p){l=t.pointCharge/u;e.px-=o*l,e.py-=a*l}}return!t.charge}}function t(e){e.px=Ko.event.x,e.py=Ko.event.y,s.resume()}var n,r,i,o,a,s={}
99,u=Ko.dispatch("start","tick","end"),l=[1,1],c=.9,d=ru,f=iu,h=-30,p=ou,m=.1,v=.64,g=[],y=[];return s.tick=function(){if((r*=.99)<.005)return u.end({type:"end",alpha:r=0}),!0;var t,n,s,d,f,p,v,b,_,x=g.length,w=y.length;for(n=0;n<w;++n)d=(s=y[n]).source,(p=(b=(f=s.target).x-d.x)*b+(_=f.y-d.y)*_)&&(b*=p=r*o[n]*((p=Math.sqrt(p))-i[n])/p,_*=p,f.x-=b*(v=d.weight/(f.weight+d.weight)),f.y-=_*v,d.x+=b*(v=1-v),d.y+=_*v);if((v=r*m)&&(b=l[0]/2,_=l[1]/2,n=-1,v))for(;++n<x;)(s=g[n]).x+=(b-s.x)*v,s.y+=(_-s.y)*v;if(h)for(Wr(t=Ko.geom.quadtree(g),r,a),n=-1;++n<x;)(s=g[n]).fixed||t.visit(e(s));for(n=-1;++n<x;)(s=g[n]).fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*c,s.y-=(s.py-(s.py=s.y))*c);u.tick({type:"tick",alpha:r})},s.nodes=function(e){return arguments.length?(g=e,s):g},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(l=e,s):l},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.chargeDistance=function(e){return arguments.length?(p=e*e,s):Math.sqrt(p)},s.gravity=function(e){return arguments.length?(m=+e,s):m},s.theta=function(e){return arguments.length?(v=e*e,s):Math.sqrt(v)},s.alpha=function(e){return arguments.length?(e=+e,r?r=e>0?e:0:e>0&&(u.start({type:"start",alpha:r=e}),Ko.timer(s.tick)),s):r},s.start=function(){function e(e,r){if(!n){for(n=new Array(u),s=0;s<u;++s)n[s]=[];for(s=0;s<l;++s){var i=y[s];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var o,a=n[t],s=-1,l=a.length;++s<l;)if(!isNaN(o=a[s][e]))return o;return Math.random()*r}var t,n,r,u=g.length,c=y.length,p=l[0],m=l[1];for(t=0;t<u;++t)(r=g[t]).index=t,r.weight=0;for(t=0;t<c;++t)"number"==typeof(r=y[t]).source&&(r.source=g[r.source]),"number"==typeof r.target&&(r.target=g[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<u;++t)r=g[t],isNaN(r.x)&&(r.x=e("x",p)),isNaN(r.y)&&(r.y=e("y",m)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof d)for(t=0;t<c;++t)i[t]=+d.call(this,y[t],t);else for(t=0;t<c;++t)i[t]=d;if(o=[],"function"==typeof f)for(t=0;t<c;++t)o[t]=+f.call(this,y[t],t);else for(t=0;t<c;++t)o[t]=f;if(a=[],"function"==typeof h)for(t=0;t<u;++t)a[t]=+h.call(this,g[t],t);else for(t=0;t<u;++t)a[t]=h;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(n||(n=Ko.behavior.drag().origin(we).on("dragstart.force",Br).on("drag.force",t).on("dragend.force",Ur)),!arguments.length)return n;this.on("mouseover.force",qr).on("mouseout.force",zr).call(n)},Ko.rebind(s,u,"on")};var ru=20,iu=1,ou=Infinity;Ko.layout.hierarchy=function(){function e(t,a,s){var u=i.call(n,t,a);if(t.depth=a,s.push(t),u&&(l=u.length)){for(var l,c,d=-1,f=t.children=new Array(l),h=0,p=a+1;++d<l;)(c=f[d]=e(u[d],p,s)).parent=t,h+=c.value;r&&f.sort(r),o&&(t.value=h)}else delete t.children,o&&(t.value=+o.call(n,t,a)||0);return t}function t(e,r){var i=e.children,a=0;if(i&&(s=i.length))for(var s,u=-1,l=r+1;++u<s;)a+=t(i[u],l);else o&&(a=+o.call(n,e,r)||0);return o&&(e.value=a),a}function n(t){var n=[];return e(t,0,n),n}var r=Gr,i=Kr,o=Qr;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(o=e,n):o},n.revalue=function(e){return t(e,0),e},n},Ko.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=t.value?r/t.value:0;++l<a;)e(s=o[l],n,u=s.value*r,i),n+=u}}function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return e(a[0],0,i[0],i[1]/t(a[0])),a}var r=Ko.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},Vr(n,r)},Ko.layout.pie=function(){function e(o){var a=o.map(function(n,r){return+t.call(e,n,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),u=(("function"==typeof i?i.apply(this,arguments):i)-s)/Ko.sum(a),l=Ko.range(o.length);null!=n&&l.sort(n===au?function(e,t){return a[t]-a[e]}:function(e,t){return n(o[e],o[t])});var c=[];return l.forEach(function(e){var t;c[e]={data:o[e],value:t=a[e],startAngle:s,endAngle:s+=t*u}}),c}var t=Number,n=au,r=0,i=ka;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var au={};Ko.layout.stack=function(){function e(s,u){var l=s.map(function(n,r){return t.call(e,n,r)}),c=l.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),a.call(e,t,n)]})}),d=n.call(e,c,u);l=Ko.permute(l,d),c=Ko.permute(c,d);var f,h,p,m=r.call(e,c,u),v=l.length,g=l[0].length;for(h=0;h<g;++h)for(i.call(e,l[0][h],p=m[h],c[0][h][1]),f=1;f<v;++f)i.call(e,l[f][h],p+=c[f-1][h][1],c[f][h][1]);return s}var t=we,n=ei,r=ti,i=Zr,o=Xr,a=Jr;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n="function"==typeof t?t:su.get(t)||ei,e):n},e.offset=function(t){return arguments.length?(r="function"==typeof t?t:uu.get(t)||ti,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(a=t,e):a},e.out=function(t){return arguments.length?(i=t,e):i},e};
99var su=Ko.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(ni),o=e.map(ri),a=Ko.range(r).sort(function(e,t){return i[e]-i[t]}),s=0,u=0,l=[],c=[];for(t=0;t<r;++t)n=a[t],s<u?(s+=o[n],l.push(n)):(u+=o[n],c.push(n));return c.reverse().concat(l)},reverse:function(e){return Ko.range(e.length).reverse()},"default":ei}),uu=Ko.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,u=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)u[n]=(s-a[n])/2;return u},wiggle:function(e){var t,n,r,i,o,a,s,u,l,c=e.length,d=e[0],f=d.length,h=[];for(h[0]=u=l=0,n=1;n<f;++n){for(t=0,i=0;t<c;++t)i+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];t<c;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}h[n]=u-=i?o/i*s:0,u<l&&(l=u)}for(n=0;n<f;++n)h[n]-=l;return h},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:ti});Ko.layout.histogram=function(){function e(e,o){for(var a,s,u=[],l=e.map(n,this),c=r.call(this,l,o),d=i.call(this,c,l,o),f=(o=-1,l.length),h=d.length-1,p=t?1:1/f;++o<h;)(a=u[o]=[]).dx=d[o+1]-(a.x=d[o]),a.y=0;if(h>0)for(o=-1;++o<f;)(s=l[o])>=c[0]&&s<=c[1]&&((a=u[Ko.bisect(d,s,1,h)-1]).y+=p,a.push(e[o]));return u}var t=!0,n=Number,r=si,i=oi;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=xe(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return ai(e,t)}:xe(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},Ko.layout.tree=function(){function e(e,o){function a(e,t){var r=e.children,i=e._tree;if(r&&(o=r.length)){for(var o,s,l,c=r[0],d=c,f=-1;++f<o;)a(l=r[f],s),d=u(l,s,d),s=l;vi(e);var h=.5*(c._tree.prelim+l._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-h):i.prelim=h}else t&&(i.prelim=t._tree.prelim+n(e,t))}function s(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(r=n.length)){var r,i=-1;for(t+=e._tree.mod;++i<r;)s(n[i],t)}}function u(e,t,r){if(t){for(var i,o=e,a=e,s=t,u=e.parent.children[0],l=o._tree.mod,c=a._tree.mod,d=s._tree.mod,f=u._tree.mod;s=ci(s),o=li(o),s&&o;)u=li(u),(a=ci(a))._tree.ancestor=e,(i=s._tree.prelim+d-o._tree.prelim-l+n(s,o))>0&&(gi(yi(s,e,r),e,i),l+=i,c+=i),d+=s._tree.mod,l+=o._tree.mod,f+=u._tree.mod,c+=a._tree.mod;s&&!ci(a)&&(a._tree.thread=s,a._tree.mod+=d-c),o&&!li(u)&&(u._tree.thread=o,u._tree.mod+=l-f,r=e)}return r}var l=t.call(this,e,o),c=l[0];mi(c,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),a(c),s(c,-c._tree.prelim);var d=di(c,hi),f=di(c,fi),h=di(c,pi),p=d.x-n(d,f)/2,m=f.x+n(f,d)/2,v=h.depth||1;return mi(c,i?function(e){e.x*=r[0],e.y=e.depth*r[1],delete e._tree}:function(e){e.x=(e.x-p)/(m-p)*r[0],e.y=e.depth/v*r[1],delete e._tree}),l}var t=Ko.layout.hierarchy().sort(null).value(null),n=ui,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},Vr(e,t)},Ko.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],u=i[0],l=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,mi(s,function(e){e.r=+c(e.value)}),mi(s,Ci),r){var d=r*(t?1:Math.max(2*s.r/u,2*s.r/l))/2;mi(s,function(e){e.r+=d}),mi(s,Ci),mi(s,function(e){e.r-=d})}return ji(s,u/2,l/2,t?1:1/Math.max(2*s.r/u,2*s.r/l)),a}var t,n=Ko.layout.hierarchy().sort(bi),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},Vr(e,n)},Ko.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),u=s[0],l=0;mi(u,function(e){var t=e.children;t&&t.length?(e.x=Pi(t),e.y=Ti(t)):(e.x=a?l+=n(e,a):0,e.y=0,a=e)});var c=$i(u),d=Ni(u),f=c.x-n(c,d)/2,h=d.x+n(d,c)/2;return mi(u,i?function(e){e.x=(e.x-u.x)*r[0],e.y=(u.y-e.y)*r[1]}:function(e){e.x=(e.x-f)/(h-f)*r[0],e.y=(1-(u.y?e.y/u.y:1))*r[1]}),s}var t=Ko.layout.hierarchy().sort(null).value(null),n=ui,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},Vr(e,t)},Ko.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function t(n){var o=n.children;if(o&&o.length){var a,s,u,l=d(n),c=[],f=o.slice(),p=Infinity,m="slice"===h?l.dx:"dice"===h?l.dy:"slice-dice"===h?1&n.depth?l.dy:l.dx:Math.min(l.dx,l.dy);
99for(e(f,l.dx*l.dy/n.value),c.area=0;(u=f.length)>0;)c.push(a=f[u-1]),c.area+=a.area,"squarify"!==h||(s=r(c,m))<=p?(f.pop(),p=s):(c.area-=c.pop().area,i(c,m,l,!1),m=Math.min(l.dx,l.dy),c.length=c.area=0,p=Infinity);c.length&&(i(c,m,l,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=d(t),s=r.slice(),u=[];for(e(s,a.dx*a.dy/t.value),u.area=0;o=s.pop();)u.push(o),u.area+=o.area,null!=o.z&&(i(u,o.z?a.dx:a.dy,a,!s.length),u.length=u.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=Infinity,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*p/r,r/(t*o*p)):Infinity}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,l=n.y,c=t?u(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<a;)(i=e[o]).x=s,i.y=l,i.dy=c,s+=i.dx=Math.min(n.x+n.dx-s,c?u(i.area/c):0);i.z=!0,i.dx+=n.x+n.dx-s,n.y+=c,n.dy-=c}else{for((r||c>n.dx)&&(c=n.dx);++o<a;)(i=e[o]).x=s,i.y=l,i.dx=c,l+=i.dy=Math.min(n.y+n.dy-l,c?u(i.area/c):0);i.z=!1,i.dy+=n.y+n.dy-l,n.x+=c,n.dx-=c}}function o(r){var i=a||s(r),o=i[0];return o.x=0,o.y=0,o.dx=l[0],o.dy=l[1],a&&s.revalue(o),e([o],o.dx*o.dy/o.value),(a?n:t)(o),f&&(a=i),i}var a,s=Ko.layout.hierarchy(),u=Math.round,l=[1,1],c=null,d=Ri,f=!1,h="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(e){return arguments.length?(l=e,o):l},o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Ri(t):Mi(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Mi(t,e)}return arguments.length?(d=null==(c=e)?Ri:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,o):c;var r},o.round=function(e){return arguments.length?(u=e?Math.round:Number,o):u!=Number},o.sticky=function(e){return arguments.length?(f=e,a=null,o):f},o.ratio=function(e){return arguments.length?(p=e,o):p},o.mode=function(e){return arguments.length?(h=e+"",o):h},Vr(o,s)},Ko.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=Ko.random.normal.apply(Ko,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=Ko.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},Ko.scale={};var lu={floor:we,ceil:we};Ko.scale.linear=function(){return Hi([0,1],[0,1],fr,!1)};var cu={s:1,g:1,p:1,r:1,e:1};Ko.scale.log=function(){return Qi(Ko.scale.linear().domain([0,1]),10,!0,[1,10])};var du=Ko.format(".0e"),fu={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};Ko.scale.pow=function(){return Gi(Ko.scale.linear(),1,[0,1])},Ko.scale.sqrt=function(){return Ko.scale.pow().exponent(.5)},Ko.scale.ordinal=function(){return Xi([],{t:"range",a:[[]]})},Ko.scale.category10=function(){return Ko.scale.ordinal().range(hu)},Ko.scale.category20=function(){return Ko.scale.ordinal().range(pu)},Ko.scale.category20b=function(){return Ko.scale.ordinal().range(mu)},Ko.scale.category20c=function(){return Ko.scale.ordinal().range(vu)};var hu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(fe),pu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(fe),mu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(fe),vu=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(fe);Ko.scale.quantile=function(){return Ji([],[])},Ko.scale.quantize=function(){return Zi(0,1,[0,1])},Ko.scale.threshold=function(){return eo([.5],[0,1])},Ko.scale.identity=function(){return to([0,1])},Ko.svg={},Ko.svg.arc=function(){function e(){var e=t.apply(this,arguments),o=n.apply(this,arguments),a=r.apply(this,arguments)+gu,s=i.apply(this,arguments)+gu,u=(s<a&&(u=a,a=s,s=u),s-a),l=u<Ca?"0":"1",c=Math.cos(a),d=Math.sin(a),f=Math.cos(s),h=Math.sin(s);return u>=yu?e?"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+-e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"Z":e?"M"+o*c+","+o*d+"A"+o+","+o+" 0 "+l+",1 "+o*f+","+o*h+"L"+e*f
99+","+e*h+"A"+e+","+e+" 0 "+l+",0 "+e*c+","+e*d+"Z":"M"+o*c+","+o*d+"A"+o+","+o+" 0 "+l+",1 "+o*f+","+o*h+"L0,0Z"}var t=no,n=ro,r=io,i=oo;return e.innerRadius=function(n){return arguments.length?(t=xe(n),e):t},e.outerRadius=function(t){return arguments.length?(n=xe(t),e):n},e.startAngle=function(t){return arguments.length?(r=xe(t),e):r},e.endAngle=function(t){return arguments.length?(i=xe(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,o=(r.apply(this,arguments)+i.apply(this,arguments))/2+gu;return[Math.cos(o)*e,Math.sin(o)*e]},e};var gu=-Sa,yu=ka-ja;Ko.svg.line=function(){return ao(we)};var bu=Ko.map({linear:so,"linear-closed":uo,step:lo,"step-before":co,"step-after":fo,basis:yo,"basis-open":bo,"basis-closed":_o,bundle:xo,cardinal:mo,"cardinal-open":ho,"cardinal-closed":po,monotone:Eo});bu.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var _u=[0,2/3,1/3,0],xu=[0,1/3,2/3,0],wu=[0,1/6,2/3,1/6];Ko.svg.line.radial=function(){var e=ao(To);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},co.reverse=fo,fo.reverse=co,Ko.svg.area=function(){return Po(we)},Ko.svg.area.radial=function(){var e=Po(To);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},Ko.svg.chord=function(){function e(e,s){var u=t(this,o,e,s),l=t(this,a,e,s);return"M"+u.p0+r(u.r,u.p1,u.a1-u.a0)+(n(u,l)?i(u.r,u.p1,u.r,u.p0):i(u.r,u.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,u.r,u.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),o=s.call(e,i,r),a=u.call(e,i,r)+gu,c=l.call(e,i,r)+gu;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Ca)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=hn,a=pn,s=$o,u=io,l=oo;return e.radius=function(t){return arguments.length?(s=xe(t),e):s},e.source=function(t){return arguments.length?(o=xe(t),e):o},e.target=function(t){return arguments.length?(a=xe(t),e):a},e.startAngle=function(t){return arguments.length?(u=xe(t),e):u},e.endAngle=function(t){return arguments.length?(l=xe(t),e):l},e},Ko.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(r))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}var t=hn,n=pn,r=No;return e.source=function(n){return arguments.length?(t=xe(n),e):t},e.target=function(t){return arguments.length?(n=xe(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},Ko.svg.diagonal.radial=function(){var e=Ko.svg.diagonal(),t=No,n=e.projection;return e.projection=function(e){return arguments.length?n(Ro(t=e)):t},e},Ko.svg.symbol=function(){function e(e,r){return(Cu.get(t.call(this,e,r))||Ao)(n.call(this,e,r))}var t=Do,n=Mo;return e.type=function(n){return arguments.length?(t=xe(n),e):t},e.size=function(t){return arguments.length?(n=xe(t),e):n},e};var Cu=Ko.map({circle:Ao,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Eu)),n=t*Eu;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/ju),n=t*ju/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/ju),n=t*ju/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});Ko.svg.symbolTypes=Cu.keys();var ku,Su,ju=Math.sqrt(3),Eu=Math.tan(30*Ta),Tu=[],Pu=0;Tu.call=ma.call,Tu.empty=ma.empty,Tu.node=ma.node,Tu.size=ma.size,Ko.transition=function(e){return arguments.length?ku?e.transition():e:ya.transition()},Ko.transition.prototype=Tu,Tu.select=function(e){var t,n,r,i=this.id,o=[];e=_(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]);for(var u=this[a],l=-1,c=u.length;++l<c;)(r=u[l])&&(n=e.call(r,r.__data__,l,a))?("__data__"in r&&(n.__data__=r.__data__),Lo(n,l,i,r.__transition__[i]),t.push(n)):t.push(null)}return Io(o,i)},Tu.selectAll=function(e){var t,n,r,i,o,a=this.id,s=[];e=x(e);for(var u=-1,l=this.length;++u<l;)for(var c=this[u],d=-1,f=c.length;++d<f;)if(r=c[d]){o=r.__transition__[a],n=e.call(r,r.__data__,d,u),s.push(t=[]);for(var h=-1,p=n.length;++h<p;)(i=n[h])&&Lo(i,h,a,o),t.push(i)}return Io(s,a)},Tu.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=R(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var a,s=0,u=(a=this[i]).length;s<u;
99s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return Io(r,this.id)},Tu.tween=function(e,t){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(e):D(this,null==t?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})},Tu.attr=function(e,t){function n(){this.removeAttribute(s)}function r(){this.removeAttributeNS(s.space,s.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(s);return n!==e&&(t=a(n,e),function(e){this.setAttribute(s,t(e))})})}function o(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(s.space,s.local);return n!==e&&(t=a(n,e),function(e){this.setAttributeNS(s.space,s.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var a="transform"==e?Ar:fr,s=Ko.ns.qualify(e);return Oo(this,"attr."+e,t,s.local?o:i)},Tu.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=Ko.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Tu.style=function(e,t,n){function r(){this.style.removeProperty(e)}function i(t){return null==t?r:(t+="",function(){var r,i=Jo.getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=fr(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var o=arguments.length;if(o<3){if("string"!=typeof e){for(n in o<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}return Oo(this,"style."+e,t,i)},Tu.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,Jo.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},Tu.text=function(e){return Oo(this,"text",e,Fo)},Tu.remove=function(){return this.each("end.transition",function(){var e;this.__transition__.count<2&&(e=this.parentNode)&&e.removeChild(this)})},Tu.ease=function(e){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof e&&(e=Ko.ease.apply(Ko,arguments)),D(this,function(n){n.__transition__[t].ease=e}))},Tu.delay=function(e){var t=this.id;return D(this,"function"==typeof e?function(n,r,i){n.__transition__[t].delay=+e.call(n,n.__data__,r,i)}:(e=+e,function(n){n.__transition__[t].delay=e}))},Tu.duration=function(e){var t=this.id;return D(this,"function"==typeof e?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i))}:(e=Math.max(1,e),function(n){n.__transition__[t].duration=e}))},Tu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=Su,i=ku;ku=n,D(this,function(t,r,i){Su=t.__transition__[n],e.call(t,t.__data__,r,i)}),Su=r,ku=i}else D(this,function(r){var i=r.__transition__[n];(i.event||(i.event=Ko.dispatch("start","end"))).on(e,t)});return this},Tu.transition=function(){for(var e,t,n,r=this.id,i=++Pu,o=[],a=0,s=this.length;a<s;a++){o.push(e=[]);for(var u,l=0,c=(u=this[a]).length;l<c;l++)(t=u[l])&&((n=Object.create(t.__transition__[r])).delay+=n.duration,Lo(t,l,i,n)),e.push(t)}return Io(o,i)},Ko.svg.axis=function(){function e(e){e.each(function(){var e,l=Ko.select(this),c=this.__chart__||n,d=this.__chart__=n.copy(),f=null==u?d.ticks?d.ticks.apply(d,s):d.domain():u,h=null==t?d.tickFormat?d.tickFormat.apply(d,s):we:t,p=l.selectAll(".tick").data(f,d),m=p.enter().insert("g",".domain").attr("class","tick").style("opacity",ja),v=Ko.transition(p.exit()).style("opacity",ja).remove(),g=Ko.transition(p).style("opacity",1),y=Ai(d),b=l.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),Ko.transition(b));m.append("line"),m.append("text");var x=m.select("line"),w=g.select("line"),C=p.select("text").text(h),k=m.select("text"),S=g.select("text");switch(r){case"bottom":e=Ho,x.attr("y2",i),k.attr("y",Math.max(i,0)+a),w.attr("x2",0).attr("y2",i),S.attr("x",0).attr("y",Math.max(i,0)+a),C.attr("dy",".71em").style("text-anchor","middle"),_.attr("d","M"+y[0]+","+o+"V0H"+y[1]+"V"+o);break;case"top":e=Ho,x.attr("y2",-i),k.attr("y",-(Math.max(i,0)+a)),w.attr("x2",0).attr("y2",-i),S.attr("x",0).attr("y",-(Math.max(i,0)+a)),C.attr("dy","0em").style("text-anchor","middle"),_.attr("d","M"+y[0]+","+-o+"V0H"+y[1]+"V"+-o);break;
99case"left":e=Bo,x.attr("x2",-i),k.attr("x",-(Math.max(i,0)+a)),w.attr("x2",-i).attr("y2",0),S.attr("x",-(Math.max(i,0)+a)).attr("y",0),C.attr("dy",".32em").style("text-anchor","end"),_.attr("d","M"+-o+","+y[0]+"H0V"+y[1]+"H"+-o);break;case"right":e=Bo,x.attr("x2",i),k.attr("x",Math.max(i,0)+a),w.attr("x2",i).attr("y2",0),S.attr("x",Math.max(i,0)+a).attr("y",0),C.attr("dy",".32em").style("text-anchor","start"),_.attr("d","M"+o+","+y[0]+"H0V"+y[1]+"H"+o)}if(d.rangeBand){var j=d,E=j.rangeBand()/2;c=d=function(e){return j(e)+E}}else c.rangeBand?c=d:v.call(e,d);m.call(e,c),g.call(e,d)})}var t,n=Ko.scale.linear(),r=$u,i=6,o=6,a=3,s=[10],u=null;return e.scale=function(t){return arguments.length?(n=t,e):n},e.orient=function(t){return arguments.length?(r=t in Nu?t+"":$u,e):r},e.ticks=function(){return arguments.length?(s=arguments,e):s},e.tickValues=function(t){return arguments.length?(u=t,e):u},e.tickFormat=function(n){return arguments.length?(t=n,e):t},e.tickSize=function(t){var n=arguments.length;return n?(i=+t,o=+arguments[n-1],e):i},e.innerTickSize=function(t){return arguments.length?(i=+t,e):i},e.outerTickSize=function(t){return arguments.length?(o=+t,e):o},e.tickPadding=function(t){return arguments.length?(a=+t,e):a},e.tickSubdivide=function(){return arguments.length&&e},e};var $u="bottom",Nu={top:1,right:1,bottom:1,left:1};Ko.svg.brush=function(){function e(o){o.each(function(){var o=Ko.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),a=o.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var s=o.selectAll(".resize").data(p,we);s.exit().remove(),s.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Ru[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),s.style("display",e.empty()?"none":null);var c,d=Ko.transition(o),f=Ko.transition(a);u&&(c=Ai(u),f.attr("x",c[0]).attr("width",c[1]-c[0]),n(d)),l&&(c=Ai(l),f.attr("y",c[0]).attr("height",c[1]-c[0]),r(d)),t(d)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+c[+/e$/.test(e)]+","+d[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",c[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function r(e){e.select(".extent").attr("y",d[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function i(){function i(){32==Ko.event.keyCode&&(T||(b=null,$[0]-=c[1],$[1]-=d[1],T=2),v())}function p(){32==Ko.event.keyCode&&2==T&&($[0]+=c[1],$[1]+=d[1],T=0,v())}function m(){var e=Ko.mouse(x),i=!1;_&&(e[0]+=_[0],e[1]+=_[1]),T||(Ko.event.altKey?(b||(b=[(c[0]+c[1])/2,(d[0]+d[1])/2]),$[0]=c[+(e[0]<b[0])],$[1]=d[+(e[1]<b[1])]):b=null),j&&g(e,u,0)&&(n(k),i=!0),E&&g(e,l,1)&&(r(k),i=!0),i&&(t(k),C({type:"brush",mode:T?"move":"resize"}))}function g(e,t,n){var r,i,s=Ai(t),u=s[0],l=s[1],p=$[n],m=n?d:c,v=m[1]-m[0];if(T&&(u-=p,l-=v+p),r=(n?h:f)?Math.max(u,Math.min(l,e[n])):e[n],T?i=(r+=p)+v:(b&&(p=Math.max(u,Math.min(l,2*b[n]-r))),p<r?(i=r,r=p):i=p),m[0]!=r||m[1]!=i)return n?a=null:o=null,m[0]=r,m[1]=i,!0}function y(){m(),k.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),Ko.select("body").style("cursor",null),N.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),P(),C({type:"brushend"})}var b,_,x=this,w=Ko.select(Ko.event.target),C=s.of(x,arguments),k=Ko.select(x),S=w.datum(),j=!/^(n|
99s)$/.test(S)&&u,E=!/^(e|w)$/.test(S)&&l,T=w.classed("extent"),P=B(),$=Ko.mouse(x),N=Ko.select(Jo).on("keydown.brush",i).on("keyup.brush",p);if(Ko.event.changedTouches?N.on("touchmove.brush",m).on("touchend.brush",y):N.on("mousemove.brush",m).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),T)$[0]=c[0]-$[0],$[1]=d[0]-$[1];else if(S){var R=+/w$/.test(S),M=+/^n/.test(S);_=[c[1-R]-$[0],d[1-M]-$[1]],$[0]=c[R],$[1]=d[M]}else Ko.event.altKey&&(b=$.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),Ko.select("body").style("cursor",w.style("cursor")),C({type:"brushstart"}),m()}var o,a,s=y(e,"brushstart","brush","brushend"),u=null,l=null,c=[0,0],d=[0,0],f=!0,h=!0,p=Mu[0];return e.event=function(e){e.each(function(){var e=s.of(this,arguments),t={x:c,y:d,i:o,j:a},n=this.__chart__||t;this.__chart__=t,ku?Ko.select(this).transition().each("start.brush",function(){o=n.i,a=n.j,c=n.x,d=n.y,e({type:"brushstart"})}).tween("brush:brush",function(){var n=hr(c,t.x),r=hr(d,t.y);return o=a=null,function(i){c=t.x=n(i),d=t.y=r(i),e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,e({type:"brush",mode:"resize"}),e({type:"brushend"})}):(e({type:"brushstart"}),e({type:"brush",mode:"resize"}),e({type:"brushend"}))})},e.x=function(t){return arguments.length?(p=Mu[!(u=t)<<1|!l],e):u},e.y=function(t){return arguments.length?(p=Mu[!u<<1|!(l=t)],e):l},e.clamp=function(t){return arguments.length?(u&&l?(f=!!t[0],h=!!t[1]):u?f=!!t:l&&(h=!!t),e):u&&l?[f,h]:u?f:l?h:null},e.extent=function(t){var n,r,i,s,f;return arguments.length?(u&&(n=t[0],r=t[1],l&&(n=n[0],r=r[0]),o=[n,r],u.invert&&(n=u(n),r=u(r)),r<n&&(f=n,n=r,r=f),n==c[0]&&r==c[1]||(c=[n,r])),l&&(i=t[0],s=t[1],u&&(i=i[1],s=s[1]),a=[i,s],l.invert&&(i=l(i),s=l(s)),s<i&&(f=i,i=s,s=f), 100i==d[0]&&s==d[1]||(d=[i,s])),e):(u&&(o?(n=o[0],r=o[1]):(n=c[0],r=c[1],u.invert&&(n=u.invert(n),r=u.invert(r)),r<n&&(f=n,n=r,r=f))),l&&(a?(i=a[0],s=a[1]):(i=d[0],s=d[1],l.invert&&(i=l.invert(i),s=l.invert(s)),s<i&&(f=i,i=s,s=f))),u&&l?[[n,i],[r,s]]:u?[n,r]:l&&[i,s])},e.clear=function(){return e.empty()||(c=[0,0],d=[0,0],o=a=null),e},e.empty=function(){return!!u&&c[0]==c[1]||!!l&&d[0]==d[1]},Ko.rebind(e,s,"on")};var Ru={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Mu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Du=es.format=as.timeFormat,Au=Du.utc,Iu=Au("%Y-%m-%dT%H:%M:%S.%LZ");Du.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Uo:Iu,Uo.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Uo.toString=Iu.toString,es.second=De(function(e){return new ts(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()}),es.seconds=es.second.range,es.seconds.utc=es.second.utc.range,es.minute=De(function(e){return new ts(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()}),es.minutes=es.minute.range,es.minutes.utc=es.minute.utc.range,es.hour=De(function(e){var t=e.getTimezoneOffset()/60;return new ts(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()}),es.hours=es.hour.range,es.hours.utc=es.hour.utc.range,es.month=De(function(e){return(e=es.day(e)).setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),es.months=es.month.range,es.months.utc=es.month.utc.range;var Ou=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Fu=[[es.second,1],[es.second,5],[es.second,15],[es.second,30],[es.minute,1],[es.minute,5],[es.minute,15],[es.minute,30],[es.hour,1],[es.hour,3],[es.hour,6],[es.hour,12],[es.day,1],[es.day,2],[es.week,1],[es.month,1],[es.month,3],[es.year,1]],Lu=Du.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",wt]]),Hu={range:function(e,t,n){return Ko.range(+e,+t,n).map(zo)},floor:we,ceil:we};Fu.year=es.year,es.scale=function(){return qo(Ko.scale.linear(),Fu,Lu)};var Bu=Fu.map(function(e){return[e[0].utc,e[1]]}),Uu=Au.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",wt]]);Bu.year=es.year.utc,es.scale.utc=function(){return qo(Ko.scale.linear(),Bu,Uu)},Ko.text=Ce(function(e){return e.responseText}),Ko.json=function(e,t){return ke(e,"application/json",Wo,t)},Ko.html=function(e,t){return ke(e,"text/html",Vo,t)},Ko.xml=Ce(function(e){return e.responseXML}),"function"==typeof define&&define.amd?define(Ko):"object"==typeof module&&module.exports?module.exports=Ko:this.d3=Ko}(); 101/* 102 * Copyright 2011 Twitter, Inc. 103 * Licensed under the Apache License, Version 2.0 (the "License");
104 * you may not use this file except in compliance with the License. 105 * You may obtain a copy of the License at 106 * 107 * http://www.apache.org/licenses/LICENSE-2.0 108 * 109 * Unless required by applicable law or agreed to in writing, software 110 * distributed under the License is distributed on an "AS IS" BASIS, 111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 112 * See the License for the specific language governing permissions and 113 * limitations under the License. 114 */ 115var Hogan={};!function(e,t){function n(e){return String(null===e||e===undefined?"":e)}function r(e){return e=n(e),l.test(e)?e.replace(i,"&").replace(o,"<").replace(a,">").replace(s,"'").replace(u,"""):e}e.Template=function(e,n,r,i){this.r=e||this.r,this.c=r,this.options=i,this.text=n||"",this.buf=t?[]:""},e.Template.prototype={r:function(){return""},v:r,t:n,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},rp:function(e,t,n,r){var i=n[e];return i?(this.c&&"string"==typeof i&&(i=this.c.compile(i,this.options)),i.ri(t,n,r)):""},rs:function(e,t,n){var r=e[e.length-1];if(c(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,o,a){var s;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ls(e,t,n,r,i,o,a)),s=""===e||!!e,!r&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,t,n,r){var i=e.split("."),o=this.f(i[0],t,n,r),a=null;if("."===e&&c(t[t.length-2]))return t[t.length-1];for(var s=1;s<i.length;s++)o&&"object"==typeof o&&i[s]in o?(a=o,o=o[i[s]]):o="";return!(r&&!o)&&(r||"function"!=typeof o||(t.push(a),o=this.lv(o,t,n),t.pop()),o)},f:function(e,t,n,r){for(var i=!1,o=null,a=!1,s=t.length-1;s>=0;s--)if((o=t[s])&&"object"==typeof o&&e in o){i=o[e],a=!0;break}return a?(r||"function"!=typeof i||(i=this.lv(i,t,n)),i):!r&&""},ho:function(e,t,n,r,i){var o=this.c,a=this.options;return a.delimiters=i,r=null==(r=e.call(t,r))?String(r):r.toString(),this.b(o.compile(r,a).render(t,n)),!1},b:t?function(e){this.buf.push(e)}:function(e){this.buf+=e},fl:t?function(){var e=this.buf.join("");return this.buf=[],e}:function(){var e=this.buf;return this.buf="",e},ls:function(e,t,n,r,i,o,a){var s=t[t.length-1],u=null;if(!r&&this.c&&e.length>0)return this.ho(e,s,n,this.text.substring(i,o),a);if("function"==typeof(u=e.call(s))){if(r)return!0;if(this.c)return this.ho(u,s,n,this.text.substring(i,o),a)}return u},lv:function(e,t,r){var i=t[t.length-1],o=e.call(i);return"function"==typeof o&&(o=n(o.call(i)),this.c&&~o.indexOf("{{"))?this.c.compile(o,this.options).render(i,r):n(o)}};var i=/&/g,o=/</g,a=/>/g,s=/\'/g,u=/\"/g,l=/[&<>\"\']/,c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}("undefined"!=typeof exports?exports:Hogan),function(e){function t(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function n(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function r(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}function i(e,t,n,r){for(var s=[],u=null,l=null;e.length>0;)if("#"==(l=e.shift()).tag||"^"==l.tag||o(l,r))n.push(l),l.nodes=i(e,l.tag,n,r),s.push(l);else{if("/"==l.tag){if(0===n.length)throw new Error("Closing tag without opener: /"+l.n);if(u=n.pop(),l.n!=u.n&&!a(l.n,u.n,r))throw new Error("Nesting error: "+u.n+" vs. "+l.n);return u.end=l.i,s}s.push(l)}if(n.length>0)throw new Error("missing closing tag: "+n.pop().n);return s}function o(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function a(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return!0}function s(e){return e.replace(_,"\\\\").replace(g,'\\"').replace(y,"\\n").replace(b,"\\r")}function u(e){return~e.indexOf(".")?"d":"f"}function l(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n].tag;"#"==i?t+=c(e[n].nodes,e[n].n,u(e[n].n),e[n].i,e[n].end,e[n].otag+" "+e[n].ctag):"^"==i?t+=d(e[n].nodes,e[n].n,u(e[n].n)):"<"==i||">"==i?t+=f(e[n]):"{"==i||"&"==i?t+=h(e[n].n,u(e[n].n)):"\n"==i?t+=m('"\\n"'+(e.length-1==n?"":" + i")):"_v"==i?t+=p(e[n].n,u(e[n].n)):i===undefined&&(t+=m('"'+s(e[n])+'"'))}return t}function c(e,t,n,r,i,o){return"if(_.s(_."+n+'("'+s(t)+'",c,p,1),c,p,0,'+r+","+i+',"'+o+'")){_.rs(c,p,function(c,p,_){'+l(e)+"});c.pop();}"}function d(e,t,n){return"if(!_.s(_."+n+'("'+s(t)+'",c,p,1),c,p,1,0,0,"")){'+l(e)+"};"}function f(e){return'_.b(_.rp("'+s(e.n)+'",c,p,"'+(e.indent||"")+'"));'}function h(e,t){return"_.b(_.t(_."+t+'("'+s(e)+'",c,p,0)));'}function p(e,t){return"_.b(_.v(_."+t+'("'+s(e)+'",c,p,0)));'}function m(e){return"_.b("+e+");"}var v=/\S/,g=/\"/g,y=/\n/g,b=/\r/g,_=/\\/g,x={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};e.scan=function(e,i){function o(){g.length>0&&(y.push(new String(g)),g="")}function a(){for(var e=!0,t=w;t<y.length;t++)if(!(e=y[t].tag&&x[y[t].tag]<x._v||!y[t].tag&&null===y[t].match(v)))return!1;return e}function s(e,t){if(o(),e&&a())for(var n,r=w;r<y.length;r++)y[r].tag||((n=y[r+1])&&">"==n.tag&&(n.indent=y[r].toString()),y.splice(r,1));else t||y.push({tag:"\n"});b=!1,w=y.length}function u(e,t){var r="="+k,i=e.indexOf(r,t),o=n(e.substring(e.indexOf("=",t)+1,i)).split(" ");return C=o[0],k=o[1],i+r.length-1}var l=e.length,c=0,d=1,f=2,h=c,p=null,m=null,g="",y=[],b=!1,_=0,w=0,C="{{",k="}}";for(i&&(i=i.split(" "),C=i[0],k=i[1]),_=0;_<l;_++)h==c?r(C,e,_)?(--_,o(),h=d):"\n"==e.charAt(_)?s(b):g+=e.charAt(_):h==d?(_+=C.length-1,"="==(p=(m=x[e.charAt(_+1)])?e.charAt(_+1):"_v")?(_=u(e,_),h=c):(m&&_++,h=f),b=_):r(k,e,_)?(y.push({tag:p,n:n(g),otag:C,ctag:k,i:"/"==p?b-k.length:_+C.length}),g="",_+=k.length-1,h=c,"{"==p&&("}}"==k?_++:t(y[y.length-1]))):g+=e.charAt(_);return s(b,!0),y},e.generate=function(t,n,r){var i='var _=this;_.b(i=i||"");'+l(t)+"return _.fl();";return r.asString?"function(c,p,i){"+i+";}
115":new e.Template(new Function("c","p","i",i),n,e,r)},e.parse=function(e,t,n){return i(e,"",[],(n=n||{}).sectionTags||[])},e.cache={},e.compile=function(e,t){var n=e+"||"+!!(t=t||{}).asString,r=this.cache[n];return r||(r=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t),this.cache[n]=r)}}("undefined"!=typeof exports?exports:Hogan), 116/** 117 * Intro.js v0.6.0 118 * https://github.com/usablica/intro.js 119 * MIT licensed 120 * 121 * Copyright (C) 2013 usabli.ca - A weekend project by Afshin Mehrabani (@afshinmeh) 122 */ 123function(e,t){"object"==typeof exports?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e)}(this,function(e){function t(e){this._targetElement=e,this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0}}function n(e){var t=[],n=this;if(this._options.steps)for(var r=[],s=0,l=this._options.steps.length;s<l;s++){var c=this._options.steps[s];c.step=s+1,"string"==typeof c.element&&(c.element=document.querySelector(c.element)),t.push(c)}else{if((r=e.querySelectorAll("*[data-intro]")).length<1)return!1;s=0;for(var d=r.length;s<d;s++){var f=r[s],p=parseInt(f.getAttribute("data-step"),10);p>0&&(t[p-1]={element:f,intro:f.getAttribute("data-intro"),step:parseInt(f.getAttribute("data-step"),10),tooltipClass:f.getAttribute("data-tooltipClass"),position:f.getAttribute("data-position")||this._options.tooltipPosition})}var m=0;for(s=0,d=r.length;s<d;s++){if(null==(f=r[s]).getAttribute("data-step")){for(;"undefined"!=typeof t[m];)m++;t[m]={element:f,intro:f.getAttribute("data-intro"),step:m+1,tooltipClass:f.getAttribute("data-tooltipClass"),position:f.getAttribute("data-position")||this._options.tooltipPosition}}}}for(var v=[],g=0;g<t.length;g++)t[g]&&v.push(t[g]);if((t=v).sort(function(e,t){return e.step-t.step}),n._introItems=t,h.call(n,e)){i.call(n);e.querySelector(".introjs-skipbutton"),e.querySelector(".introjs-nextbutton");n._onKeyDown=function(t){27===t.keyCode&&1==n._options.exitOnEsc?(a.call(n,e),n._introExitCallback!=undefined&&n._introExitCallback.call(n)):37===t.keyCode?o.call(n):39!==t.keyCode&&13!==t.keyCode||(i.call(n),t.preventDefault?t.preventDefault():t.returnValue=!1)},n._onResize=function(){u.call(n,document.querySelector(".introjs-helperLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",n._onKeyDown,!0),window.addEventListener("resize",n._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",n._onKeyDown),document.attachEvent("onresize",n._onResize))}return!1}function r(e){this._currentStep=e-2,"undefined"!=typeof this._introItems&&i.call(this)}function i(){if("undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)return"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void a.call(this,this._targetElement);var e=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,e.element),l.call(this,e)}function o(){if(0===this._currentStep)return!1;var e=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,e.element),l.call(this,e)}function a(e){var t=e.querySelector(".introjs-overlay");t.style.opacity=0,setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},500);var n=e.querySelector(".introjs-helperLayer");n&&n.parentNode.removeChild(n);var r=document.querySelector(".introjs-showElement");r&&(r.className=r.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""));var i=document.querySelectorAll(".introjs-fixParent");if(i&&i.length>0)for(var o=i.length-1;o>=0;o--)i[o].className=i[o].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=undefined}function s(e,t,n){if(t.style.top=null,t.style.right=null,t.style.bottom=null,t.style.left=null,this._introItems[this._currentStep]){var r="",i=this._introItems[this._currentStep];r="string"==typeof i.tooltipClass?i.tooltipClass:this._options.tooltipClass,t.className=("introjs-tooltip "+r).replace(/^\s+|\s+$/g,"");r=this._options.tooltipClass;switch(this._introItems[this._currentStep].position){case"top":t.style.left="15px",t.style.top="-"+(p(t).height+10)+"px",n.className="introjs-arrow bottom";break;case"right":t.style.left=p(e).width+20+"px",n.className="introjs-arrow left";break;
123case"left":t.style.top="15px",t.style.right=p(e).width+20+"px",n.className="introjs-arrow right";break;case"bottom":default:t.style.bottom="-"+(p(t).height+10)+"px",n.className="introjs-arrow top"}}}function u(e){if(e){if(!this._introItems[this._currentStep])return;var t=p(this._introItems[this._currentStep].element);e.setAttribute("style","width: "+(t.width+10)+"px; height:"+(t.height+10)+"px; top:"+(t.top-5)+"px;left: "+(t.left-5)+"px;")}}function l(e){"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,e.element);var t=this,n=document.querySelector(".introjs-helperLayer");p(e.element);if(null!=n){var r=n.querySelector(".introjs-helperNumberLayer"),l=n.querySelector(".introjs-tooltiptext"),h=n.querySelector(".introjs-arrow"),m=n.querySelector(".introjs-tooltip"),v=n.querySelector(".introjs-skipbutton"),g=n.querySelector(".introjs-prevbutton"),y=n.querySelector(".introjs-nextbutton");m.style.opacity=0,u.call(t,n);var b=document.querySelectorAll(".introjs-fixParent");if(b&&b.length>0)for(var _=b.length-1;_>=0;_--)b[_].className=b[_].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");var x=document.querySelector(".introjs-showElement");x.className=x.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),t._lastShowElementTimer&&clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=setTimeout(function(){null!=r&&(r.innerHTML=e.step),l.innerHTML=e.intro,s.call(t,e.element,m,h),n.querySelector(".introjs-bullets li > a.active").className="",n.querySelector('.introjs-bullets li > a[data-stepnumber="'+e.step+'"]').className="active",m.style.opacity=1},350)}else{var w=document.createElement("div"),C=document.createElement("div"),k=document.createElement("div"),S=document.createElement("div"),j=document.createElement("div"),E=document.createElement("div");w.className="introjs-helperLayer",u.call(t,w),this._targetElement.appendChild(w),C.className="introjs-arrow",S.className="introjs-tooltiptext",S.innerHTML=e.intro,j.className="introjs-bullets",!1===this._options.showBullets&&(j.style.display="none");for(var T=document.createElement("ul"),P=(_=0,this._introItems.length);_<P;_++){var $=document.createElement("li"),N=document.createElement("a");N.onclick=function(){t.goToStep(this.getAttribute("data-stepnumber"))},0===_&&(N.className="active"),N.href="javascript:void(0);",N.innerHTML=" ",N.setAttribute("data-stepnumber",this._introItems[_].step),$.appendChild(N),T.appendChild($)}if(j.appendChild(T),E.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(E.style.display="none"),k.className="introjs-tooltip",k.appendChild(S),k.appendChild(j),1==this._options.showStepNumbers){var R=document.createElement("span");R.className="introjs-helperNumberLayer",R.innerHTML=e.step,w.appendChild(R)}k.appendChild(C),w.appendChild(k),(y=document.createElement("a")).onclick=function(){t._introItems.length-1!=t._currentStep&&i.call(t)},y.href="javascript:void(0);",y.innerHTML=this._options.nextLabel,(g=document.createElement("a")).onclick=function(){0!=t._currentStep&&o.call(t)},g.href="javascript:void(0);",g.innerHTML=this._options.prevLabel,(v=document.createElement("a")).className="introjs-button introjs-skipbutton",v.href="javascript:void(0);",v.innerHTML=this._options.skipLabel,v.onclick=function(){t._introItems.length-1==t._currentStep&&"function"==typeof t._introCompleteCallback&&t._introCompleteCallback.call(t),t._introItems.length-1!=t._currentStep&&"function"==typeof t._introExitCallback&&t._introExitCallback.call(t),a.call(t,t._targetElement)},E.appendChild(v),this._introItems.length>1&&(E.appendChild(g),E.appendChild(y)),k.appendChild(E),s.call(t,e.element,k,C)}0==this._currentStep?(g.className="introjs-button introjs-prevbutton introjs-disabled",y.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep?(v.innerHTML=this._options.doneLabel,g.className="introjs-button introjs-prevbutton",y.className="introjs-button introjs-nextbutton introjs-disabled"):(g.className="introjs-button introjs-prevbutton",y.className="introjs-button introjs-nextbutton",v.innerHTML=this._options.skipLabel),y.focus(),e.element.className+=" introjs-showElement";var M=c(e.element,"position");"absolute"!==M&&"relative"!==M&&(e.element.className+=" introjs-relativePosition");for(var D=e.element.parentNode;null!=D&&"body"!==D.tagName.toLowerCase();){var A=c(D,"z-index");/[0-9]+/.test(A)&&(D.className+=" introjs-fixParent"),D=D.parentNode}if(!f(e.element)){var I=e.element.getBoundingClientRect(),O=d().height,F=I.bottom-(I.bottom-I.top),L=I.bottom-O;F<0||e.element.clientHeight>O?window.scrollBy(0,F-30):window.scrollBy(0,L+100)}}function c(e,t){var n="";return e.currentStyle?n=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function d(){if(window.innerWidth!=undefined)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function f(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}function h(e){var t=document.createElement("div"),n="",r=this;if(t.className="introjs-overlay","body"===e.tagName.toLowerCase())n+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",t.setAttribute("style",n);else{var i=p(e);i&&(n+="width: "+i.width+"px; height:"+i.height+"px; top:"+i.top+"px;left: "+i.left+"px;",t.setAttribute("style",n))}return e.appendChild(t),t.onclick=function(){1==r._options.exitOnOverlayClick&&(a.call(r,e),r._introExitCallback!=undefined&&r._introExitCallback.call(r))},setTimeout(function(){n+="opacity: .8;",t.setAttribute("style",n)},10),!0}function p(e){var t={};t.width=e.offsetWidth,t.height=e.offsetHeight;for(var n=0,r=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return t.top=r,t.left=n,t}function m(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}var v="0.6.0",g=function(e){if("object"==typeof e)return new t(e);if("string"==typeof e){var n=document.querySelector(e);
123if(n)return new t(n);throw new Error("There is no element with given selector.")}return new t(document.body)};return g.version=v,g.fn=t.prototype={clone:function(){return new t(this)},setOption:function(e,t){return this._options[e]=t,this},setOptions:function(e){return this._options=m(this._options,e),this},start:function(){return n.call(this,this._targetElement),this},goToStep:function(e){return r.call(this,e),this},exit:function(){a.call(this,this._targetElement)},refresh:function(){return u.call(this,document.querySelector(".introjs-helperLayer")),this},onbeforechange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},onchange:function(e){if("function"!=typeof e)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},oncomplete:function(e){if("function"!=typeof e)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},onexit:function(e){if("function"!=typeof e)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this}},e.introJs=g,g}), 124/*! jQuery UI - v1.10.4 - 2014-02-20 125* http://jqueryui.com 126* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js 127* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ 128function(e,t){function n(t,n){var i,o,a,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&(!!(a=e("img[usemap=#"+o+"]")[0])&&r(a))):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i,o,a=0,s=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:(i=e.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):i.apply(this,arguments)}),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,o=e(this[0]);o.length&&o[0]!==document;){if(("absolute"===(r=o.css("position"))||"relative"===r||"fixed"===r)&&(i=parseInt(o.css("zIndex"),10),!isNaN(i)&&0!==i))return i;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),i&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var o="Width"===r?["Left","Right"]:["Top","Bottom"],a=r.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?s["inner"+r].call(this):this.each(function(){e(this).css(a,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return"number"!=typeof t?s["outer"+r].call(this,t):this.each(function(){e(this).css(a,i(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=(o=e.fn.removeData,function(t){return arguments.length?o.call(this,e.camelCase(t)):o.call(this)})),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r)o.plugins[i]=o.plugins[i]||[],o.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;return t[r]>0||(t[r]=1,i=t[r]>0,t[r]=0,i)}})}(jQuery),function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)},e.widget=function(t,n,r){var i,o,a,s,u={},l=t.split(".")[0];t=t.split(".")[1],i=l+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[l]=e[l]||{},o=e[l][t],a=e[l][t]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(r,function(t,r){var i,o;e.isFunction(r)?u[t]=(i=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}):u[t]=r}),a.prototype=e.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||t},u,{constructor:a,namespace:l,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;
vendor: 6,188 bytes, line 128
128e.widget(r.namespace+"."+r.widgetName,a,n._proto)}),delete o._childConstructors):n._childConstructors.push(a),e.widget.bridge(t,a)},e.widget.extend=function(n){for(var i,o,a=r.call(arguments,1),s=0,u=a.length;s<u;s++)for(i in a[s])o=a[s][i],a[s].hasOwnProperty(i)&&o!==t&&(e.isPlainObject(o)?n[i]=e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):n[i]=o);return n},e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(a){var s="string"==typeof a,u=r.call(arguments,1),l=this;return a=!s&&u.length?e.widget.extend.apply(null,[a].concat(u)):a,s?this.each(function(){var r,i=e.data(this,o);return i?e.isFunction(i[a])&&"_"!==a.charAt(0)?(r=i[a].apply(i,u))!==i&&r!==t?(l=r&&r.jquery?l.pushStack(r.get()):r,!1):void 0:e.error("no such method '"+a+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+a+"'")}):this.each(function(){var t=e.data(this,o);t?t.option(a||{})._init():e.data(this,o,new i(a,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,o,a,s=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(s={},n=(i=n.split(".")).shift(),i.length){for(o=s[n]=e.widget.extend({},this.options[n]),a=0;a<i.length-1;a++)o[i[a]]=o[i[a]]||{},o=o[i[a]];if(n=i.pop(),1===arguments.length)return o[n]===t?null:o[n];o[n]=r}else{if(1===arguments.length)return this.options[n]===t?null:this.options[n];s[n]=r}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,a){function s(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var u=r.match(/^(\w+)\s*(.*)$/),l=u[1]+o.eventNamespace,c=u[2];c?i.delegate(c,l,s):n.bind(l,s)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,a=this.options[t];if(r=r||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(e.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var a,s=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})&&(i={duration:i}),a=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&e.effects&&e.effects.effect[s]?r[t](i):s!==t&&r[s]?r[s](i.duration,i.easing,o):r.queue(function(n){e(this)[t](),o&&o.call(r[0]),n()})}})}(jQuery),function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,o=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&e(n.target).closest(this.options.cancel).length;
vendor: 11,671 bytes, line 128
128return!(i&&!o&&this._mouseCapture(n))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0))}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(e){function t(e,t,n){return e>t&&e<t+n}function n(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===e.axis||n(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){"disabled"===t?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=null,i=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o)return r=e(this),!1}),e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target)),!!r&&(!(this.options.handle&&!n&&(e(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(i=!0)}),!i))&&(this.currentItem=r,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,r){var i,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=e("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,r,i,o,a=this.options,s=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+a.scrollSpeed:t.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+a.scrollSpeed:t.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(t.pageY-e(document).scrollTop()<a.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-a.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<a.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+a.scrollSpeed)),t.pageX-e(document).scrollLeft()<a.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-a.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<a.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+a.scrollSpeed))),!1!==s&&e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=(r=this.items[n]).item[0],(o=this._intersectsWithPointer(r))&&r.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===i||e.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],i))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,a=o+e.width,s=e.top,u=s+e.height,l=this.offset.click.top,c=this.offset.click.left,d="x"===this.options.axis||r+l>s&&r+l<u,f="y"===this.options.axis||t+c>o&&t+c<a,h=d&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<a&&s<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<u},_intersectsWithPointer:function(e){var n="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=n&&r,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return!!i&&(this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1))},_intersectsWithSides:function(e){var n=t(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),r=t(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&r||"left"===o&&!r:i&&("down"===i&&n||"up"===i&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;
128return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){s.push(this)}var r,i,o,a,s=[],u=[],l=this._connectWith();if(l&&t)for(r=l.length-1;r>=0;r--)for(i=(o=e(l[r])).length-1;i>=0;i--)(a=e.data(o[i],this.widgetFullName))&&a!==this&&!a.options.disabled&&u.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(u.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=u.length-1;r>=0;r--)u[r][0].each(n);return e(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var n,r,i,o,a,s,u,l,c=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(n=f.length-1;n>=0;n--)for(r=(i=e(f[n])).length-1;r>=0;r--)(o=e.data(i[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&(d.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=d.length-1;n>=0;n--)for(a=d[n][1],r=0,l=(s=d[n][0]).length;r<l;r++)(u=e(s[r])).data(this.widgetName+"-item",a),c.push({item:u,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var n,r,i,o;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),n=this.items.length-1;n>=0;n--)(r=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item,t||(r.width=i.outerWidth(),r.height=i.outerHeight()),o=i.offset(),r.left=o.left,r.top=o.top);
128if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,r=(t=t||this).options;r.placeholder&&r.placeholder.constructor!==String||(n=r.placeholder,r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===r?t.currentItem.children().each(function(){e("<td> </td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}):"img"===r&&i.attr("src",t.currentItem.attr("src")),n||i.css("visibility","hidden"),i},update:function(e,i){n&&!r.forcePlaceholderSize||(i.height()||i.height(t.currentItem.innerHe
vendor: 5,242 bytes, line 128
128ight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),r.placeholder.update(t,t.placeholder)},_contactContainers:function(r){var i,o,a,s,u,l,c,d,f,h,p=null,m=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(p&&e.contains(this.containers[i].element[0],p.element[0]))continue;p=this.containers[i],m=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",r,this._uiHash(this)),this.containers[i].containerCache.over=0);if(p)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",r,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(a=1e4,s=null,u=(h=p.floating||n(this.currentItem))?"left":"top",l=h?"width":"height",c=this.positionAbs[u]+this.offset.click[u],o=this.items.length-1;o>=0;o--)e.contains(this.containers[m].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(h&&!t(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height)||(d=this.items[o].item.offset()[u],f=!1,Math.abs(d-c)>Math.abs(d+this.items[o][l]-c)&&(f=!0,d+=this.items[o][l]),Math.abs(d-c)<a&&(a=Math.abs(d-c),s=this.items[o],this.direction=f?"up":"down")));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;s?this._rearrange(r,s,null,!0):this._rearrange(r,null,this.containers[m].element,!0),this._trigger("change",r,this._uiHash()),this.containers[m]._trigger("change",r,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",r,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),r[0].style.width&&!n.forceHelperSize||r.width(this.currentItem.width()),r[0].style.height&&!n.forceHelperSize||r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=e(i.containment)[0],n=e(i.containment).offset(),r="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),
vendor: 6,706 bytes, lines 128-134
12810)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){ 129var n,r,i=this.options,o=t.pageX,a=t.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,u=/(html|body)/i.test(s[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),i.grid&&(n=this.originalPageY+Math.round((a-this.originalPageY)/i.grid[1])*i.grid[1],a=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n,r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0],o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():u?0:s.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():u?0:s.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){function n(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}this.reverting=!1;var r,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(r in this._storedCSS)"auto"!==this._storedCSS[r]&&"static"!==this._storedCSS[r]||(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(i.push(function(e){this._trigger("remove",e,this._uiHash())}),i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),r=this.containers.length-1;r>=0;r--)t||i.push(n("deactivate",this,this.containers[r])),this.containers[r].containerCache.over&&(i.push(n("out",this,this.containers[r])),this.containers[r].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}(jQuery), 130/*! jQuery UI - v1.10.4 - 2014-02-02 131* http://jqueryui.com 132* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js 133* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ 134function(e,t){function n(t,n){var i,o,a,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&(!!(a=e("img[usemap=#"+o+"]")[0])&&r(a))):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i,o,a=0,s=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:(i=e.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var r=this;setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}
134):i.apply(this,arguments)}),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,o=e(this[0]);o.length&&o[0]!==document;){if(("absolute"===(r=o.css("position"))||"relative"===r||"fixed"===r)&&(i=parseInt(o.css("zIndex"),10),!isNaN(i)&&0!==i))return i;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),i&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var o="Width"===r?["Left","Right"]:["Top","Bottom"],a=r.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?s["inner"+r].call(this):this.each(function(){e(this).css(a,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return"number"!=typeof t?s["outer"+r].call(this,t):this.each(function(){e(this).css(a,i(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=(o=e.fn.removeData,function(t){return arguments.length?o.call(this,e.camelCase(t)):o.call(this)})),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r)o.plugins[i]=o.plugins[i]||[],o.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;return t[r]>0||(t[r]=1,i=t[r]>0,t[r]=0,i)}})}(jQuery),function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)},e.widget=function(t,n,r){var i,o,a,s,u={},l=t.split(".")[0];t=t.split(".")[1],i=l+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[l]=e[l]||{},o=e[l][t],a=e[l][t]=function(e,t){if(!this._createWidget)return new a(e,t);arguments.length&&this._createWidget(e,t)},e.extend(a,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),(s=new n).options=e.widget.extend({},s.options),e.each(r,function(t,r){var i,o;e.isFunction(r)?u[t]=(i=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}):u[t]=r}),a.prototype=e.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||t},u,{constructor:a,namespace:l,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;
vendor: 8,173 bytes, line 134
134e.widget(r.namespace+"."+r.widgetName,a,n._proto)}),delete o._childConstructors):n._childConstructors.push(a),e.widget.bridge(t,a)},e.widget.extend=function(n){for(var i,o,a=r.call(arguments,1),s=0,u=a.length;s<u;s++)for(i in a[s])o=a[s][i],a[s].hasOwnProperty(i)&&o!==t&&(e.isPlainObject(o)?n[i]=e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):n[i]=o);return n},e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(a){var s="string"==typeof a,u=r.call(arguments,1),l=this;return a=!s&&u.length?e.widget.extend.apply(null,[a].concat(u)):a,s?this.each(function(){var r,i=e.data(this,o);return i?e.isFunction(i[a])&&"_"!==a.charAt(0)?(r=i[a].apply(i,u))!==i&&r!==t?(l=r&&r.jquery?l.pushStack(r.get()):r,!1):void 0:e.error("no such method '"+a+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+a+"'")}):this.each(function(){var t=e.data(this,o);t?t.option(a||{})._init():e.data(this,o,new i(a,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,o,a,s=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(s={},n=(i=n.split(".")).shift(),i.length){for(o=s[n]=e.widget.extend({},this.options[n]),a=0;a<i.length-1;a++)o[i[a]]=o[i[a]]||{},o=o[i[a]];if(n=i.pop(),1===arguments.length)return o[n]===t?null:o[n];o[n]=r}else{if(1===arguments.length)return this.options[n]===t?null:this.options[n];s[n]=r}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,a){function s(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||e.guid++);var u=r.match(/^(\w+)\s*(.*)$/),l=u[1]+o.eventNamespace,c=u[2];c?i.delegate(c,l,s):n.bind(l,s)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,a=this.options[t];if(r=r||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(e.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var a,s=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})&&(i={duration:i}),a=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&e.effects&&e.effects.effect[s]?r[t](i):s!==t&&r[s]?r[s](i.duration,i.easing,o):r.queue(function(n){e(this)[t](),o&&o.call(r[0]),n()})}})}(jQuery),function(e,t){function n(e,t,n){return[parseFloat(e[0])*(h.test(e[0])?t/100:1),parseFloat(e[1])*(h.test(e[1])?n/100:1)]}function r(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var o,a=Math.max,s=Math.abs,u=Math.round,l=/left|center|right/,c=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,f=/^\w+/,h=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var n,r,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=i.children()[0];return e("body").append(i),n=a.offsetWidth,i.css("overflow","scroll"),n===(r=a.offsetWidth)&&(r=i[0].clientWidth),i.remove(),o=n-r},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth;return{width:"scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight?e.position.scrollbarWidth():0,height:i?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);return{element:n,isWindow:r,isDocument:!!n[0]&&9===n[0].nodeType,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return p.apply(this,arguments);t=e.extend({},t);var o,h,m,v,g,y,b=e(t.of),_=e.position.getWithinInfo(t.within),x=e.position.getScrollInfo(_),w=(t.collision||"flip").split(" "),C={};return y=i(b),b[0].preventDefault&&(t.at="left top"),h=y.width,m=y.height,v=y.offset,g=e.extend({},v),e.each(["my","at"],function(){var e,n,r=(t[this]||"").split(" ");1===r.length&&(r=l.test(r[0])?r.concat(["center"]):c.test(r[0])?["center"].concat(r):["center","center"]),r[0]=l.test(r[0])?r[0]:"center",r[1]=c.test(r[1])?r[1]:"center",e=d.exec(r[0]),n=d.exec(r[1]),C[this]=[e?e[0]:0,n?n[0]:0],t[this]=[f.exec(r[0])[0],f.exec(r[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===t.at[0]?g.left+=h:"center"===t.at[0]&&(g.left+=h/2),"bottom"===t.at[1]?g.top+=m:"center"===t.at[1]&&(g.top+=m/2),o=n(C.at,h,m),g.left+=o[0],g.top+=o[1],this.each(function(){var i,l,c=e(this),d=c.outerWidth(),f=c.outerHeight(),p=r(this,"marginLeft"),y=r(this,"marginTop"),k=d+p+r(this,"marginRight")+x.width,S=f+y+r(this,"marginBottom")+x.height,j=e.extend({},g),E=n(C.my,c.outerWidth(),c.outerHeight());"right"===t.my[0]?j.left-=d:"center"===t.my[0]&&(j.left-=d/2),"bottom"===t.my[1]?j.top-=f:"center"===t.my[1]&&(j.top-=f/2),j.left+=E[0],j.top+=E[1],e.support.offsetFractions||(j.left
134=u(j.left),j.top=u(j.top)),i={marginLeft:p,marginTop:y},e.each(["left","top"],function(n,r){e.ui.position[w[n]]&&e.ui.position[w[n]][r](j,{targetWidth:h,targetHeight:m,elemWidth:d,elemHeight:f,collisionPosition:i,collisionWidth:k,collisionHeight:S,offset:[o[0]+E[0],o[1]+E[1]],my:t.my,at:t.at,within:_,elem:c})}),t.using&&(l=function(e){var n=v.left-j.left,r=n+h-d,i=v.top-j.top,o=i+m-f,u={target:{element:b,left:v.left,top:v.top,width:h,height:m},element:{element:c,left:j.left,top:j.top,width:d,height:f},horizontal:r<0?"left":n>0?"right":"center",vertical:o<0?"top":i>0?"bottom":"middle"};h<d&&s(n+r)<h&&(u.horizontal="center"),m<f&&s(i+o)<m&&(u.vertical="middle"),a(s(n),s(r))>a(s(i),s(o))?u.important="horizontal":u.important="vertical",t.using.call(this,e,u)}),c.offset(e.extend(j,{using:l}))})},e.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,o=r.width,s=e.left-t.collisionPosition.marginLeft,u=i-s,l=s+t.collisionWidth-o-i;t.collisionWidth>o?u>0&&l<=0?(n=e.left+u+t.collisionWidth-o-i,e.left+=u-n):e.left=l>0&&u<=0?i:u>l?i+o-t.collisionWidth:i:u>0?e.left+=u:l>0?e.left-=l:e.left=a(e.left-s,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,o=t.within.height,s=e.top-t.collisionPosition.marginTop,u=i-s,l=s+t.collisionHeight-o-i;t.collisionHeight>o?u>0&&l<=0?(n=e.top+u+t.collisionHeight-o-i,e.top+=u-n):e.top=l>0&&u<=0?i:u>l?i+o-t.collisionHeight:i:u>0?e.top+=u:l>0?e.top-=l:e.top=a(e.top-s,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,o=i.offset.left+i.scrollLeft,a=i.width,u=i.isWindow?i.scrollLeft:i.offset.left,l=e.left-t.collisionPosition.marginLeft,c=l-u,d=l+t.collisionWidth-a-u,f="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,h="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];c<0?((n=e.left+f+h+p+t.collisionWidth-a-o)<0||n<s(c))&&(e.left+=f+h+p):d>0&&((r=e.left-t.collisionPosition.marginLeft+f+h+p-u)>0||s(r)<d)&&(e.left+=f+h+p)},top:function(e,t){var n,r,i=t.within,o=i.offset.top+i.scrollTop,a=i.height,u=i.isWindow?i.scrollTop:i.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-u,d=l+t.collisionHeight-a-u,f="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,p=-2*t.offset[1];c<0?(r=e.top+f+h+p+t.collisionHeight-a-o,e.top+f+h+p>c&&(r<0||r<s(c))&&(e.top+=f+h+p)):d>0&&(n=e.top-t.collisionPosition.marginTop+f+h+p-u,e.top+f+h+p>d&&(n>0||s(n)<d)&&(e.top+=f+h+p))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,n,r,i,o,a=document.getElementsByTagName("body")[0],s=document.createElement("div");for(o in t=document.createElement(a?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"}),r)t.style[o]=r[o];t.appendChild(s),(n=a||document.documentElement).insertBefore(t,n.firstChild),s.style.cssText="position: absolute; left: 10.7432222px;",i=e(s).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)}()}(jQuery),function(e){e.widget("ui.autocomplete",{version:"1.10.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 t,n,r,i=this.element[0].nodeName.toLowerCase(),o="textarea"===i,a="input"===i;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(i){if(this.element.prop("readOnly"))return t=!0,r=!0,void(n=!0);t=!1,r=!1,n=!1;var o=e.ui.keyCode;switch(i.keyCode){case o.PAGE_UP:t=!0,this._move("previousPage",i
vendor: 14,214 bytes, line 134
134);break;case o.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case o.UP:t=!0,this._keyEvent("previous",i);break;case o.DOWN:t=!0,this._keyEvent("next",i);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));break;case o.TAB:this.menu.active&&this.menu.select(i);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||r.preventDefault());if(!n){var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)}}},input:function(e){if(r)return r=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(r){r.target===t.element[0]||r.target===n||e.contains(n,r.target)||t.close()})})},menufocus:function(t,n){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)});var r=n.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),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(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){i(e)},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var n=this.menu.element.empty();this._renderMenu(n,t),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,n){return e("<li>").append(e("<a>").text(n.label)).appendTo(t)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),function(e){e.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left 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 ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var n=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(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(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||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-corner-all ui-menu-icons").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").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var r,i,o,a,s,u=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:u=!1,i=this.previousFilter||"",o=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),o===i?a=!0:o=i+o,s=new RegExp("^"+n(o),"i"),r=this.activeMenu.children(".ui-menu-item").filter(function(){return s.test(e(this).children("a").text())}),(r=a&&-1!==r.index(this.active.next())?this.active.nextAll(".ui-menu-item"):r).length||(o=String.fromCharCode(t.keyCode),s=new RegExp("^"+n(o),"i"),r=this.activeMenu.children(".ui-menu-item").filter(function(){return s.test(e(this).children("a").text())})),r.length?(this.focus(t,r),r.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),r=t.prev("a"),i=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),(t=r.add(this.element)).children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var n,r;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var n,r,i,o,a,s;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),s=t.height(),i<0?this.activeMenu.scrollTop(o+i):i+s>a&&this.activeMenu.scrollTop(o+i-a+s))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
134se").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},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(e,t,n){var r;this.active&&(r="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),r&&r.length&&this.active||(r=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(n,r)},nextPage:function(t){var n,r,i 135;this.active?this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-r-i<0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var n,r,i;this.active?this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(n=e(this)).offset().top-r+i>0}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})}(jQuery), 136/*! 137 * jquery.confirm 138 * 139 * @version 2.0.1 140 * 141 * @author My C-Labs 142 * @author Matthieu Napoli <[email protected]> 143 * @author Russel Vela 144 * 145 * @license MIT 146 * @url http://myclabs.github.io/jquery.confirm/ 147 */ 148function(e){e.fn.confirm=function(t){return void 0===t&&(t={}),this.click(function(n){n.preventDefault();var r=e.extend({button:e(this)},t);e.confirm(r,n)}),this},e.confirm=function(t,n){var r=e.extend({text:"Are you sure?",title:"",confirmButton:"Yes",cancelButton:"Cancel",post:!1,confirm:function(){var r=n.currentTarget.attributes.href.value;if(t.post){var i=e('<form method="post" class="hide" action="'+r+'"></form>');e("body").append(i),i.submit()}else window.location=r},cancel:function(){},button:null},t),i="";""!==r.title&&(i='<div class=modal-header><button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button><h4 class="modal-title">'+r.title+"</h4></div>");var o='<div class="confirmation-modal modal fade" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content">'+i+'<div class="modal-body">'+r.text+'</div><div class="modal-footer"><button class="confirm btn btn-primary" type="button" data-dismiss="modal">'+r.confirmButton+'</button><button class="cancel btn btn-default" type="button" data-dismiss="modal">'+r.cancelButton+"</div></div></div></div></div>",a=e(o);a.on("shown",function(){a.find(".btn-primary:first").focus()}),a.on("hidden",function(){a.remove()}),a.find(".confirm").click(function(){r.confirm(r.button)}),a.find(".cancel").click(function(){r.cancel(r.button)}),e("body").append(a),a.modal("show")}}(jQuery), 149/*! 150 * jQuery Cookie Plugin v1.4.0 151 * https://github.com/carhartl/jquery-cookie 152 * 153 * Copyright 2013 Klaus Hartl 154 * Released under the MIT license 155 */ 156function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(e){return s.raw?e:encodeURIComponent(e)}function n(e){return s.raw?e:decodeURIComponent(e)}function r(e){return t(s.json?JSON.stringify(e):String(e))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{e=decodeURIComponent(e.replace(a," "))}catch(t){return}try{return s.json?JSON.parse(e):e}catch(t){}}function o(t,n){var r=s.raw?t:i(t);return e.isFunction(n)?n(r):r}var a=/\+/g,s=e.cookie=function(i,a,u){if(a!==undefined&&!e.isFunction(a)){if("number"==typeof(u=e.extend({},s.defaults,u)).expires){var l=u.expires,c=u.expires=new Date;c.setDate(c.getDate()+l)}return document.cookie=[t(i),"=",r(a),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var d=i?undefined:{},f=document.cookie?document.cookie.split("; "):[],h=0,p=f.length;h<p;h++){var m=f[h].split("="),v=n(m.shift()),g=m.join("=");if(i&&i===v){d=o(g,a);break}i||(g=o(g))===undefined||(d[v]=g)}return d};s.defaults={}
156,e.removeCookie=function(t,n){return e.cookie(t)!==undefined&&(e.cookie(t,"",e.extend({},n,{expires:-1})),!0)}}), 157/* 158* EASYDROPDOWN - A Drop-down Builder for Styleable Inputs and Menus 159* Version: 2.1.4 160* License: Creative Commons Attribution 3.0 Unported - CC BY 3.0 161* http://creativecommons.org/licenses/by/3.0/ 162* This software may be used freely on commercial and non-commercial projects with attribution to the author/copyright holder. 163* Author: Patrick Kunka 164* Copyright 2013 Patrick Kunka, All Rights Reserved 165*/ 166function(e){function t(){this.isField=!0,this.down=!1,this.inFocus=!1,this.disabled=!1,this.cutOff=!1,this.hasLabel=!1,this.keyboardMode=!1,this.nativeTouch=!0,this.wrapperClass="dropdown_select",this.onChange=null}t.prototype={constructor:t,instances:{},init:function(t,n){var r=this;e.extend(r,n),r.$select=e(t),r.id=t.id,r.options=[],r.$options=r.$select.find("option"),r.isTouch="ontouchend"in document,r.$select.removeClass(r.wrapperClass+" dropdown_select"),r.$select.is(":disabled")&&(r.disabled=!0),r.$options.length&&(r.$options.each(function(t){var n=e(this);n.is(":selected")&&(r.selected={index:t,title:n.text()},r.focusIndex=t),n.hasClass("label")&&0==t?(r.hasLabel=!0,r.label=n.text(),n.attr("value","")):r.options.push({domNode:n[0],title:n.text(),value:n.val(),selected:n.is(":selected")})}),r.selected||(r.selected={index:0,title:r.$options.eq(0).text()},r.focusIndex=0),r.render())},render:function(){var t=this,n=t.isTouch&&t.nativeTouch?" touch":"",r=t.disabled?" disabled":"";t.$container=t.$select.wrap('<div class="'+t.wrapperClass+n+r+'"><span class="old"/></div>').parent().parent(),t.$active=e('<span class="selected">'+t.selected.title+"</span>").appendTo(t.$container),t.$carat=e('<span class="carat"/>').appendTo(t.$container),t.$scrollWrapper=e("<div><ul/></div>").appendTo(t.$container),t.$dropDown=t.$scrollWrapper.find("ul"),t.$form=t.$container.closest("form"),e.each(t.options,function(){var e=this,n=e.selected?' class="active"':"";t.$dropDown.append("<li"+n+">"+e.title+"</li>")}),t.$items=t.$dropDown.find("li"),t.cutOff&&t.$items.length>t.cutOff&&t.$container.addClass("scrollable"),t.getMaxHeight(),t.isTouch&&t.nativeTouch?t.bindTouchHandlers():t.bindHandlers()},getMaxHeight:function(){var e=this;for(e.maxHeight=0,i=0;i<e.$items.length;i++){var t=e.$items.eq(i);if(e.maxHeight+=t.outerHeight(),e.cutOff==i+1)break}},bindTouchHandlers:function(){var t=this;t.$container.on("click.easyDropDown",function(){t.$select.focus()}),t.$select.on({change:function(){var n=e(this).find("option:selected"),r=n.text(),i=n.val();t.$active.text(r),"function"==typeof t.onChange&&t.onChange.call(t.$select[0],{title:r,value:i})},focus:function(){t.$container.addClass("focus")},blur:function(){t.$container.removeClass("focus")}})},bindHandlers:function(){var t=this;t.query="",t.$container.on({"click.easyDropDown":function(){t.down||t.disabled?t.close():t.open()},"mousemove.easyDropDown":function(){t.keyboardMode&&(t.keyboardMode=!1)}}),e("body").on("click.easyDropDown."+t.id,function(n){var r=e(n.target),i=t.wrapperClass.split(" ").join(".");!r.closest("."+i).length&&t.down&&t.close()}),t.$items.on({"click.easyDropDown":function(){var n=e(this).index();t.select(n),t.$select.focus()},"mouseover.easyDropDown":function(){if(!t.keyboardMode){var n=e(this);n.addClass("focus").siblings().removeClass("focus"),t.focusIndex=n.index()}},"mouseout.easyDropDown":function(){t.keyboardMode||e(this).removeClass("focus")}}),t.$select.on({"focus.easyDropDown":function(){t.$container.addClass("focus"),t.inFocus=!0},"blur.easyDropDown":function(){t.$container.removeClass("focus"),t.inFocus=!1},"keydown.easyDropDown":function(e){if(t.inFocus){t.keyboardMode=!0;var n=e.keyCode;if(38!=n&&40!=n&&32!=n||(e.preventDefault(),38==n?(t.focusIndex--,t.focusIndex=t.focusIndex<0?t.$items.length-1:t.focusIndex):40==n&&(t.focusIndex++,t.focusIndex=t.focusIndex>t.$items.length-1?0:t.focusIndex),t.down||t.open(),t.$items.removeClass("focus").eq(t.focusIndex).addClass("focus"),t.cutOff&&t.scrollToView(),t.query=""),t.down)if(9==n||27==n)t.close();else{if(13==n)return e.preventDefault(),t.select(t.focusIndex),t.close(),!1;if(8==n)return e.preventDefault(),t.query=t.query.slice(0,-1),t.search(),clearTimeout(t.resetQuery),!1;if(38!=n&&40!=n){var r=String.fromCharCode(n);t.query+=r,t.search(),clearTimeout(t.resetQuery)}}}},"keyup.easyDropDown":function(){t.resetQuery=setTimeout(function(){t.query=""},1200)}}),t.$dropDown.on("scroll.easyDropDown",function(){t.$dropDown[0].scrollTop>=t.$dropDown[0].scrollHeight-t.maxHeight?t.$container.addClass("bottom"):t.$container.removeClass("bottom")}),t.$form.length&&t.$form.on("reset.easyDropDown",function(){var e=t.hasLabel?t.label:t.options[0].title;t.$active.text(e)})},unbindHandlers:function(){var t=this;t.$container.add(t.$select).add(t.$items).add(t.$form).add(t.$dropDown).off(".easyDropDown"),e("body").off("."+t.id)},open:function(){var e=this,t=window.scrollY||document.documentElement.scrollTop,n=window.scrollX||document.documentElement.scrollLeft,r=e.notInViewport(t);e.closeAll(),e.getMaxHeight(),e.$select.focus(),window.scrollTo(n,t+r),e.$container.addClass("open"),e.$scrollWrapper.css("height",e.maxHeight+"px"),e.down=!0},close:function(){var e=this;e.$container.removeClass("open"),e.$scrollWrapper.css("height","0px"),e.focusIndex=e.selected.index,e.query="",e.down=!1},closeAll:function(){var e=this,t=Object.getPrototypeOf(e).instances;for(var n in t){t[n].close()}},select:function(e){var t=this;"string"==typeof e&&(e=t.$select.find("option[value="+e+"]").index()-1);var n=t.options[e],r=t.hasLabel?e+1:e;t.$items.removeClass("active").eq(e).addClass("active"),t.$active.text(n.title),t.$select.find("option").removeAttr("selected").eq(r).prop("selected",!0).parent().trigger("change"),t.selected={index:e,title:n.title}
166,t.focusIndex=i,"function"==typeof t.onChange&&t.onChange.call(t.$select[0],{title:n.title,value:n.value})},search:function(){var e=this,t=function(t){e.focusIndex=t,e.$items.removeClass("focus").eq(e.focusIndex).addClass("focus"),e.scrollToView()},n=function(t){return e.options[t].title.toUpperCase()};for(i=0;i<e.options.length;i++){if(0==n(i).indexOf(e.query))return void t(i)}for(i=0;i<e.options.length;i++){if(n(i).indexOf(e.query)>-1){t(i);break}}},scrollToView:function(){var e=this;if(e.focusIndex>=e.cutOff){var t=e.$items.eq(e.focusIndex).outerHeight()*(e.focusIndex+1)-e.maxHeight;e.$dropDown.scrollTop(t)}},notInViewport:function(e){var t=this,n={min:e,max:e+(window.innerHeight||document.documentElement.clientHeight)},r=t.$dropDown.offset().top+t.maxHeight;return r>=n.min&&r<=n.max?0:r-n.max+5},destroy:function(){var e=this;e.unbindHandlers(),e.$select.unwrap().siblings().remove(),e.$select.unwrap(),delete Object.getPrototypeOf(e).instances[e.$select[0].id]},disable:function(){var e=this;e.disabled=!0,e.$container.addClass("disabled"),e.$select.attr("disabled",!0),e.down||e.close()},enable:function(){var e=this;e.disabled=!1,e.$container.removeClass("disabled"),e.$select.attr("disabled",!1)}};var n=function(e,n){e.id=e.id?e.id:"EasyDropDown"+r();var i=new t;i.instances[e.id]||(i.instances[e.id]=i,i.init(e,n))},r=function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()};e.fn.easyDropDown=function(){var e,r=arguments,i=[];return e=this.each(function(){if(r&&"string"==typeof r[0]){var e=t.prototype.instances[this.id][r[0]](r[1],r[2]);e&&i.push(e)}else n(this,r[0])}),i.length?i.length>1?i:i[0]:e},e(function(){"function"!=typeof Object.getPrototypeOf&&("object"==typeof"test".__proto__?Object.getPrototypeOf=function(e){return e.__proto__}:Object.getPrototypeOf=function(e){return e.constructor.prototype}),e("select.dropdown").each(function(){var t=e(this).attr("data-settings");settings=t?e.parseJSON(t):{},n(this,settings)})})}(jQuery), 167/*! Embedly jQuery - v3.1.1 - 2013-06-05 168 * https://github.com/embedly/embedly-jquery 169 * Copyright (c) 2013 Sean Creeley 170 * Licensed BSD 171 */ 172function(e){var t={key:null,endpoint:"oembed",secure:null,query:{},method:"replace",addImageStyles:!0,wrapElement:"div",className:"embed",batch:20,urlRe:null},n=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,r=function(e){return null===e||e===undefined},i=function(t,n){var r=[],i=[];return e.each(t,function(e,t){i.push(t),i.length===n&&(r.push(i),i=[])}),0!==i.length&&r.push(i),r},o=function(t){return r(t)?[]:e.isArray(t)?t:[t]},a=function(t){return e.map(t[0],function(n,r){return[e.map(t,function(e){return e[r]})]})},s=function(e,t,n){this.init(e,t,n)};s.prototype={init:function(t){this.urls=t,this.count=0,this.results={},this._deferred=e.Deferred()},notify:function(t){if(this.results[t.original_url]=t,this.count++,this._deferred.notify.apply(this._deferred,[t]),this.count===this.urls.length){var n=this,r=e.map(this.urls,function(e){return n.results[e]});this._deferred.resolve(r)}return this},state:function(){return this._deferred.state.apply(this._deferred,arguments)}},window.Keeper=s;var u=function(){};u.prototype={defaults:{},log:function(e,t){r(window.console)||r(window.console[e])||window.console[e].apply(window.console,[t])},build:function(t,n,i){var o=(i=r(i)?{}:i).secure;r(o)&&(o="https:"===window.location.protocol);var a=(o?"https":"http")+"://api.embed.ly/"+("objectify"===t?"2/":"1/")+t,s=r(i.query)?{}:i.query;return s.key=i.key,a+="?"+e.param(s),a+="&urls="+e.map(n,encodeURIComponent).join(",")},ajax:function(u,l,c){if(c=e.extend({},t,e.embedly.defaults,"object"==typeof c&&c),r(c.key))return this.log("error","Embedly jQuery requires an API Key. Please sign up for one at http://embed.ly"),null;l=o(l);var d,f=new s(l),h=[],p=[];e.each(l,function(e,t){d=!1,n.test(t)&&(d=!0,null!==c.urlRe&&c.urlRe.test&&!c.urlRe.test(t)&&(d=!1)),!0===d?h.push(t):p.push({url:t,original_url:t,error:!0,invalid:!0,type:"error",error_message:'Invalid URL "'+t+'"'})});var m=i(h,c.batch),v=this;return e.each(m,function(t,n){e.ajax({url:v.build(u,n,c),dataType:"jsonp",success:function(t){e.each(a([n,t]),function(e,t){var n=t[1];n.original_url=t[0],n.invalid=!1,f.notify(n)})}})}),p.length&&setTimeout(function(){e.each(p,function(e,t){f.notify(t)})},1),f._deferred},oembed:function(e,t){return this.ajax("oembed",e,t)},preview:function(e,t){return this.ajax("preview",e,t)},objectify:function(e,t){return this.ajax("objectify",e,t)},extract:function(e,t){return this.ajax("extract",e,t)}};var l=function(){};l.prototype={build:function(t,n,i){var o=(i=e.extend({},e.embedly.defaults,"object"==typeof i&&i)).secure;r(o)&&(o="https:"===window.location.protocol);var a=(o?"https":"http")+"://i.embed.ly/"+("display"===t?"1/":"1/display/")+t,s=r(i.query)?{}:i.query;return s.key=i.key,a+="?"+e.param(s),a+="&url="+encodeURIComponent(n)},display:function(e,t){return this.build("display",e,t)},resize:function(e,t){return this.build("resize",e,t)},fill:function(e,t){return this.build("fill",e,t)},crop:function(e,t){return this.build("crop",e,t)}};var c=function(e,t,n){this.init(e,t,n)};c.prototype={init:function(t,n,r){this.elem=t,this.$elem=e(t),this.original_url=n,this.options=r,this.loaded=e.Deferred();var i=this;this.loaded.done(function(){i.$elem.trigger("loaded",[i])}),this.$elem.trigger("initialized",[this])},progress:function(t){e.extend(this,t),this.options.display?this.options.display.apply(this.elem,[this,this.elem]):"oembed"===this.options.endpoint&&this.display(),this.loaded.resolve(this)},imageStyle:function(){var e,t=[];return this.options.addImageStyles&&(this.options.query.maxwidth&&(e=isNaN(parseInt(this.options.query.maxwidth,10))?"":"px",t.push("max-width: "+this.options.query.maxwidth+e)),this.options.query.maxheight&&(e=isNaN(parseInt(this.options.query.maxheight,10))?"":"px",t.push("max-height: "+this.options.query.maxheight+e))),t.join(";")},display:function(){if("error"===this.type)return!1;var e;this.style=this.imageStyle(),"photo"===this.type?(e="<a href='"+this.original_url+"' target='_blank'>",e+="<img style='"+this.style+"' src='"+this.url+"' alt='"+this.title+"' /></a>"):"video"===this.type||"rich"===this.type?e=this.html:(this.title=this.title||this.url,e=this.thumbnail_url?"<img src='"+this.thumbnail_url+"' class='thumb' style='"+this.style+"'/>":"",e+="<a href='"+this.original_url+"'>"+this.title+"</a>",e+=this.provider_name?"<a href='"+this.provider_url+"' class='provider'>"+this.provider_name+"</a>":"",e+=this.description?'<div class="description">'+this.description+"</div>":""),this.options.wrapElement&&(e="<"+this.options.wrapElement+' class="'+this.options.className+'">'+e+"</"+this.options.wrapElement+">"),this.code=e,"replace"===this.options.method?this.$elem.replaceWith(this.code):"after"===this.options.method?this.$elem.after(this.code):"afterParent"===this.options.method?this.$elem.parent().after(this.code):"replaceParent"===this.options.method&&this.$elem.parent().replaceWith(this.code),this.$elem.trigger("displayed",[this])}},e.embedly=new u,e.embedly.display=new l,e.fn.embedly=function(n){if(n===undefined||"object"==typeof n){if(n=e.extend({},t,e.embedly.defaults,"object"==typeof n&&n),r(n.key))return e.embedly.log("error","Embedly jQuery requires an API Key. Please sign up for one at http://embed.ly"),this.each(e.noop);var i={},o=function(t){if(!e.data(e(t),"embedly")){var r=e(t).attr("href"),o=new c(t,r,n);e.data(t,"embedly",o),i.hasOwnProperty(r)?i[r].push(o):i[r]=[o]}},a=this.each(function(){r(e(this).attr("href"))?e(this).find("a").each(function(){r(e(this).attr("href"))||o(this)}):o(this)}),s=e.embedly.ajax(n.endpoint,e.map(i,function(e,t){return t}),n).progress(function(t){e.each(i[t.original_url],function(e,n){
172n.progress(t)})});return n.progress&&s.progress(n.progress),n.done&&s.done(n.done),a}},e.expr[":"].embedly=function(t){return!r(e(t).data("embedly"))},e.fn.display=function(n,i){if(r(n)&&(n="display"),i===undefined||"object"==typeof i){if(i=e.extend({},t,e.embedly.defaults,"object"==typeof i&&i),r(i.key))return e.embedly.log("error","Embedly jQuery requires an API Key. Please sign up for one at http://embed.ly/display"),this.each(e.noop);var o=function(t){var r=e(t);if(!r.data("display")){var o=r.data("src")||r.attr("href"),a={original_url:o,url:e.embedly.display.build(n,o,i)};r.data("display",a),r.trigger("initialized",[t]);var s="<img src='"+a.url+"' />";r.is("a")?r.append(s):r.replaceWith(s)}},a=function(t){return!r(e(t).data("src"))||!r(e(t).attr("href"))};return this.each(function(){a(this)?o(this):e(this).find("img,a").each(function(){a(this)&&o(this)})})}},e.expr[":"].display=function(t){return!r(e(t).data("display"))}}(jQuery,window),function(e){function t(t){var n=e.formatCurrency.regions[t];if(n)return n;if(/(\w+)-(\w+)/g.test(t)){var r=t.replace(/(\w+)-(\w+)/g,"$1");return e.formatCurrency.regions[r]}return null}function n(e){switch(e.toLowerCase()){case"int":return"Int";case"float":return"Float";default:throw"invalid parseType"}}function r(e){if(""===e.symbol)return new RegExp("[^\\d"+e.decimalSymbol+"-]","g");var t=e.symbol.replace("$","\\$").replace(".","\\.");return new RegExp(t+"|[^\\d"+e.decimalSymbol+"-]","g")}e.formatCurrency={},e.formatCurrency.regions=[],e.formatCurrency.regions[""]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol
172:".",digitGroupSymbol:",",groupDigits:!0},e.fn.formatCurrency=function(n,i){1==arguments.length&&"string"!=typeof n&&(i=n,n=!1);var o={name:"formatCurrency",colorize:!1,region:"",global:!0,roundToDecimalPlace:2,eventOnDecimalsEntered:!1};return o=e.extend(o,e.formatCurrency.regions[""]),(i=e.extend(o,i)).region.length>0&&(i=e.extend(i,t(i.region))),i.regex=r(i),this.each(function(){$this=e(this);var t="0";if((t=$this[$this.is("input, select, textarea")?"val":"html"]()).search("\\(")>=0&&(t="-"+t),""!==t&&("-"!==t||-1!==i.roundToDecimalPlace)){if(isNaN(t)){if(""===(t=t.replace(i.regex,""))||"-"===t&&-1===i.roundToDecimalPlace)return;"."!=i.decimalSymbol&&(t=t.replace(i.decimalSymbol,".")),isNaN(t)&&(t="0")}var r=String(t).split("."),o=t==Math.abs(t),a=r.length>1,s=a?r[1].toString():"0",u=s;if(t=Math.abs(r[0]),t=isNaN(t)?0:t,i.roundToDecimalPlace>=0&&("2"==(s=(s=parseFloat("1."+s)).toFixed(i.roundToDecimalPlace)).substring(0,1)&&(t=Number(t)+1),s=s.substring(2)),t=String(t),i.groupDigits)for(var l=0;l<Math.floor((t.length-(1+l))/3);l++)t=t.substring(0,t.length-(4*l+3))+i.digitGroupSymbol+t.substring(t.length-(4*l+3));(a&&-1==i.roundToDecimalPlace||i.roundToDecimalPlace>0)&&(t+=i.decimalSymbol+s);var c=(o?i.positiveFormat:i.negativeFormat).replace(/%s/g,i.symbol);c=c.replace(/%n/g,t);var d=e([]);(d=n?e(n):$this)[d.is("input, select, textarea")?"val":"html"](c),a&&i.eventOnDecimalsEntered&&u.length>i.roundToDecimalPlace&&d.trigger("decimalsEntered",u),i.colorize&&d.css("color",o?"black":"red")}})},e.fn.toNumber=function(n){var i=e.extend({name:"toNumber",region:"",global:!0},e.formatCurrency.regions[""]);return(n=jQuery.extend(i,n)).region.length>0&&(n=e.extend(n,t(n.region))),n.regex=r(n),this.each(function(){var t=e(this).is("input, select, textarea")?"val":"html";e(this)[t](e(this)[t]().replace("(","(-").replace(n.regex,""))})},e.fn.asNumber=function(i){var o=e.extend({name:"asNumber",region:"",parse:!0,parseType:"Float",global:!0},e.formatCurrency.regions[""]);(i=jQuery.extend(o,i)).region.length>0&&(i=e.extend(i,t(i.region))),i.regex=r(i),i.parseType=n(i.parseType);var a=e(this).is("input, select, textarea")?"val":"html",s=e(this)[a]();return s=(s=(s=s||"").replace("(","(-")).replace(i.regex,""),i.parse?(0==s.length&&(s="0"),"."!=i.decimalSymbol&&(s=s.replace(i.decimalSymbol,".")),window["parse"+i.parseType](s)):s}}(jQuery),function(e){"use strict";e.extend({tablesorter:new function(){function t(){var e=arguments[0],t=arguments.length>1?Array.prototype.slice.call(arguments):e;"undefined"!=typeof console&&"undefined"!=typeof console.log?console[/error/i.test(e)?"error":/warn/i.test(e)?"warn":"log"](t):alert(t)}function n(e,n){t(e+" ("+((new Date).getTime()-n.getTime())+"ms)")}function r(e){for(var t in e)return!1;return!0}function i(t,n,r){if(!n)return"";var i,o=t.config,a=o.textExtraction||"",s="";return s="basic"===a?e(n).attr(o.textAttribute)||n.textContent||n.innerText||e(n).text()||"":"function"==typeof a?a(n,t,r):"function"==typeof(i=w.getColumnData(t,a,r))?i(n,t,r):n.textContent||n.innerText||e(n).text()||"",e.trim(s)}function o(e,n,r,o){for(var a,s=w.parsers.length,u=!1,l="",c=!0;""===l&&c;)n[++r]?(l=i(e,u=n[r].cells[o],o),e.config.debug&&t("Checking if value was empty on row "+r+", column: "+o+': "'+l+'"')):c=!1;for(;--s>=0;)if((a=w.parsers[s])&&"text"!==a.id&&a.is&&a.is(l,e,u))return a;return w.getParserById("text")}function a(e){var r,i,a,s,u,l,c,d,f,h,p=e.config,m=p.$tbodies=p.$table.children("tbody:not(."+p.cssInfoBlock+")"),v=0,g="",y=m.length;if(0===y)return p.debug?t("Warning: *Empty table!* Not building a parser cache"):"";for(p.debug&&(h=new Date,t("Detecting parsers for each column")),i={extractors:[],parsers:[]};v<y;){if((r=m[v].rows)[v])for(a=p.columns,s=0;s<a;s++)u=p.$headers.filter('[data-column="'+s+'"]:last'),l=w.getColumnData(e,p.headers,s),f=w.getParserById(w.getData(u,l,"extractor")),d=w.getParserById(w.getData(u,l,"sorter")),c="false"===w.getData(u,l,"parser"),p.empties[s]=w.getData(u,l,"empty")||p.emptyTo||(p.emptyToBottom?"bottom":"top"),p.strings[s]=w.getData(u,l,"string")||p.stringTo||"max",c&&(d=w.getParserById("no-parser")),f||(f=!1),d||(d=o(e,r,-1,s)),p.debug&&(g+="column:"+s+"; extractor:"+f.id+"; parser:"+d.id+";
172 string:"+p.strings[s]+"; empty: "+p.empties[s]+"\n"),i.parsers[s]=d,i.extractors[s]=f;v+=i.parsers.length?y:1}p.debug&&(t(g||"No parsers detected"),n("Completed detecting parsers",h)),p.parsers=i.parsers,p.extractors=i.extractors}function s(r){var o,a,s,u,l,c,d,f,h,p,m,v,g,y=r.config,b=y.$table.children("tbody"),_=y.extractors,x=y.parsers;if(y.cache={},y.totalRows=0,!x)return y.debug?t("Warning: *Empty table!* Not building a cache"):"";for(y.debug&&(p=new Date),y.showProcessing&&w.isProcessing(r,!0),d=0;d<b.length;d++)if(g=[],o=y.cache[d]={normalized:[]},!b.eq(d).hasClass(y.cssInfoBlock)){for(m=b[d]&&b[d].rows.length||0,l=0;l<m;++l)if(v={child:[]},f=e(b[d].rows[l]),[new Array(y.columns)],h=[],f.hasClass(y.cssChildRow)&&0!==l)a=o.normalized.length-1,o.normalized[a][y.columns].$row=o.normalized[a][y.columns].$row.add(f),f.prev().hasClass(y.cssChildRow)||f.prev().addClass(w.css.cssHasChild),v.child[a]=e.trim(f[0].textContent||f[0].innerText||f.text()||"");else{for(v.$row=f,v.order=l,c=0;c<y.columns;++c)"undefined"!=typeof x[c]?(a=i(r,f[0].cells[c],c),s="undefined"==typeof _[c].id?a:_[c].format(a,r,f[0].cells[c],c),u="no-parser"===x[c].id?"":x[c].format(s,r,f[0].cells[c],c),h.push(y.ignoreCase&&"string"==typeof u?u.toLowerCase():u),"numeric"===(x[c].type||"").toLowerCase()&&(g[c]=Math.max(Math.abs(u)||0,g[c]||0))):y.debug&&t("No parser found for cell:",f[0].cells[c],"does it have a header?");h[y.columns]=v,o.normalized.push(h)}o.colMax=g,y.totalRows+=o.normalized.length}y.showProcessing&&w.isProcessing(r),y.debug&&n("Building cache for "+m+" rows",p)}function u(t,i){var o,a,s,u,l,c,d,f=t.config,h=f.widgetOptions,p=t.tBodies,m=[],v=f.cache;if(r(v))return f.appender?f.appender(t,m):t.isUpdating?f.$table.trigger("updateComplete",t):"";for(f.debug&&(d=new Date),c=0;c<p.length;c++)if((s=e(p[c])).length&&!s.hasClass(f.cssInfoBlock)){for(u=w.processTbody(t,s,!0),a=(o=v[c].normalized).length,l=0;l<a;l++)m.push(o[l][f.columns].$row),f.appender&&(!f.pager||f.pager.removeRows&&h.pager_removeRows||f.pager.ajax)||u.append(o[l][f.columns].$row);w.processTbody(t,u,!1)}f.appender&&f.appender(t,m),f.debug&&n("Rebuilt table",d),i||f.appender||w.applyWidget(t),t.isUpdating&&f.$table.trigger("updateComplete",t)}function l(e){return/^d/i.test(e)||1===e}function c(r){var i,o,a,s,u,c,d,h=r.config;h.headerList=[],h.headerContent=[],h.debug&&(d=new Date),h.columns=w.computeColumnIndex(h.$table.children("thead, tfoot").children("tr")),s=h.cssIcon?'<i class="'+(h.cssIcon===w.css.icon?w.css.icon:h.cssIcon+" "+w.css.icon)+'"></i>':"",h.$headers=e(r).find(h.selectorHeaders).each(function(t){o=e(this),i=w.getColumnData(r,h.headers,t,!0),h.headerContent[t]=e(this).html(),u=h.headerTemplate.replace(/\{content\}/g,e(this).html()).replace(/\{icon\}/g,s),h.onRenderTemplate&&(a=h.onRenderTemplate.apply(o,[t,u]))&&"string"==typeof a&&(u=a),e(this).html('<div class="'+w.css.headerIn+'">'+u+"</div>"),h.onRenderHeader&&h.onRenderHeader.apply(o,[t]),this.column=parseInt(e(this).attr("data-column"),10),this.order=l(w.getData(o,i,"sortInitialOrder")||h.sortInitialOrder)?[1,0,2]:[0,1,2],this.count=-1,this.lockedOrder=!1,void 0!==(c=w.getData(o,i,"lockedOrder")||!1)&&!1!==c&&(this.order=this.lockedOrder=l(c)?[1,1,1]:[0,0,0]),o.addClass(w.css.header+" "+h.cssHeader),h.headerList[t]=this,o.parent().addClass(w.css.headerRow+" "+h.cssHeaderRow).attr("role","row"),h.tabIndex&&o.attr("tabindex",0)}).attr({scope:"col",role:"columnheader"}),f(r),h.debug&&(n("Built headers:",d),t(h.$headers))}function d(e,t,n){var r=e.config;r.$table.find(r.selectorRemove).remove(),a(e),s(e),_(r.$table,t,n)}function f(t){var n,r,i,o=t.config;o.$headers.each(function(a,s){r=e(s),i=w.getColumnData(t,o.headers,a,!0),n="false"===w.getData(s,i,"sorter")||"false"===w.getData(s,i,"parser"),s.sortDisabled=n,r[n?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+n),t.id&&(n?r.removeAttr("aria-controls"):r.attr("aria-controls",t.id))})}function h(t){var n,r,i,o=t.config,a=o.sortList,s=a.length,u=w.css.sortNone+" "+o.cssNone,l=[w.css.sortAsc+" "+o.cssAsc,w.css.sortDesc+" "+o.cssDesc],c=["ascending","descending"],d=e(t).find("tfoot tr").children().add(o.$extraHeaders).removeClass(l.join(" "));for(o.$headers.removeClass(l.join(" ")).addClass(u).attr("aria-sort","none"),r=0;r<s;r++)if(2!==a[r][1]&&(n=o.$headers.not(".sorter-false").filter('[data-column="'+a[r][0]+'"]'+(1===s?":last":""))).length){for(i=0;i<n.length;i++)n[i].sortDisabled||n.eq(i).removeClass(u).addClass(l[a[r][1]]).attr("aria-sort",c[a[r][1]]);d.length&&d.filter('[data-column="'+a[r][0]+'"]').removeClass(u).addClass(l[a[r][1]])}o.$headers.not(".sorter-false").each(function(){var t=e(this),n=this.order[(this.count+1)%(o.sortReset?3:2)],r=t.text()+": "+w.language[t.hasClass(w.css.sortAsc)?"sortAsc":t.hasClass(w.css.sortDe
172sc)?"sortDesc":"sortNone"]+w.language[0===n?"nextAsc":1===n?"nextDesc":"nextNone"];t.attr("aria-label",r)})}function p(t){if(t.config.widthFixed&&0===e(t).find("colgroup").length){var n=e("<colgroup>"),r=e(t).width();e(t.tBodies[0]).find("tr:first").children(":visible").each(function(){n.append(e("<col>").css("width",parseInt(e(this).width()/r*1e3,10)/10+"%"))}),e(t).prepend(n)}}function m(t,n){var r,i,o,a,s,u=t.config,l=n||u.sortList;u.sortList=[],e.each(l,function(t,n){if(a=parseInt(n[0],10),o=u.$headers.filter('[data-column="'+a+'"]:last')[0]){switch(i=(i=(""+n[1]).match(/^(1|d|s|o|n)/))?i[0]:""){case"1":case"d":i=1;break;case"s":i=s||0;break;case"o":r=o.order[(s||0)%(u.sortReset?3:2)],i=0===r?1:1===r?0:2;break;case"n":o.count=o.count+1,i=o.order[o.count%(u.sortReset?3:2)];break;default:i=0}s=0===t?i:s,r=[a,parseInt(i,10)||0],u.sortList.push(r),i=e.inArray(r[1],o.order),o.count=i>=0?i:r[1]%(u.sortReset?3:2)}})}function v(e,t){return e&&e[t]&&e[t].type||""}function g(t,n,r){if(t.isUpdating)return setTimeout(function(){g(t,n,r)},50);var i,o,a,s,l,c=t.config,d=!r[c.sortMultiSortKey],f=c.$table;if(f.trigger("sortStart",t),n.count=r[c.sortResetKey]?2:(n.count+1)%(c.sortReset?3:2),c.sortRestart&&(o=n,c.$headers.each(function(){this===o||!d&&e(this).is("."+w.css.sortDesc+",."+w.css.sortAsc)||(this.count=-1)})),o=n.column,d){if(c.sortList=[],null!==c.sortForce)for(i=c.sortForce,a=0;a<i.length;a++)i[a][0]!==o&&c.sortList.push(i[a]);if((s=n.order[n.count])<2&&(c.sortList.push([o,s]),n.colSpan>1))for(a=1;a<n.colSpan;a++)c.sortList.push([o+a,s])}else{if(c.sortAppend&&c.sortList.length>1)for(a=0;a<c.sortAppend.length;a++)(l=w.isValueInArray(c.sortAppend[a][0],c.sortList))>=0&&c.sortList.splice(l,1);if(w.isValueInArray(o,c.sortList)>=0)for(a=0;a<c.sortList.length;a++)l=c.sortList[a],s=c.$headers.filter('[data-column="'+l[0]+'"]:last')[0],l[0]===o&&(l[1]=s.order[n.count],2===l[1]&&(c.sortList.splice(a,1),s.count=-1));else if((s=n.order[n.count])<2&&(c.sortList.push([o,s]),n.colSpan>1))for(a=1;a<n.colSpan;a++)c.sortList.push([o+a,s])}if(null!==c.sortAppend)for(i=c.sortAppend,a=0;a<i.length;a++)i[a][0]!==o&&c.sortList.push(i[a]);f.trigger("sortBegin",t),setTimeout(function(){h(t),y(t),u(t),f.trigger("sortEnd",t)},1)}function y(e){var t,i,o,a,s,u,l,c,d,f,h=0,p=e.config,m=p.textSorter||"",g=p.sortList,y=g.length,b=e.tBodies.length;if(!p.serverSideSorting&&!r(p.cache)){for(p.debug&&(s=new Date),i=0;i<b;i++)u=p.cache[i].colMax,p.cache[i].normalized.sort(function(n,r){for(t=0;t<y;t++){if(a=g[t][0],l=g[t][1],h=0===l,p.sortStable&&n[a]===r[a]&&1===y)return n[p.columns].order-r[p.columns].order;if((o=/n/i.test(v(p.parsers,a)))&&p.strings[a]?(o="boolean"==typeof p.string[p.strings[a]]?(h?1:-1)*(p.str
172ing[p.strings[a]]?-1:1):p.strings[a]&&p.string[p.strings[a]]||0,c=p.numberSorter?p.numberSorter(n[a],r[a],h,u[a],e):w["sortNumeric"+(h?"Asc":"Desc")](n[a],r[a],o,u[a],a,e)):(d=h?n:r,f=h?r:n,c="function"==typeof m?m(d[a],f[a],h,a,e):"object"==typeof m&&m.hasOwnProperty(a)?m[a](d[a],f[a],h,a,e):w["sortNatural"+(h?"Asc":"Desc")](n[a],r[a],a,e,p)),c)return c}return n[p.columns].order-r[p.columns].order});p.debug&&n("Sorting on "+g.toString()+" and dir "+l+" time",s)}}function b(t,n){t[0].isUpdating&&t.trigger("updateComplete"),e.isFunction(n)&&n(t[0])}function _(e,t,n){var r=e[0].config.sortList;!1!==t&&!e[0].isProcessing&&r.length?e.trigger("sorton",[r,function(){b(e,n)},!0]):(b(e,n),w.applyWidget(e[0],!1))}function x(t){var n=t.config,o=n.$table;o.unbind("sortReset update updateRows updateCell updateAll addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(n.namespace+" ")).bind("sortReset"+n.namespace,function(r,i){r.stopPropagation(),n.sortList=[],h(t),y(t),u(t),e.isFunction(i)&&i(t)}).bind("updateAll"+n.namespace,function(e,r,i){e.stopPropagation(),t.isUpdating=!0,w.refreshWidgets(t,!0,!0),w.restoreHeaders(t),c(t),w.bindEvents(t,n.$headers,!0),x(t),d(t,r,i)}).bind("update"+n.namespace+" updateRows"+n.namespace,function(e,n,r){e.stopPropagation(),t.isUpdating=!0,f(t),d(t,n,r)}).bind("updateCell"+n.namespace,function(r,a,s,u){r.stopPropagation(),t.isUpdating=!0,o.find(n.selectorRemove).remove();var l,c,d,f,h=o.find("tbody"),p=e(a),m=h.index(e.fn.closest?p.closest("tbody"):p.parents("tbody").filter(":first")),v=e.fn.closest?p.closest("tr"):p.parents("tr").filter(":first");a=p[0],h.length&&m>=0&&(d=h.eq(m).find("tr").index(v),f=p.index(),n.cache[m].normalized[d][n.columns].$row=v,c="undefined"==typeof n.extractors[f].id?i(t,a,f):n.extractors[f].format(i(t,a,f),t,a,f),l="no-parser"===n.parsers[f].id?"":n.parsers[f].format(c,t,a,f),n.cache[m].normalized[d][f]=n.ignoreCase&&"string"==typeof l?l.toLowerCase():l,"numeric"===(n.parsers[f].type||"").toLowerCase()&&(n.cache[m].colMax[f]=Math.max(Math.abs(l)||0,n.cache[m].colMax[f]||0)),_(o,s,u))}).bind("addRows"+n.namespace,function(s,u,l,c){if(s.stopPropagation(),t.isUpdating=!0,r(n.cache))f(t),d(t,l,c);else{var h,p,m,v,g,y,b,x=(u=e(u).attr("role","row")).filter("tr").length,w=o.find("tbody").index(u.parents("tbody").filter(":first"));for(n.parsers&&n.parsers.length||a(t),h=0;h<x;h++){for(m=u[h].cells.length,b=[],y={child:[],$row:u.eq(h),order:n.cache[w].normalized.length},p=0;p<m;p++)v="undefined"==typeof n.extractors[p].id?i(t,u[h].cells[p],p):n.extractors[p].format(i(t,u[h].cells[p],p),t,u[h].cells[p],p),g="no-parser"===n.parsers[p].id?"":n.parsers[p].format(v,t,u[h].cells[p],p),b[p]=n.ignoreCase&&"string"==typeof g?g.toLowerCase():g,"numeric"===(n.parsers[p].type||"").toLowerCase()&&(n.cache[w].colMax[p]=Math.max(Math.abs(b[p])||0,n.cache[w].colMax[p]||0));b.push(y),n.cache[w].normalized.push(b)}_(o,l,c)}}).bind("updateComplete"+n.namespace,function(){t.isUpdating=!1}).bind("sorton"+n.namespace,function(n,i,a,l){var c=t.config;n.stopPropagation(),o.trigger("sortStart",this),m(t,i),h(t),c.delayInit&&r(c.cache)&&s(t),o.trigger("sortBegin",this),y(t),u(t,l),o.trigger("sortEnd",this),w.applyWidget(t),e.isFunction(a)&&a(t)}).bind("appendCache"+n.namespace,function(n,r,i){n.stopPropagation(),u(t,i),e.isFunction(r)&&r(t)}).bind("updateCache"+n.namespace,function(r,i){n.parsers&&n.parsers.length||a(t),s(t),e.isFunction(i)&&i(t)}).bind("applyWidgetId"+n.namespace,function(e,r){e.stopPropagation(),w.getWidgetById(r).format(t,n,n.widgetOptions)}).bind("applyWidgets"+n.namespace,function(e,n){e.stopPropagation(),w.applyWidget(t,n)}).bind("refreshWidgets"+n.namespace,function(e,n,r){e.stopPropagation(),w.refreshWidgets(t,n,r)}).bind("destroy"+n.namespace,function(e,n,r){e.stopPropagation(),w.destroy(t,n,r)}).bind("resetToLoadState"+n.namespace,function(){w.refreshWidgets(t,!0,!0),n=e.extend(!0,w.defaults,n.originalSettings),t.hasInitialized=!1,w.setup(t,n)})}var w=this;w.version="2.17.7",w.parsers=[],w.widgets=[],w.defaults={theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,headers:{}
172,ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,widgets:[],widgetOptions:{zebra:["even","odd"]},initWidgets:!0,initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssIcon:"tablesorter-icon",cssInfoBlock:"tablesorter-infoOnly",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[]},w.css={table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",info:"tablesorter-infoOnly",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},w.language={sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},w.log=t,w.benchmark=n,w.construct=function(t){return this.each(function(){var n=this,r=e.extend(!0,{},w.defaults,t);r.originalSettings=t,!n.hasInitialized&&w.buildTable&&"TABLE"!==this.tagName?w.buildTable(n,r):w.setup(n,r)})},w.setup=function(n,r){if(!n||!n.tHead||0===n.tBodies.length||!0===n.hasInitialized)return r.debug?t("ERROR: stopping initialization! No table, thead, tbody or tablesorter has already been initialized"):"";var i,o="",u=e(n),l=e.metadata;n.hasInitialized=!1,n.isProcessing=!0,n.config=r,e.data(n,"tablesorter",r),r.debug&&e.data(n,"startoveralltimer",new Date),r.supportsDataObject=((i=e.fn.jquery.split("."))[0]=parseInt(i[0],10),i[0]>1||1===i[0]&&parseInt(i[1],10)>=4),r.string={max:1,min:-1,emptyMin:1,emptyMax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},/tablesorter\-/.test(u.attr("class"))||(o=""!==r.theme?" tablesorter-"+r.theme:""),r.table=n,r.$table=u.addClass(w.css.table+" "+r.tableClass+o).attr("role","grid"),r.$headers=u.find(r.selectorHeaders),r.namespace?r.namespace="."+r.namespace.replace(/\W/g,""):r.namespace=".tablesorter"+Math.random().toString(16).slice(2),r.$table.children().children("tr").attr("role","row"),r.$tbodies=u.children("tbody:not(."+r.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),r.$table.find("caption").length&&r.$table.attr("aria-labelledby","theCaption"),r.widgetInit={},r.textExtraction=r.$table.attr("data-text-extraction")||r.textExtraction||"basic",c(n),p(n),a(n),r.totalRows=0,r.delayInit||s(n),w.bindEvents(n,r.$headers,!0),x(n),r.supportsDataObject&&"undefined"!=typeof u.data().sortlist?r.sortList=u.data().sortlist:l&&u.metadata()&&u.metadata().sortlist&&(r.sortList=u.metadata().sortlist),w.applyWidget(n,!0),r.sortList.length>0?u.trigger("sorton",[r.sortList,{},!r.initWidgets,!0]):(h(n),r.initWidgets&&w.applyWidget(n,!1)),r.showProcessing&&u.unbind("sortBegin"+r.namespace+" sortEnd"+r.namespace).bind("sortBegin"+r.namespace+" sortEnd"+r.namespace,function(e){clearTimeout(r.processTimer),w.isProcessing(n),"sortBegin"===e.type&&(r.processTimer=setTimeout(function(){w.isProcessing(n,!0)},500))}),n.hasInitialized=!0,n.isProcessing=!1,r.debug&&w.benchmark("Overall initialization time",e.data(n,"startoveralltimer")),u.trigger("tablesorter-initialized",n),"function"==typeof r.initialized&&r.initialized(n)},w.getColumnData=function(t,n,r,i){if(null!=n){var o,a,s=(t=e(t)[0]).config;if(n[r])return i?n[r]:n[s.$headers.index(s.$headers.filter('[data-column="'+r+'"]:last'))];for(a in n)if("string"==typeof a&&(i?s.$headers.eq(r).filter(a):s.$headers.filter('[data-column="'+r+'"]:last').filter(a)).length)return n[a];return o}},w.computeColumnIndex=function(t){var n,r,i,o,a,s,u,l,c,d,f,h,p,m=[],v={},g=0;for(n=0;n<t.length;n++)for(u=t[n].cells,r=0;r<u.length;r++){for(s=u[r],a=e(s),c=(l=s.parentNode.rowIndex)+"-"+a.index(),d=s.rowSpan||1,f=s.colSpan||1,"undefined"==typeof m[l]&&(m[l]=[]),i=0;i<m[l].length+1;i++)if("undefined"==typeof m[l][i]){h=i;break}for(v[c]=h,g=Math.max(h,g),a.attr({"data-column":h}),i=l;i<l+d;i++)for("undefined"==typeof m[i]&&(m[i]=[]),p=m[i],o=h;o<h+f;o++)p[o]="x"}return g+1},w.isProcessing=function(t,n,r){var i=(t=e(t))[0].config,o=r||t.find("."+w.css.header);n?(void 0!==r&&i.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&w.isValueInArray(parseFloat(e(this).attr("data-column")),i.sortList)>=0})),t.add(o).addClass(w.css.processing+" "+i.cssProcessing)):t.add(o).removeClass(w.css.processing+" "+i.cssProcessing)},w.processTbody=function(t,n,r){var i;if(t=e(t)[0],r)return t.isProcessing=!0,n.before('<span class="tablesorter-savemyplace"/>'),i=e.fn.detach?n.detach():n.remove();i=e(t).find("span.tablesorter-savemyplace"),n.insertAfter(i),i.remove(),t.isProcessing=!1},w.clearTableBody=function(t){e(t)[0].config.$tbodies.children().detach()},w.bindEvents=function(t,n,i){var o,a=(t=e(t)[0]).config;!0!==i&&(a.$extraHeaders=a.$extraHeaders?a.$extraHeaders.add(n):n),n.find(a.selectorSort).add(n.filter(a.selectorSort)).unbind("mousedown mouseup sort keyup ".split(" ").join(a.namespace+" ")).bind("mousedown mouseup sort keyup ".split(" ").join(a.namespace+" "),function(i,u){var l,c=i.type;if(!(1!==(i.which||i.button)&&!/sort|keyup/.test(c)||"keyup"===c&&13!==i.which||"mouseup"===c&&!0!==u&&(new Date).getTime()-o>250)){if("mousedown"===c)return o=(new Date).getTime(),/(input|select|button|textarea)/i.test(i.target.tagName)?"":!a.cancelSelection;a.delayInit&&r(a.cache)&&s(t),l=e.fn.closest?e(this).closest("th, td")[0]:/TH|TD/.test(this.tagName)?this:e(this).parents("th, td")[0],(l=
172a.$headers[n.index(l)]).sortDisabled||g(t,l,i)}}),a.cancelSelection&&n.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},w.restoreHeaders=function(t){var n=e(t)[0].config;n.$table.find(n.selectorHeaders).each(function(t){e(this).find("."+w.css.headerIn).length&&e(this).html(n.headerContent[t])})},w.destroy=function(t,n,r){if((t=e(t)[0]).hasInitialized){w.refreshWidgets(t,!0,!0);var i=e(t),o=t.config,a=i.find("thead:first"),s=a.find("tr."+w.css.headerRow).removeClass(w.css.headerRow+" "+o.cssHeaderRow),u=i.find("tfoot:first > tr").children("th, td");!1===n&&e.inArray("uitheme",o.widgets)>=0&&(i.trigger("applyWidgetId",["uitheme"]),i.trigger("applyWidgetId",["zebra"])),a.find("tr").not(s).remove(),i.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState ".split(" ").join(o.namespace+" ")),o.$headers.add(u).removeClass([w.css.header,o.cssHeader,o.cssAsc,o.cssDesc,w.css.sortAsc,w.css.sortDesc,w.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),s.find(o.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(o.namespace+" ")),w.restoreHeaders(t),i.toggleClass(w.css.table+" "+o.tableClass+" tablesorter-"+o.theme,!1===n),t.hasInitialized=!1,delete t.config.cache,"function"==typeof r&&r(t)}},w.regex={chunk:/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i},w.sortNatural=function(e,t){if(e===t)return 0;var n,r,i,o,a,s,u,l,c=w.regex;if(c.hex.test(t)){if((r=parseInt(e.match(c.hex),16))<(o=parseInt(t.match(c.hex),16)))return-1;if(r>o)return 1}for(n=e.replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),i=t.replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),l=Math.max(n.length,i.length),u=0;u<l;u++){if(a=isNaN(n[u])?n[u]||0:parseFloat(n[u])||0,s=isNaN(i[u])?i[u]||0:parseFloat(i[u])||0,isNaN(a)!==isNaN(s))return isNaN(a)?1:-1;if(typeof a!=typeof s&&(a+="",s+=""),a<s)return-1;if(a>s)return 1}return 0},w.sortNaturalAsc=function(e,t,n,r,i){if(e===t)return 0;var o=i.string[i.empties[n]||i.emptyTo];return""===e&&0!==o?"boolean"==typeof o?o?-1:1:-o||-1:""===t&&0!==o?"boolean"==typeof o?o?1:-1:o||1:w.sortNatural(e,t)},w.sortNaturalDesc=function(e,t,n,r,i){if(e===t)return 0;var o=i.string[i.empties[n]||i.emptyTo];return""===e&&0!==o?"boolean"==typeof o?o?-1:1:o||1:""===t&&0!==o?"boolean"==typeof o?o?1:-1:-o||-1:w.sortNatural(t,e)},w.sortText=function(e,t){return e>t?1:e<t?-1:0},w.getTextValue=function(e,t,n){if(n){var r,i=e?e.length:0,o=n+t;for(r=0;r<i;r++)o+=e.charCodeAt(r);return t*o}return 0},w.sortNumericAsc=function(e,t,n,r,i,o){if(e===t)return 0;var a=o.config,s=a.string[a.empties[i]||a.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:-s||-1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:s||1:(isNaN(e)&&(e=w.getTextValue(e,n,r)),isNaN(t)&&(t=w.getTextValue(t,n,r)),e-t)},w.sortNumericDesc=function(e,t,n,r,i,o){if(e===t)return 0;var a=o.config,s=a.string[a.empties[i]||a.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:s||1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:-s||-1:(isNaN(e)&&(e=w.getTextValue(e,n,r)),isNaN(t)&&(t=w.getTextValue(t,n,r)),t-e)},w.sortNumeric=function(e,t){return e-t},w.characterEquivalents={ 173a:"\xe1\xe0\xe2\xe3\xe4\u0105\xe5",A:"\xc1\xc0\xc2\xc3\xc4\u0104\xc5",c:"\xe7\u0107\u010d",C:"\xc7\u0106\u010c",e:"\xe9\xe8\xea\xeb\u011b\u0119",E:"\xc9\xc8\xca\xcb\u011a\u0118",i:"\xed\xec\u0130\xee\xef\u0131",I:"\xcd\xcc\u0130\xce\xcf",o:"\xf3\xf2\xf4\xf5\xf6",O:"\xd3\xd2\xd4\xd5\xd6",ss:"\xdf",SS:"\u1e9e",u:"\xfa\xf9\xfb\xfc\u016f",U:"\xda\xd9\xdb\xdc\u016e"},w.replaceAccents=function(e){var t,n="[",r=w.characterEquivalents;if(!w.characterRegex){for(t in w.characterRegexArray={},r)"string"==typeof t&&(n+=r[t],w.characterRegexArray[t]=new RegExp("["+r[t]+"]","g"));w.characterRegex=new RegExp(n+"]")}if(w.characterRegex.test(e))for(t in r)"string"==typeof t&&(e=e.replace(w.characterRegexArray[t],t));return e},w.isValueInArray=function(e,t){var n,r=t.length;for(n=0;n<r;n++)if(t[n][0]===e)return n;return-1},w.addParser=function(e){var t,n=w.parsers.length,r=!0;for(t=0;t<n;t++)w.parsers[t].id.toLowerCase()===e.id.toLowerCase()&&(r=!1);r&&w.parsers.push(e)},w.getParserById=function(e){if("false"==e)return!1;var t,n=w.parsers.length;for(t=0;t<n;t++)if(w.parsers[t].id.toLowerCase()===e.toString().toLowerCase())return w.parsers[t];return!1},w.addWidget=function(e){w.widgets.push(e)},w.hasWidget=function(t,n){return(t=e(t)).length&&t[0].config&&t[0].config.widgetInit[n]||!1},w.getWidgetById=function(e){var t,n,r=w.widgets.length;for(t=0;t<r;t++)if((n=w.widgets[t])&&n.hasOwnProperty("id")&&n.id.toLowerCase()===e.toLowerCase())return n},w.applyWidget=function(t,r){var i,o,a,s=(t=e(t)[0]).config,u=s.widgetOptions,l=[];!1!==r&&t.hasInitialized&&(t.isApplyingWidgets||t.isUpdating)||(s.debug&&(i=new Date),s.widgets.length&&(t.isApplyingWidgets=!0,s.widgets=e.grep(s.widgets,function(t,n){return e.inArray(t,s.widgets)===n}),e.each(s.widgets||[],function(e,t){(a=w.getWidgetById(t))&&a.id&&(a.priority||(a.priority=10),l[e]=a)}),l.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}
173),e.each(l,function(n,i){i&&(!r&&s.widgetInit[i.id]||(s.widgetInit[i.id]=!0,i.hasOwnProperty("options")&&(u=t.config.widgetOptions=e.extend(!0,{},i.options,u)),i.hasOwnProperty("init")&&i.init(t,i,s,u)),!r&&i.hasOwnProperty("format")&&i.format(t,s,u,!1))})),setTimeout(function(){t.isApplyingWidgets=!1},0),s.debug&&(o=s.widgets.length,n("Completed "+(!0===r?"initializing ":"applying ")+o+" widget"+(1!==o?"s":""),i)))},w.refreshWidgets=function(n,r,i){var o,a=(n=e(n)[0]).config,s=a.widgets,u=w.widgets,l=u.length;for(o=0;o<l;o++)u[o]&&u[o].id&&(r||e.inArray(u[o].id,s)<0)&&(a.debug&&t('Refeshing widgets: Removing "'+u[o].id+'"'),u[o].hasOwnProperty("remove")&&a.widgetInit[u[o].id]&&(u[o].remove(n,a,a.widgetOptions),a.widgetInit[u[o].id]=!1));!0!==i&&w.applyWidget(n,r)},w.getData=function(t,n,r){var i,o,a="",s=e(t);return s.length?(i=!!e.metadata&&s.metadata(),o=" "+(s.attr("class")||""),void 0!==s.data(r)||void 0!==s.data(r.toLowerCase())?a+=s.data(r)||s.data(r.toLowerCase()):i&&"undefined"!=typeof i[r]?a+=i[r]:n&&"undefined"!=typeof n[r]?a+=n[r]:" "!==o&&o.match(" "+r+"-")&&(a=o.match(new RegExp("\\s"+r+"-([\\w-]+)"))[1]||""),e.trim(a)):""},w.formatFloat=function(t,n){return"string"!=typeof t||""===t?t:(t=(n&&n.config?!1!==n.config.usNumberFormat:void 0===n||n)?t.replace(/,/g,""):t.replace(/[\s|\.]/g,"").replace(/,/g,"."),/^\s*\([.\d]+\)/.test(t)&&(t=t.replace(/^\s*\(([.\d]+)\)/,"-$1")),r=parseFloat(t),isNaN(r)?e.trim(t):r);var r},w.isDigit=function(e){return!isNaN(e)||/^[\-+(]?\d+[)]?$/.test(e.toString().replace(/[,.'"\s]/g,""))}}});var t=e.tablesorter;e.fn.extend({tablesorter:t.construct}),t.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),t.addParser({id:"text",is:function(){return!0},format:function(n,r){var i=r.config;return n&&(n=e.trim(i.ignoreCase?n.toLocaleLowerCase():n),n=i.sortLocaleCompare?t.replaceAccents(n):n),n},type:"text"}),t.addParser({id:"digit",is:function(e){return t.isDigit(e)},format:function(n,r){var i=t.formatFloat((n||"").replace(/[^\w,. \-()]/g,""),r);return n&&"number"==typeof i?i:n?e.trim(n&&r.config.ignoreCase?n.toLocaleLowerCase():n):n},type:"numeric"}),t.addParser({id:"currency",is:function(e){return/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/.test((e||"").replace(/[+\-,. ]/g,""))},format:function(n,r){var i=t.formatFloat((n||"").replace(/[^\w,. \-()]/g,""),r);return n&&"number"==typeof i?i:n?e.trim(n&&r.config.ignoreCase?n.toLocaleLowerCase():n):n},type:"numeric"}),t.addParser({id:"ipAddress",is:function(e){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(e)},format:function(e,n){var r,i=e?e.split("."):"",o="",a=i.length;for(r=0;r<a;r++)o+=("00"+i[r]).slice(-3);return e?t.formatFloat(o,n):e},type:"numeric"}),t.addParser({id:"url",is:function(e){return/^(https?|ftp|file):\/\//.test(e)},format:function(t){return t?e.trim(t.replace(/(https?|ftp|file):\/\//,"")):t},type:"text"}),t.addParser({id:"isoDate",is:function(e){return/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/.test(e)},format:function(e,n){return e?t.formatFloat(""!==e?new Date(e.replace(/-/g,"/")).getTime()||e:"",n):e},type:"numeric"}),t.addParser({id:"percent",is:function(e){return/(\d\s*?%|%\s*?\d)/.test(e)&&e.length<15},format:function(e,n){return e?t.formatFloat(e.replace(/%/g,""),n):e},type:"numeric"}),t.addParser({id:"usLongDate",is:function(e){return/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i.test(e)||/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i.test(e)},format:function(e,n){return e?t.formatFloat(new Date(e.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||e,n):e},type:"numeric"}),t.addParser({id:"shortDate",is:function(e){return/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/.test((e||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(e,n,r,i){if(e){var o=n.config,a=o.$headers.filter("[data-column="+i+"]:last"),s=a.length&&a[0].dateFormat||t.getData(a,t.getColumnData(n,o.headers,i),"dateFormat")||o.dateFormat;e=e.replace(/\s+/g," ").replace(/[\-.,]/g,"/"),"mmddyyyy"===s?e=e.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2"):"ddmmyyyy"===s?e=e.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1"):"yyyymmdd"===s&&(e=e.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3"))}return e?t.formatFloat(new Date(e).getTime()||e,n):e},type:"numeric"}),t.addParser({id:"time",is:function(e){return/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i.test(e)},format:function(e,n){return e?t.formatFloat(new Date("2000/01/01 "+e.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||e,n):e},type:"numeric"}),t.addParser({id:"metadata",is:function(){return!1},format:function(t,n,r){var i=n.config,o=i.parserMetadataName?i.parserMetadataName:"sortValue";return e(r).metadata()[o]},type:"numeric"}),t.addWidget({id:"zebra",priority:90,format:function(n,r,i){var o,a,s,u,l,c,d=new RegExp(r.cssChildRow,"i"),f=r.$tbodies;for(r.debug&&(l=new Date),c=0;c<f.length;c++)(o=f.eq(c)).children("tr").length>1&&(s=0,o.children("tr:visible").not(r.selectorRemove).each(function(){a=e(this),d.test(this.className)||s++,u=s%2==0,a.removeClass(i.zebra[u?1:0]).addClass(i.zebra[u?0:1])}));r.debug&&t.benchmark("Applying Zebra widget",l)},remove:function(t,n,r){var i,o,a=n.$tbodies,s=(r.zebra||["even","odd"]).join(" ");for(i=0;i<a.length;i++)(o=e.tablesorter.processTbody(t,a.eq(i),!0)).children().removeClass(s),e.tablesorter.processTbody(t,o,!1)}})}(jQuery), 174/* 175 * jQuery Highlight plugin 176 * 177 * Based on highlight v3 by Johann Burkard 178 * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html 179 * 180 * Code a little bit refactored and cleaned (in my humble opinion). 181 * Most important changes: 182 * - has an option to highlight only entire words (wordsOnly - false by default), 183 * - has an option to be case sensitive (caseSensitive - false by default)
184 * - highlight element tag and class names can be specified in options 185 * 186 * Usage: 187 * // wrap every occurrance of text 'lorem' in content 188 * // with <span class='highlight'> (default options) 189 * $('#content').highlight('lorem'); 190 * 191 * // search for and highlight more terms at once 192 * // so you can save some time on traversing DOM 193 * $('#content').highlight(['lorem', 'ipsum']); 194 * $('#content').highlight('lorem ipsum'); 195 * 196 * // search only for entire word 'lorem' 197 * $('#content').highlight('lorem', { wordsOnly: true }); 198 * 199 * // don't ignore case during search of term 'lorem' 200 * $('#content').highlight('lorem', { caseSensitive: true }); 201 * 202 * // wrap every occurrance of term 'ipsum' in content 203 * // with <em class='important'> 204 * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); 205 * 206 * // remove default highlight 207 * $('#content').unhighlight(); 208 * 209 * // remove custom highlight 210 * $('#content').unhighlight({ element: 'em', className: 'important' }); 211 * 212 * 213 * Copyright (c) 2009 Bartek Szopka 214 * 215 * Licensed under MIT license. 216 * 217 */ 218jQuery.extend({highlight:function(e,t,n,r){if(3===e.nodeType){var i=e.data.match(t);if(i){var o=document.createElement(n||"span");o.className=r||"highlight";var a=e.splitText(i.index);a.splitText(i[0].length);var s=a.cloneNode(!0);return o.appendChild(s),a.parentNode.replaceChild(o,a),1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&(e.tagName!==n.toUpperCase()||e.className!==r))for(var u=0;u<e.childNodes.length;u++)u+=jQuery.highlight(e.childNodes[u],t,n,r);return 0}}),jQuery.fn.unhighlight=function(e){var t={className:"highlight",element:"span"};return jQuery.extend(t,e),this.find(t.element+"."+t.className).each(function(){var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()}).end()},jQuery.fn.highlight=function(e,t){var n={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1};if(jQuery.extend(n,t),e.constructor===String&&(e=[e]),e=jQuery.grep(e,function(e){return""!=e}),0==(e=jQuery.map(e,function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")})).length)return this;var r=n.caseSensitive?"":"i",i="("+e.join("|")+")";n.wordsOnly&&(i="\\b"+i+"\\b");var o=new RegExp(i,r);return this.each(function(){jQuery.highlight(this,o,n.element,n.className)})},function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(){(function(){var e,t,n,r,i,o,a,s,u,l,c,d,f,h,p,m,v,g,y,b=[].slice,_=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};(e=jQuery).payment={},e.payment.fn={},e.fn.payment=function(){var t,n;return n=arguments[0],t=2<=arguments.length?b.call(arguments,1):[],e.payment.fn[n].apply(this,t)},r=[{type:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,format:i=/(\d{1,4})/g,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:i,length:[14],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!1}
218,{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"visa",pattern:/^4/,format:i,length:[13,16],cvcLength:[3],luhn:!0}],t=function(e){var t,n,i;for(e=(e+"").replace(/\D/g,""),n=0,i=r.length;n<i;n++)if((t=r[n]).pattern.test(e))return t},n=function(e){var t,n,i;for(n=0,i=r.length;n<i;n++)if((t=r[n]).type===e)return t},f=function(e){var t,n,r,i,o,a;for(r=!0,i=0,o=0,a=(n=(e+"").split("").reverse()).length;o<a;o++)t=n[o],t=parseInt(t,10),(r=!r)&&(t*=2),t>9&&(t-=9),i+=t;return i%10==0},d=function(e){var t;return null!=e.prop("selectionStart")&&e.prop("selectionStart")!==e.prop("selectionEnd")||!("undefined"==typeof document||null===document||null==(t=document.selection)||"function"!=typeof t.createRange||!t.createRange().text)},h=function(t){return setTimeout(function(){var n,r;return r=(n=e(t.currentTarget)).val(),r=e.payment.formatCardNumber(r),n.val(r)})},s=function(n){var r,i,o,a,s,u,l;if(o=String.fromCharCode(n.which),/^\d+$/.test(o)&&(l=(r=e(n.currentTarget)).val(),i=t(l+o),a=(l.replace(/\D/g,"")+o).length,u=16,i&&(u=i.length[i.length.length-1]),!(a>=u||null!=r.prop("selectionStart")&&r.prop("selectionStart")!==l.length)))return(s=i&&"amex"===i.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/).test(l)?(n.preventDefault(),r.val(l+" "+o)):s.test(l+o)?(n.preventDefault(),r.val(l+o+" ")):void 0},o=function(t){var n,r;if(r=(n=e(t.currentTarget)).val(),!t.meta&&8===t.which&&(null==n.prop("selectionStart")||n.prop("selectionStart")===r.length))return/\d\s$/.test(r)?(t.preventDefault(),n.val(r.replace(/\d\s$/,""))):/\s\d?$/.test(r)?(t.preventDefault(),n.val(r.replace(/\s\d?$/,""))):void 0},u=function(t){var n,r,i;if(r=String.fromCharCode(t.which),/^\d+$/.test(r))return i=(n=e(t.currentTarget)).val()+r,/^\d$/.test(i)&&"0"!==i&&"1"!==i?(t.preventDefault(),n.val("0"+i+" / ")):/^\d\d$/.test(i)?(t.preventDefault(),n.val(i+" / ")):void 0},l=function(t){var n,r,i;if(r=String.fromCharCode(t.which),/^\d+$/.test(r))return i=(n=e(t.currentTarget)).val(),/^\d\d$/.test(i)?n.val(i+" / "):void 0},c=function(t){var n,r;if("/"===String.fromCharCode(t.which))return r=(n=e(t.currentTarget)).val(),/^\d$/.test(r)&&"0"!==r?n.val("0"+r+" / "):void 0},a=function(t){var n,r;if(!t.meta&&(r=(n=e(t.currentTarget)).val(),8===t.which&&(null==n.prop("selectionStart")||n.prop("selectionStart")===r.length)))return/\d(\s|\/)+$/.test(r)?(t.preventDefault(),n.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),n.val(r.replace(/\s\/\s?\d?$/,""))):void 0},g=function(e){var t;return!(!e.metaKey&&!e.ctrlKey)||32!==e.which&&(0===e.which||(e.which<33||(t=String.fromCharCode(e.which),!!/[\d\s]/.test(t))))},m=function(n){var r,i,o,a;if(r=e(n.currentTarget),o=String.fromCharCode(n.which),/^\d+$/.test(o)&&!d(r))return a=(r.val()+o).replace(/\D/g,""),(i=t(a))?a.length<=i.length[i.length.length-1]:a.length<=16},v=function(t){var n,r;if(n=e(t.currentTarget),r=String.fromCharCode(t.which),/^\d+$/.test(r)&&!d(n))return!((n.val()+r).replace(/\D/g,"").length>6)&&void 0},p=function(t){var n,r;if(n=e(t.currentTarget),r=String.fromCharCode(t.which),/^\d+$/.test(r)&&!d(n))return(n.val()+r).length<=4},y=function(t){var n,i,o,a,s;if(s=(n=e(t.currentTarget)).val(),a=e.payment.cardType(s)||"unknown",!n.hasClass(a))return i=function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)o=r[e],n.push(o.type);return n}(),n.removeClass("unknown"),n.removeClass(i.join(" ")),n.addClass(a),n.toggleClass("identified","unknown"!==a),n.trigger("payment.cardType",a)},e.payment.fn.formatCardCVC=function(){return this.payment("restrictNumeric"),this.on("keypress",p),this},e.payment.fn.formatCardExpiry=function(){return this.payment("restrictNumeric"),this.on("keypress",v),this.on("keypress",u),this.on("keypress",c),this.on("keypress",l),this.on("keydown",a),this},e.payment.fn.formatCardNumber=function(){return this.payment("restrictNumeric"),this.on("keypress",m),this.on("keypress",s),this.on("keydown",o),this.on("keyup",y),this.on("paste",h),this},e.payment.fn.restrictNumeric=function(){return this.on("keypress",g),this},e.payment.fn.cardExpiryVal=function(){return e.payment.cardExpiryVal(e(this).val())},e.payment.cardExpiryVal=function(e){var t,n,r;return t=(r=(e=e.replace(/\s/g,"")).split("/",2))[0],2===(null!=(n=r[1])?n.length:void 0)&&/^\d+$/.test(n)&&(n=(new Date).getFullYear().toString().slice(0,2)+n),{month:t=parseInt(t,10),year:n=parseInt(n,10)}},e.payment.validateCardNumber=function(e){var n,r;return e=(e+"").replace(/\s+|-/g,""),!!/^\d+$/.test(e)&&(!!(n=t(e))&&(r=e.length,_.call(n.length,r)>=0&&(!1===n.luhn||f(e))))},e.payment.validateCardExpiry=function(t,n){var r,i,o;return"object"==typeof t&&"month"in t&&(t=(o=t).month,n=o.year),!(!t||!n)&&(t=e.trim(t),n=e.trim(n),!!/^\d+$/.test(t)&&!!/^\d+$/.test(n)&&parseInt(t,10)<=12&&(2===n.length&&(n=(new Date).getFullYear().toString().slice(0,2)+n),i=new Date(n,t),r=new Date,i.setMonth(i.getMonth()-1),i.setMonth(i.getMonth()+1,
2181),i>r))},e.payment.validateCardCVC=function(t,r){var i,o;return t=e.trim(t),!!/^\d+$/.test(t)&&(r?(i=t.length,_.call(null!=(o=n(r))?o.cvcLength:void 0,i)>=0):t.length>=3&&t.length<=4)},e.payment.cardType=function(e){var n;return e&&(null!=(n=t(e))?n.type:void 0)||null},e.payment.formatCardNumber=function(e){var n,r,i,o;return(n=t(e))?(i=n.length[n.length.length-1],e=(e=e.replace(/\D/g,"")).slice(0,+i+1||9e9),n.format.global?null!=(o=e.match(n.format))?o.join(" "):void 0:(null!=(r=n.format.exec(e))&&r.shift(),null!=r?r.join(" "):void 0)):e}}).call(this)},{}],2:[function(e){var t,n,r=[].slice;e("jquery.payment"),(t=jQuery).card={},t.card.fn={},t.fn.card=function(e){return t.card.fn.construct.apply(this,e)},n=function(){function e(e,n){this.options=t.extend({},this.defaults,n),this.$el=t(e),this.options.container&&(this.$container=t(this.options.container),this.render(),this.attachHandlers())}var n;return e.prototype.template='<div class="card-container">\n <div class="card">\n <div class="front">\n <div class="logo visa">visa</div>\n <div class="logo mastercard">MasterCard</div>\n <div class="logo amex"></div>\n <div class="logo discover">discover</div>\n <div class="lower">\n <div class="shiny"></div>\n <div class="cvc display">\u2022\u2022\u2022\u2022</div>\n <div class="number display">\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022</div>\n <div class="name display">Full name</div>\n <div class="expiry display">\u2022\u2022/\u2022\u2022</div>\n </div>\n </div>\n <div class="back">\n <div class="bar"></div>\n <div class="cvc display">\u2022\u2022\u2022</div>\n <div class="shiny"></div>\n </div>\n </div>\n</div>',e.prototype.cardTypes=["maestro","dinersclub","laser","jcb","unionpay","discover","mastercard","amex","visa"],e.prototype.defaults={formatting:!0,formSelectors:{numberInput:'input[name="number"]',expiryInput:'input[name="expiry"]',cvcInput:'input[name="cvc"]',nameInput:'input[name="name"]'},cardSelectors:{cardContainer:".card-container",card:".card",numberDisplay:".number",expiryDisplay:".expiry",cvcDisplay:".cvc",nameDisplay:".name"}},e.prototype.render=function(){var e,n,r;if(this.$container.append(this.template),t.each(this.options.cardSelectors,(r=this,function(e,t){return r["$"+e]=r.$container.find(t)})),t.each(this.options.formSelectors,function(e){return function(n,r){var i;return(i=e.options[n]?t(e.options[n]):e.$el.find(r)).length,e["$"+n]=i}}(this)),this.options.formatting&&(this.$numberInput.payment("formatCardNumber"),this.$expiryInput.payment("formatCardExpiry"),this.$cvcInput.payment("formatCardCVC")),this.options.width&&(e=parseInt(this.$cardContainer.css("width")),this.$cardContainer.css("transform","scale("+this.options.width/e+")")),("undefined"!=typeof navigator&&null!==navigator?navigator.userAgent:void 0)&&-1!==(n=navigator.userAgent.toLowerCase()).indexOf("safari")&&-1===n.indexOf("chrome"))return this.$card.addClass("no-radial-gradient")},e.prototype.attachHandlers=function(){return this.$numberInput.bindVal(this.$numberDisplay,{fill:!1,filters:n("validateCardNumber")}).on("payment.cardType",this.handle("setCardType")),this.$expiryInput.bindVal(this.$expiryDisplay,{filters:[function(e){return e.replace(/(\s+)/g,"")},n("validateCardExpiry")]}).on("keydown",this.handle("captureTab")),this.$cvcInput.bindVal(this.$cvcDisplay,n("validateCardCVC")).on("focus",this.handle("flipCard")).on("blur",this.handle("flipCard")),this.$nameInput.bindVal(this.$nameDisplay,{fill:!1})},e.prototype.handle=function(e){return n=this,function(r){var i,o;return i=t(r.currentTarget),(o=Array.prototype.slice.call(arguments)).unshift(i),n.handlers[e].apply(n,o)};var n},e.prototype.handlers={setCardType:function(e,t,n){if(!this.$card.hasClass(n))return this.$card.removeClass("unknown"),this.$card.removeClass(this.cardTypes.join(" ")),this.$card.addClass(n),this.$card.toggleClass("identified","unknown"!==n)},flipCard:function(){return this.$card.toggleClass("flipped")},captureTab:function(e,n){var r;if(9===(n.keyCode||n.which)&&!n.shiftKey&&((r=e.payment("cardExpiryVal")).month||r.year))return t.payment.validateCardExpiry(r.month,r.year)?void 0:n.preventDefault()}},t.fn.bindVal=function(e,n){var r,i,o;return null==n&&(n={}),n.fill=n.fill||!1,n.filters=n.filters||[],n.filters instanceof Array||(n.filters=[n.filters]),r=t(this),o=function(){var t,n,r;for(r=[],i=t=0,n=e.length;t<n;i=++t)e[i],r.push(e.eq(i).text());return r}(),r.on("focus",function(){return e.addClass("focused")}),r.on("blur",function(){return e.removeClass("focused")}),r.on("keyup change",function(){var t,a,s,u,l,c,d,f;for(a=r.val(),s=0,l=(d=n.filters).length;s<l;s++)a=(0,d[s])(a,r,e);for(f=[],i=u=0,c=e.length;u<c;i=++u)e[i],t=n.fill?a+o[i].substring(a.length):a||o[i],f.push(e.eq(i).text(t));return f}),r}
218,n=function(e){return function(n,r,i){return i.toggleClass("valid",t.payment[e](n)),n}},e}(),t.fn.extend({card:function(){var e,i;return i=arguments[0],e=2<=arguments.length?r.call(arguments,1):[],this.each(function(){var r,o;if((o=(r=t(this)).data("card"))||r.data("card",o=new n(this,i)),"string"==typeof i)return o[i].apply(o,e)})}})},{"jquery.payment":1}]},{},[2]), 219/** 220 * @license Rangy, a cross-browser JavaScript range and selection library 221 * http://code.google.com/p/rangy/ 222 * 223 * Copyright 2012, Tim Down 224 * Licensed under the MIT license. 225 * Version: 1.2.3 226 * Build date: 26 February 2012 227 */ 228window.rangy=function(){function e(e,t){var n=typeof e[t];return n==d||!(n!=c||!e[t])||"unknown"==n}function t(e,t){return!(typeof e[t]!=c||!e[t])}function n(e,t){return typeof e[t]!=f}function r(e){return function(t,n){for(var r=n.length;r--;)if(!e(t,n[r]))return!1;return!0}}function i(e){return e&&g(e,v)&&b(e,m)}function o(e){window.alert("Rangy not supported in your browser. Reason: "+e),_.initialized=!0,_.supported=!1}function a(e){var t="Rangy warning: "+e;_.config.alertOnWarn?window.alert(t):typeof window.console!=f&&typeof window.console.log!=f&&window.console.log(t)}function s(){if(!_.initialized){var n,r=!1,a=!1;e(document,"createRange")&&(n=document.createRange(),g(n,p)&&b(n,h)&&(r=!0),n.detach());var s=t(document,"body")?document.body:document.getElementsByTagName("body")[0];s&&e(s,"createTextRange")&&i(n=s.createTextRange())&&(a=!0),r||a||o("Neither Range nor TextRange are implemented"),_.initialized=!0,_.features={implementsDomRange:r,implementsTextRange:a};for(var u=w.concat(x),l=0,c=u.length;l<c;++l)try{u[l](_)}catch(d){t(window,"console")&&e(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",d)}}}function u(e){e=e||window,s();for(var t=0,n=C.length;t<n;++t)C[t](e)}function l(e){this.name=e,this.initialized=!1,this.supported=!1}var c="object",d="function",f="undefined",h=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],p=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],m=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],v=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],g=r(e),y=r(t),b=r(n),_={version:"1.2.3",initialized:!1,supported:!0,util:{isHostMethod:e,isHostObject:t,isHostProperty:n,areHostMethods:g,areHostObjects:y,areHostProperties:b,isTextRange:i},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};_.fail=o,_.warn=a,!{}.hasOwnProperty?o("hasOwnProperty not supported"):_.util.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};var x=[],w=[];_.init=s,_.addInitListener=function(e){_.initialized?e(_):x.push(e)};var C=[];_.addCreateMissingNativeApiListener=function(e){C.push(e)},_.createMissingNativeApi=u,l.prototype.fail=function(e){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+e)},l.prototype.warn=function(e){_.warn("Module "+this.name+": "+e)},l.prototype.createError=function(e){return new Error("Error in Rangy "+this.name+" module: "+e)},_.createModule=function(e,t){var n=new l(e);_.modules[e]=n,w.push(function(e){t(e,n),n.initialized=!0,n.supported=!0}
228)},_.requireModules=function(e){for(var t,n,r=0,i=e.length;r<i;++r){if(n=e[r],!((t=_.modules[n])&&t instanceof l))throw new Error("Module '"+n+"' not found");if(!t.supported)throw new Error("Module '"+n+"' not supported")}};var k=!1,S=function(){k||(k=!0,_.initialized||s())};if(typeof window!=f){if(typeof document!=f)return e(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",S,!1),e(window,"addEventListener")?window.addEventListener("load",S,!1):e(window,"attachEvent")?window.attachEvent("onload",S):o("Window does not have required addEventListener or attachEvent method"),_;o("No document found")}else o("No window found")}(),rangy.createModule("DomUtil",function(e,t){function n(e){var t;return typeof e.namespaceURI==S||null===(t=e.namespaceURI)||"http://www.w3.org/1999/xhtml"==t}function r(e){var t=e.parentNode;return 1==t.nodeType?t:null}function i(e){for(var t=0;e=e.previousSibling;)t++;return t}function o(e){var t;return l(e)?e.length:(t=e.childNodes)?t.length:0}function a(e,t){var n,r=[];for(n=e;n;n=n.parentNode)r.push(n);for(n=t;n;n=n.parentNode)if(P(r,n))return n;return null}function s(e,t,n){for(var r=n?t:t.parentNode;r;){if(r===e)return!0;r=r.parentNode}return!1}function u(e,t,n){for(var r,i=n?e:e.parentNode;i;){if((r=i.parentNode)===t)return i;i=r}return null}function l(e){var t=e.nodeType;return 3==t||4==t||8==t}function c(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function d(e,t){var n=e.cloneNode(!1);return n.deleteData(0,t),e.deleteData(t,e.length-t),c(n,e),n}function f(e){if(9==e.nodeType)return e;if(typeof e.ownerDocument!=S)return e.ownerDocument;if(typeof e.document!=S)return e.document;if(e.parentNode)return f(e.parentNode);throw new Error("getDocument: no document found for node")}function h(e){var t=f(e);if(typeof t.defaultView!=S)return t.defaultView;if(typeof t.parentWindow!=S)return t.parentWindow;throw new Error("Cannot get a window object for node")}function p(e){if(typeof e.contentDocument!=S)return e.contentDocument;if(typeof e.contentWindow!=S)return e.contentWindow.document;throw new Error("getIframeWindow: No Document object found for iframe element")}function m(e){if(typeof e.contentWindow!=S)return e.contentWindow;if(typeof e.contentDocument!=S)return e.contentDocument.defaultView;throw new Error("getIframeWindow: No Window object found for iframe element")}function v(e){return j.isHostObject(e,"body")?e.body:e.getElementsByTagName("body")[0]}function g(e){for(var t;t=e.parentNode;)e=t;return e}function y(e,t,n,r){var o,s,l,c,d;if(e==n)return t===r?0:t<r?-1:1;if(o=u(n,e,!0))return t<=i(o)?-1:1;if(o=u(e,n,!0))return i(o)<r?-1:1;if((l=e===(s=a(e,n))?s:u(e,s,!0))===(c=n===s?s:u(n,s,!0)))throw new Error("comparePoints got to case 4 and childA and childB are the same!");for(d=s.firstChild;d;){if(d===l)return-1;if(d===c)return 1;d=d.nextSibling}throw new Error("Should not be here!")}function b(e){for(var t,n=f(e).createDocumentFragment();t=e.firstChild;)n.appendChild(t);return n}function _(e){if(!e)return"[No node]";if(l(e))return'"'+e.data+'"';if(1==e.nodeType){var t=e.id?' id="'+e.id+'"':"";return"<"+e.nodeName+t+">["+e.childNodes.length+"]"}return e.nodeName}function x(e){this.root=e,this._next=e}function w(e){return new x(e)}function C(e,t){this.node=e,this.offset=t}function k(e){this.code=this[e],this.codeName=e,this.message="DOMException: "+this.codeName}var S="undefined",j=e.util;j.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||t.fail("document missing a Node creation method"),j.isHostMethod(document,"getElementsByTagName")||t.fail("document missing getElementsByTagName method");var E=document.createElement("div");j.areHostMethods(E,["insertBefore","appendChild","cloneNode"]||!j.areHostObjects(E,["previousSibling","nextSibling","childNodes","parentNode"]))||t.fail("Incomplete Element implementation"),j.isHostProperty(E,"innerHTML")||t.fail("Element is missing innerHTML property");var T=document.createTextNode("test");j.areHostMethods(T,["splitText","deleteData","insertData","appendData","cloneNode"]||!j.areHostObjects(E,["previousSibling","nextSibling","childNodes","parentNode"])||!j.areHostProperties(T,["data"]))||t.fail("Incomplete Text Node implementation");var P=function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1};x.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var e,t,n=this._current=this._next;if(this._current)if(e=n.firstChild)this._next=e;else{for(t=null;n!==this.root&&!(t=n.nextSibling);)n=n.parentNode;this._next=t}return this._current},detach:function(){this._current=this._next=this.root=null}},C.prototype={equals:function(e){return this.node===e.node&this.offset==e.offset},inspect:function(){return"[DomPosition("+_(this.node)+":"+this.offset+")]"}},k.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ER
228R:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11},k.prototype.toString=function(){return this.message},e.dom={arrayContains:P,isHtmlNamespace:n,parentElement:r,getNodeIndex:i,getNodeLength:o,getCommonAncestor:a,isAncestorOf:s,getClosestAncestorIn:u,isCharacterDataNode:l,insertAfter:c,splitDataNode:d,getDocument:f,getWindow:h,getIframeWindow:m,getIframeDocument:p,getBody:v,getRootContainer:g,comparePoints:y,inspectNode:_,fragmentFromNodeChildren:b,createIterator:w,DomPosition:C},e.DOMException=k}),rangy.createModule("DomRange",function(e){function t(e,t){return 3!=e.nodeType&&(O.isAncestorOf(e,t.startContainer,!0)||O.isAncestorOf(e,t.endContainer,!0))}function n(e){return O.getDocument(e.startContainer)}function r(e,t,n){var r=e._listeners[t];if(r)for(var i=0,o=r.length;i<o;++i)r[i].call(e,{target:e,args:n})}function i(e){return new F(e.parentNode,O.getNodeIndex(e))}function o(e){return new F(e.parentNode,O.getNodeIndex(e)+1)}function a(e,t,n){var r=11==e.nodeType?e.firstChild:e;return O.isCharacterDataNode(t)?n==t.length?O.insertAfter(e,t):t.parentNode.insertBefore(e,0==n?t:O.splitDataNode(t,n)):n>=t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[n]),r}function s(e){for(var t,r,i,o=n(e.range).createDocumentFragment();r=e.next();){if(t=e.isPartiallySelectedSubtree(),r=r.cloneNode(!t),t&&(i=e.getSubtreeIterator(),r.appendChild(s(i)),i.detach(!0)),10==r.nodeType)throw new L("HIERARCHY_REQUEST_ERR");o.appendChild(r)}return o}function u(e,t,n){var r,i,o,a;for(n=n||{stop:!1};o=e.next();)if(e.isPartiallySelectedSubtree()){if(!1===t(o))return void(n.stop=!0);if(u(a=e.getSubtreeIterator(),t,n),a.detach(!0),n.stop)return}else for(r=O.createIterator(o);i=r.next();)if(!1===t(i))return void(n.stop=!0)}function l(e){for(var t;e.next();)e.isPartiallySelectedSubtree()?(l(t=e.getSubtreeIterator()),t.detach(!0)):e.remove()}function c(e){for(var t,r,i=n(e.range).createDocumentFragment();t=e.next();){if(e.isPartiallySelectedSubtree()?(t=t.cloneNode(!1),r=e.getSubtreeIterator(),t.appendChild(c(r)),r.detach(!0)):e.remove(),10==t.nodeType)throw new L("HIERARCHY_REQUEST_ERR");i.appendChild(t)}return i}function d(e,t,n){var r,i=!(!t||!t.length),o=!!n;i&&(r=new RegExp("^("+t.join("|")+")$"));var a=[];return u(new h(e,!1),function(e){i&&!r.test(e.nodeType)||o&&!n(e)||a.push(e)}),a}function f(e){return"["+("undefined"==typeof e.getName?"Range":e.getName())+"("+O.inspectNode(e.startContainer)+":"+e.startOffset+", "+O.inspectNode(e.endContainer)+":"+e.endOffset+")]"}function h(e,t){if(this.range=e,this.clonePartiallySelectedTextNodes=t,!e.collapsed){this.sc=e.startContainer,this.so=e.startOffset,this.ec=e.endContainer,this.eo=e.endOffset;var n=e.commonAncestorContainer;this.sc===this.ec&&O.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==n||O.isCharacterDataNode(this.sc)?O.getClosestAncestorIn(this.sc,n,!0):this.sc.childNodes[this.so],this._last=this.ec!==n||O.isCharacterDataNode(this.ec)?O.getClosestAncestorIn(this.ec,n,!0):this.ec.childNodes[this.eo-1])}}function p(e){this.code=this[e],this.codeName=e,this.message="RangeException: "+this.codeName}function m(e,t,n){this.nodes=d(e,t,n),this._next=this.nodes[0],this._position=0}function v(e){return function(t,n){for(var r,i=n?t:t.parentNode;i;){if(r=i.nodeType,O.arrayContains(e,r))return i;i=i.parentNode}return null}}
228function g(e,t){if(Q(e,t))throw new p("INVALID_NODE_TYPE_ERR")}function y(e){if(!e.startContainer)throw new L("INVALID_STATE_ERR")}function b(e,t){if(!O.arrayContains(t,e.nodeType))throw new p("INVALID_NODE_TYPE_ERR")}function _(e,t){if(t<0||t>(O.isCharacterDataNode(e)?e.length:e.childNodes.length))throw new L("INDEX_SIZE_ERR")}function x(e,t){if(V(e,!0)!==V(t,!0))throw new L("WRONG_DOCUMENT_ERR")}function w(e){if(K(e,!0))throw new L("NO_MODIFICATION_ALLOWED_ERR")}function C(e,t){if(!e)throw new L(t)}function k(e){return!O.arrayContains(B,e.nodeType)&&!V(e,!0)}function S(e,t){return t<=(O.isCharacterDataNode(e)?e.length:e.childNodes.length)}function j(e){return!!e.startContainer&&!!e.endContainer&&!k(e.startContainer)&&!k(e.endContainer)&&S(e.startContainer,e.startOffset)&&S(e.endContainer,e.endOffset)}function E(e){if(y(e),!j(e))throw new Error("Range error: Range is no longer valid after DOM mutation ("+e.inspect()+")")}function T(){}function P(e){e.START_TO_START=Z,e.START_TO_END=ee,e.END_TO_END=te,e.END_TO_START=ne,e.NODE_BEFORE=re,e.NODE_AFTER=ie,e.NODE_BEFORE_AND_AFTER=oe,e.NODE_INSIDE=ae}function $(e){P(e),P(e.prototype)}function N(e,t){return function(){E(this);var n,r=this.startContainer,i=this.startOffset,a=this.commonAncestorContainer,s=new h(this,!0);r!==a&&(r=(n=o(O.getClosestAncestorIn(r,a,!0))).node,i=n.offset),u(s,w),s.reset();var l=e(s);return s.detach(),t(this,r,i,r,i),l}}function R(n,r,a){function s(e,t){return function(n){y(this),b(n,H),b(W(n),B);var r=(e?i:o)(n);(t?u:d)(this,r.node,r.offset)}}function u(e,t,n){var i=e.endContainer,o=e.endOffset;t===e.startContainer&&n===e.startOffset||(W(t)==W(i)&&1!=O.comparePoints(t,n,i,o)||(i=t,o=n),r(e,t,n,i,o))}function d(e,t,n){var i=e.startContainer,o=e.startOffset;t===e.endContainer&&n===e.endOffset||(W(t)==W(i)&&-1!=O.comparePoints(t,n,i,o)||(i=t,o=n),r(e,i,o,t,n))}function f(e,t,n){t===e.startContainer&&n===e.startOffset&&t===e.endContainer&&n===e.endOffset||r(e,t,n,t,n)}n.prototype=new T,e.util.extend(n.prototype,{setStart:function(e,t){y(this),g(e,!0),_(e,t),u(this,e,t)},setEnd:function(e,t){y(this),g(e,!0),_(e,t),d(this,e,t)},setStartBefore:s(!0,!0),setStartAfter:s(!1,!0),setEndBefore:s(!0,!1),setEndAfter:s(!1,!1),collapse:function(e){E(this),e?r(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):r(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(e){y(this),g(e,!0),r(this,e,0,e,O.getNodeLength(e))},selectNode:function(e){y(this),g(e,!1),b(e,H);var t=i(e),n=o(e);r(this,t.node,t.offset,n.node,n.offset)},extractContents:N(c,r),deleteContents:N(l,r),canSurroundContents:function(){E(this),w(this.startContainer),w(this.endContainer);var e=new h(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},detach:function(){a(this)},splitBoundaries:function(){E(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,i=this.endOffset,o=e===n;O.isCharacterDataNode(n)&&i>0&&i<n.length&&O.splitDataNode(n,i),O.isCharacterDataNode(e)&&t>0&&t<e.length&&(e=O.splitDataNode(e,t),o?(i-=t,n=e):n==e.parentNode&&i>=O.getNodeIndex(e)&&i++,t=0),r(this,e,t,n,i)},normalizeBoundaries:function(){E(this);var e=this.startContainer,t=this.startOffset,n=this.endContainer,i=this.endOffset,o=function(e){var t=e.nextSibling;t&&t.nodeType==e.nodeType&&(n=e,i=e.length,e.appendData(t.data),t.parentNode.removeChild(t))},a=function(r){var o=r.previousSibling;if(o&&o.nodeType==r.nodeType){e=r;var a=r.length;if(t=o.length,r.insertData(0,o.data),o.parentNode.removeChild(o),e==n)i+=t,n=e;else if(n==r.parentNode){var s=O.getNodeIndex(r);i==s?(n=r,i=a):i>s&&i--}}},s=!0;if(O.isCharacterDataNode(n))n.length==i&&o(n);else{if(i>0){var u=n.childNodes[i-1];u&&O.isCharacterDataNode(u)&&o(u)}s=!this.collapsed}if(s){if(O.isCharacterDataNode(e))0==t&&a(e);else if(t<e.childNodes.length){var l=e.childNodes[t];l&&O.isCharacterDataNode(l)&&a(l)}}else e=n,t=i;r(this,e,t,n,i)},collapseToPoint:function(e,t){y(this),g(e,!0),_(e,t),f(this,e,t)}}),$(n)}function M(e){e.collapsed=e.startContainer===e.endContainer&&e.startOffset===e.endOffset,e.commonAncestorContainer=e.collapsed?e.startContainer:O.getCommonAncestor(e.startContainer,e.endContainer)}function D(e,t,n,i,o){var a=e.startContainer!==t||e.startOffset!==n,s=e.endContainer!==i||e.endOffset!==o;e.startContainer=t,e.startOffset=n,e.endContainer=i,e.endOffset=o,M(e),r(e,"boundarychange",{startMoved:a,endMoved:s})}function A(e){y(e),e.startContainer=e.startOffset=e.endContainer=e.endOffset=null,e.collapsed=e.commonAncestorContainer=null,r(e,"detach",null),e._listeners=null}function I(e){this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=0,this._listeners={boundarychange:[],detach:[]},M(this)}e.requireModules(["DomUtil"]);var O=e.dom,F=O.DomPosition,L=e.DOMException;h.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var e=this._current=this._next;return e&&(this._next=e!==this._last?e.nextSibling:null,O.isCharacterDataNode(e)&&this.clonePartiallySelectedTextNodes&&(e===this.ec&&(e=e.cloneNode(!0)).deleteData(this.eo,e.length-this.eo),this._current===this.sc&&(e=e.cloneNode(!0)).deleteData(0,this.so))),e},remove:function(){var e,t,n=this._current;!O.isCharacterDataNode(n)||n!==this.sc&&n!==this.ec?n.parentNode&&n.parentNode.removeChild(n):(e=n===this.sc?this.so:0)!=(t=n===this.ec?this.eo:n.length)&&n.deleteData(e,t-e)},isPartiallySelectedSubtree:function(){return t(this._current,this.range)},getSubtreeIterator:function(){var e;if(this.isSingleCharacterDataNode)(e=this.range.cloneRange()).collapse();else{e=new I(n(this.range));var t=this._current,r=t,i=0,o=t,a=O.getNodeLength(t);O.isAncestorOf(t,this.sc,!0)&&(r=this.sc,i=this.so),O.isAncestorOf(t,this.ec,!0)&&(o=this.ec,a=this.eo),D(e,r,i,o,a)}return new h(e,this.clonePartiallySelectedTextNodes)},detach:function(e){e&&this.range.detach(),this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}}
228,p.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2},p.prototype.toString=function(){return this.message},m.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){return this._current=this._next,this._next=this.nodes[++this._position],this._current},detach:function(){this._current=this._next=this.nodes=null}};var H=[1,3,4,5,7,8,10],B=[2,9,11],U=[5,6,10,12],q=[1,3,4,5,7,8,10,11],z=[1,3,4,5,7,8],W=O.getRootContainer,V=v([9,11]),K=v(U),Q=v([6,10,12]),G=document.createElement("style"),Y=!1;try{G.innerHTML="<b>x</b>",Y=3==G.firstChild.nodeType}catch(se){}e.features.htmlParsingConforms=Y;var X=Y?function(e){var t=this.startContainer,n=O.getDocument(t);if(!t)throw new L("INVALID_STATE_ERR");var r=null;return 1==t.nodeType?r=t:O.isCharacterDataNode(t)&&(r=O.parentElement(t)),(r=null===r||"HTML"==r.nodeName&&O.isHtmlNamespace(O.getDocument(r).documentElement)&&O.isHtmlNamespace(r)?n.createElement("body"):r.cloneNode(!1)).innerHTML=e,O.fragmentFromNodeChildren(r)}:function(e){y(this);var t=n(this).createElement("body");return t.innerHTML=e,O.fragmentFromNodeChildren(t)},J=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],Z=0,ee=1,te=2,ne=3,re=0,ie=1,oe=2,ae=3;T.prototype={attachListener:function(e,t){this._listeners[e].push(t)},compareBoundaryPoints:function(e,t){var n,r,i,o;E(this),x(this.startContainer,t.startContainer);var a=e==ne||e==Z?"start":"end",s=e==ee||e==Z?"start":"end";return n=this[a+"Container"],r=this[a+"Offset"],i=t[s+"Container"],o=t[s+"Offset"],O.comparePoints(n,r,i,o)},insertNode:function(e){if(E(this),b(e,q),w(this.startContainer),O.isAncestorOf(e,this.startContainer,!0))throw new L("HIERARCHY_REQUEST_ERR");var t=a(e,this.startContainer,this.startOffset);this.setStartBefore(t)},cloneContents:function(){var e,t;if(E(this),this.collapsed)return n(this).createDocumentFragment();if(this.startContainer===this.endContainer&&O.isCharacterDataNode(this.startContainer))return(e=this.startContainer.cloneNode(!0)).data=e.data.slice(this.startOffset,this.endOffset),(t=n(this).createDocumentFragment()).appendChild(e),t;var r=new h(this,!0);return e=s(r),r.detach(),e},canSurroundContents:function(){E(this),w(this.startContainer),w(this.endContainer);var e=new h(this,!0),n=e._first&&t(e._first,this)||e._last&&t(e._last,this);return e.detach(),!n},surroundContents:function(e){if(b(e,z),!this.canSurroundContents())throw new p("BAD_BOUNDARYPOINTS_ERR");var t=this.extractContents();if(e.hasChildNodes())for(;e.lastChild;)e.removeChild(e.lastChild);a(e,this.startContainer,this.startOffset),e.appendChild(t),this.selectNode(e)},cloneRange:function(){E(this);for(var e,t=new I(n(this)),r=J.length;r--;)t[e=J[r]]=this[e];return t},toString:function(){E(this);var e=this.startContainer;if(e===this.endContainer&&O.isCharacterDataNode(e))return 3==e.nodeType||4==e.nodeType?e.data.slice(this.startOffset,this.endOffset):"";var t=[],n=new h(this,!0);return u(n,function(e){3!=e.nodeType&&4!=e.nodeType||t.push(e.data)}),n.detach(),t.join("")},compareNode:function(e){E(this);var t=e.parentNode,n=O.getNodeIndex(e);if(!t)throw new L("NOT_FOUND_ERR");var r=this.comparePoint(t,n),i=this.comparePoint(t,n+1);return r<0?i>0?oe:re:i>0?ie:ae},comparePoint:function(e,t){return E(this),C(e,"HIERARCHY_REQUEST_ERR"),x(e,this.startContainer),O.comparePoints(e,t,this.startContainer,this.startOffset)<0?-1:O.comparePoints(e,t,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:X,toHtml:function(){E(this);var e=n(this).createElement("div");
228return e.appendChild(this.cloneContents()),e.innerHTML},intersectsNode:function(e,t){if(E(this),C(e,"NOT_FOUND_ERR"),O.getDocument(e)!==n(this))return!1;var r=e.parentNode,i=O.getNodeIndex(e);C(r,"NOT_FOUND_ERR");var o=O.comparePoints(r,i,this.endContainer,this.endOffset),a=O.comparePoints(r,i+1,this.startContainer,this.startOffset);return t?o<=0&&a>=0:o<0&&a>0},isPointInRange:function(e,t){return E(this),C(e,"HIERARCHY_REQUEST_ERR"),x(e,this.startContainer),O.comparePoints(e,t,this.startContainer,this.startOffset)>=0&&O.comparePoints(e,t,this.endContainer,this.endOffset)<=0},intersectsRange:function(e,t){if(E(this),n(e)!=n(this))throw new L("WRONG_DOCUMENT_ERR");var r=O.comparePoints(this.startContainer,this.startOffset,e.endContainer,e.endOffset),i=O.comparePoints(this.endContainer,this.endOffset,e.startContainer,e.startOffset);return t?r<=0&&i>=0:r<0&&i>0},intersection:function(e){if(this.intersectsRange(e)){var t=O.comparePoints(this.startContainer,this.startOffset,e.startContainer,e.startOffset),n=O.comparePoints(this.endContainer,this.endOffset,e.endContainer,e.endOffset),r=this.cloneRange();return-1==t&&r.setStart(e.startContainer,e.startOffset),1==n&&r.setEnd(e.endContainer,e.endOffset),r}return null},union:function(e){if(this.intersectsRange(e,!0)){var t=this.cloneRange();return-1==O.comparePoints(e.startContainer,e.startOffset,this.startContainer,this.startOffset)&&t.setStart(e.startContainer,e.startOffset),1==O.comparePoints(e.endContainer,e.endOffset,this.endContainer,this.endOffset)&&t.setEnd(e.endContainer,e.endOffset),t}throw new p("Ranges do not intersect")},containsNode:function(e,t){return t?this.intersectsNode(e,!1):this.compareNode(e)==ae},containsNodeContents:function(e){return this.comparePoint(e,0)>=0&&this.comparePoint(e,O.getNodeLength(e))<=0},containsRange:function(e){return this.intersection(e).equals(e)},containsNodeText:function(e){var t=this.cloneRange();t.selectNode(e);var n=t.getNodes([3]);if(n.length>0){t.setStart(n[0],0);var r=n.pop();t.setEnd(r,r.length);var i=this.containsRange(t);return t.detach(),i}return this.containsNodeContents(e)},createNodeIterator:function(e,t){return E(this),new m(this,e,t)},getNodes:function(e,t){return E(this),d(this,e,t)},getDocument:function(){return n(this)},collapseBefore:function(e){y(this),this.setEndBefore(e),this.collapse(!1)},collapseAfter:function(e){y(this),this.setStartAfter(e),this.collapse(!0)},getName:function(){return"DomRange"},equals:function(e){return I.rangesEqual(this,e)},isValid:function(){return j(this)},inspect:function(){return f(this)}},R(I,D,A),e.rangePrototype=T.prototype,I.rangeProperties=J,I.RangeIterator=h,I.copyComparisonConstants=$,I.createPrototypeRange=R,I.inspect=f,I.getRangeDocument=n,I.rangesEqual=function(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset},e.DomRange=I,e.RangeException=p}),rangy.createModule("WrappedRange",function(e){function t(e){var t=e.parentElement(),n=e.duplicate();n.collapse(!0);var r=n.parentElement();(n=e.duplicate()).collapse(!1);var i=n.parentElement(),o=r==i?r:a.getCommonAncestor(r,i);return o==t?o:a.getCommonAncestor(t,o)}function n(e){return 0==e.compareEndPoints("StartToEnd",e)}function r(e,t,n,r){var i=e.duplicate();i.collapse(n);var o=i.parentElement();
228if(a.isAncestorOf(t,o,!0)||(o=t),!o.canHaveHTML)return new s(o.parentNode,a.getNodeIndex(o));var u,l,c,d,f,h=a.getDocument(o).createElement("span"),p=n?"StartToStart":"StartToEnd";do{o.insertBefore(h,h.previousSibling),i.moveToElementText(h)}while((u=i.compareEndPoints(p,e))>0&&h.previousSibling);if(f=h.nextSibling,-1==u&&f&&a.isCharacterDataNode(f)){var m;if(i.setEndPoint(n?"EndToStart":"EndToEnd",e),/[\r\n]/.test(f.data)){var v=i.duplicate(),g=v.text.replace(/\r\n/g,"\r").length;for(m=v.moveStart("character",g);-1==(u=v.compareEndPoints("StartToEnd",v));)m++,v.moveStart("character",1)}else m=i.text.length;d=new s(f,m)}else l=(r||!n)&&h.previousSibling,d=(c=(r||n)&&h.nextSibling)&&a.isCharacterDataNode(c)?new s(c,0):l&&a.isCharacterDataNode(l)?new s(l,l.length):new s(o,a.getNodeIndex(h));return h.parentNode.removeChild(h),d}function i(e,t){var n,r,i,o,s=e.offset,u=a.getDocument(e.node),l=u.body.createTextRange(),c=a.isCharacterDataNode(e.node);return c?r=(n=e.node).parentNode:(n=s<(o=e.node.childNodes).length?o[s]:null,r=e.node),(i=u.createElement("span")).innerHTML="&#feff;",n?r.insertBefore(i,n):r.appendChild(i),l.moveToElementText(i),l.collapse(!t),r.removeChild(i),c&&l[t?"moveStart":"moveEnd"]("character",s),l}var o;e.requireModules(["DomUtil","DomRange"]);var a=e.dom,s=a.DomPosition,u=e.DomRange;if(!e.features.implementsDomRange||e.features.implementsTextRange&&e.config.preferTextRange){if(e.features.implementsTextRange){(o=function(e){this.textRange=e,this.refresh()}).prototype=new u(document),o.prototype.refresh=function(){var e,i,o=t(this.textRange);n(this.textRange)?i=e=r(this.textRange,o,!0,!0):(e=r(this.textRange,o,!0,!1),i=r(this.textRange,o,!1,!1)),this.setStart(e.node,e.offset),this.setEnd(i.node,i.offset)},u.copyComparisonConstants(o);var l=function(){return this}();"undefined"==typeof l.Range&&(l.Range=o),e.createNativeRange=function(e){return(e=e||document).body.createTextRange()}}}else!function(){function t(e){for(var t,n=l.length;n--;)e[t=l[n]]=e.nativeRange[t]}function n(e,t,n,r,i){var o=e.startContainer!==t||e.startOffset!=n,a=e.endContainer!==r||e.endOffset!=i;(o||a)&&(e.setEnd(r,i),e.setStart(t,n))}function r(e){e.nativeRange.detach(),e.detached=!0;for(var t=l.length;t--;)e[l[t]]=null}var i,s,l=u.rangeProperties;o=function(e){if(!e)throw new Error("Range must be specified");this.nativeRange=e,t(this)},u.createPrototypeRange(o,n,r),(i=o.prototype).selectNode=function(e){this.nativeRange.selectNode(e),t(this)},i.deleteContents=function(){this.nativeRange.deleteContents(),t(this)},i.extractContents=function(){var e=this.nativeRange.extractContents();return t(this),e},i.cloneContents=function(){return this.nativeRange.cloneContents()},i.surroundContents=function(e){this.nativeRange.surroundContents(e),t(this)},i.collapse=function(e){this.nativeRange.collapse(e),t(this)},i.cloneRange=function(){return new o(this.nativeRange.cloneRange())},i.refresh=function(){t(this)},i.toString=function(){return this.nativeRange.toString()};var c=document.createTextNode("test");a.getBody(document).appendChild(c);var d=document.createRange();d.setStart(c,0),d.setEnd(c,0);try{d.setStart(c,1),!0,i.setStart=function(e,n){this.nativeRange.setStart(e,n),t(this)},i.setEnd=function(e,n){this.nativeRange.setEnd(e,n),t(this)},s=function(e){return function(n){this.nativeRange[e](n),t(this)}}}catch(h){!1,i.setStart=function(e,n){try{this.nativeRange.setStart(e,n)}catch(h){this.nativeRange.setEnd(e,n),this.nativeRange.setStart(e,n)}t(this)},i.setEnd=function(e,n){try{this.nativeRange.setEnd(e,n)}catch(h){this.nativeRange.setStart(e,n),this.nativeRange.setEnd(e,n)}t(this)},s=function(e,n){return function(r){try{this.nativeRange[e](r)}catch(h){this.nativeRange[n](r),this.nativeRange[e](r)}t(this)}}}i.setStartBefore=s("setStartBefore","setEndBefore"),i.setStartAfter=s("setStartAfter","setEndAfter"),i.setEndBefore=s("setEndBefore","setStartBefore"),i.setEndAfter=s("setEndAfter","setStartAfter"),d.selectNodeContents(c),d.startContainer==c&&d.endContainer==c&&0==d.startOffset&&d.endOffset==c.length?i.selectNodeContents=function(e){this.nativeRange.selectNodeContents(e),t(this)}:i.selectNodeContents=function(e){this.setStart(e,0),this.setEnd(e,u.getEndOffset(e))},d.selectNodeContents(c),d.setEnd(c,3);var f=document.createRange();f.selectNodeContents(c),f.setEnd(c,4),f.setStart(c,2),-1==d.compareBoundaryPoints(d.START_TO_END,f)&1==d.compareBoundaryPoints(d.END_TO_START,f)?i.compareBoundaryPoints=function(e,t){return e==(t=t.nativeRange||t).START_TO_END?e=t.END_TO_START:e==t.END_TO_START&&(e=t.START_TO_END),this.nativeRange.compareBoundaryPoints(e,t)}:i.compareBoundaryPoints=function(e,t){return this.nativeRange.compareBoundaryPoints(e,t.nativeRange||t)},e.util.isHostMethod(d,"createContextualFragment")&&(i.createContextualFragment=function(e){return this.nativeRange.createContextualFragment(e)}),a.getBody(document).removeChild(c),d.detach(),f.detach()}(),e.createNativeRange=function(e){return(e=e||document).createRange()};e.features.implementsTextRange&&(o.rangeToTextRange=function(e){if(e.collapsed)return i(new s(e.startContainer,e.startOffset),!0);var t=i(new s(e.startContainer,e.startOffset),!0),n=i(new s(e.endContainer,e.endOffset),!1),r=a.getDocument(e.startContainer).body.createTextRange();return r.setEndPoint("StartToStart",t),r.setEndPoint("EndToEnd",n),r}),o.prototype.getName=function(){return"WrappedRange"},e.WrappedRange=o,e.createRange=function(t){return t=t||document,new o(e.createNativeRange(t))},e.createRangyRange=function(e){return e=e||document,new u(e)},e.createIframeRange=function(t){return e.createRange(a.getIframeDocument(t))},e.createIframeRangyRange=function(t){return e.createRangyRange(a.getIframeDocument(t))},e.addCreateMissingNativeApiListener(function(t){var n=t.document;"undefined"==typeof n.createRange&&(n.createRange=function(){return e.createRange(this)}),n=t=null})}),rangy.createModule("WrappedSelection",function(e,t){function n(e){return(e||window).getSelection()}function r(e){return(e||window).document.selection}function i(e,t,n){var r=n?"end":"start",i=n?"start":"end";e.anchorNode=t[r+"Container"],e.anchorOffset=t[r+"Offset"],e.focusNode=t[i+"Container"],e.focusOffset=t[i+"Offset"]}function o(e){var t=e.nativeSelection;e.anchorNode=t.anchorNode,e.anchorOffset=t.anchorOffset,e.focusNode=t.focusNode,e.focusOffset=t.focusOffset}function a(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function s(t){var n;return t instanceof k?(n=t._selectionNativeRange)||((n=e.createNativeRange(w.getDocument(t.startContainer))).setEnd(t.endContainer,t.endOffset),n.setStart(t.startContainer,t.startOffset),t._selectionNativeRange=n,t.attachListener("detach",function(){this._selectionNativeRange=null})):t instanceof S?n=t.nativeRange:e.features.implementsDomRange&&t instanceof w.getWindow(t.startContainer).Range&&(n=t),n}function u(e){if(!e.length||1!=e[0].nodeType)return!1;for(var t=1,n=e.length;t<n;++t)if(!w.isAncestorOf(e[0],e[t]))return!1;return!0}function l(e){var t=e.getNodes();if(!u(t))throw new Error("getSingleElementFromRange: range "+e.inspect()+" did n
228ot consist of a single element");return t[0]}function c(e){return!!e&&"undefined"!=typeof e.text}function d(e,t){var n=new S(t);e._ranges=[n],i(e,n,!1),e.rangeCount=1,e.isCollapsed=n.collapsed}function f(t){if(t._ranges.length=0,"None"==t.docSelection.type)a(t);else{var n=t.docSelection.createRange();if(c(n))d(t,n);else{t.rangeCount=n.length;for(var r,o=w.getDocument(n.item(0)),s=0;s<t.rangeCount;++s)(r=e.createRange(o)).selectNode(n.item(s)),t._ranges.push(r);t.isCollapsed=1==t.rangeCount&&t._ranges[0].collapsed,i(t,t._ranges[t.rangeCount-1],!1)}}}function h(e,t){for(var n=e.docSelection.createRange(),r=l(t),i=w.getDocument(n.item(0)),o=w.getBody(i).createControlRange(),a=0,s=n.length;a<s;++a)o.add(n.item(a));try{o.add(r)}catch(u){throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}o.select(),f(e)}function p(e,t,n){this.nativeSelection=e,this.docSelection=t,this._ranges=[],this.win=n,this.refresh()}function m(e,t){for(var n,r=w.getDocument(t[0].startContainer),i=w.getBody(r).createControlRange(),o=0;o<rangeCount;++o){n=l(t[o]);try{i.add(n)}catch(a){ 229throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")}}i.select(),f(e)}function v(e,t){if(e.anchorNode&&w.getDocument(e.anchorNode)!==w.getDocument(t))throw new j("WRONG_DOCUMENT_ERR")}function g(e){var t=[],n=new E(e.anchorNode,e.anchorOffset),r=new E(e.focusNode,e.focusOffset),i="function"==typeof e.getName?e.getName():"Selection";if("undefined"!=typeof e.rangeCount)for(var o=0,a=e.rangeCount;o<a;++o)t[o]=k.inspect(e.getRangeAt(o));return"["+i+"(Ranges: "+t.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}e.requireModules(["DomUtil","DomRange","WrappedRange"]),e.config.checkSelectionRanges=!0;var y,b,_="boolean",x="_rangySelection",w=e.dom,C=e.util,k=e.DomRange,S=e.WrappedRange,j=e.DOMException,E=w.DomPosition,T="Control",P=e.util.isHostMethod(window,"getSelection"),$=e.util.isHostObject(document,"selection"),N=$&&(!P||e.config.preferTextRange);N?(y=r,e.isSelectionValid=function(e){var t=(e||window).document,n=t.selection;return"None"!=n.type||w.getDocument(n.createRange().parentElement())==t}):P?(y=n,e.isSelectionValid=function(){return!0}):t.fail("Neither document.selection or window.getSelection() detected."),e.getNativeSelection=y;var R=y(),M=e.createNativeRange(document),D=w.getBody(document),A=C.areHostObjects(R,["anchorNode","focusNode"]&&C.areHostProperties(R,["anchorOffset","focusOffset"]));e.features.selectionHasAnchorAndFocus=A;var I=C.isHostMethod(R,"extend");e.features.selectionHasExtend=I;var O="number"==typeof R.rangeCount;e.features.selectionHasRangeCount=O;var F=!1,L=!0;C.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof R.rangeCount&&e.features.implementsDomRange&&function(){var e=document.createElement("iframe");e.frameBorder=0,e.style.position="absolute",e.style.left="-10000px",D.appendChild(e);var t=w.getIframeDocument(e);t.open(),t.write("<html><head></head><body>12</body></html>"),t.close();var n=w.getIframeWindow(e).getSelection(),r=t.documentElement.lastChild.firstChild,i=t.createRange();i.setStart(r,1),i.collapse(!0),n.addRange(i),L=1==n.rangeCount,n.removeAllRanges();var o=i.cloneRange();i.setStart(r,0),o.setEnd(r,2),n.addRange(i),n.addRange(o),F=2==n.rangeCount,i.detach(),o.detach(),D.removeChild(e)}(),e.features.selectionSupportsMultipleRanges=F,e.features.collapsedNonEditableSelectionsSupported=L;var H,B,U=!1;D&&C.isHostMethod(D,"createControlRange")&&(H=D.createControlRange(),C.areHostProperties(H,["item","add"])&&(U=!0)),e.features.implementsControlRange=U,b=A?function(e){return e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset}:function(e){return!!e.rangeCount&&e.getRangeAt(e.rangeCount-1).collapsed},C.isHostMethod(R,"getRangeAt")?B=function(e,t){try{return e.getRangeAt(t)}catch(n){return null}}:A&&(B=function(t){var n=w.getDocument(t.anchorNode),r=e.createRange(n);return r.setStart(t.anchorNode,t.anchorOffset),r.setEnd(t.focusNode,t.focusOffset),r.collapsed!==this.isCollapsed&&(r.setStart(t.focusNode,t.focusOffset),r.setEnd(t.anchorNode,t.anchorOffset)),r}),e.getSelection=function(e){var t=(e=e||window)[x],n=y(e),i=$?r(e):null;return t?(t.nativeSelection=n,t.docSelection=i,t.refresh(e)):(t=new p(n,i,e),e[x]=t),t},e.getIframeSelection=function(t){return e.getSelection(w.getIframeWindow(t))};var q,z=p.prototype;if(!N&&A&&C.areHostMethods(R,["removeAllRanges","addRange"])){z.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),a(this)};var W=function(t,n){var r=k.getRangeDocument(n),i=e.createRange(r);
229i.collapseToPoint(n.endContainer,n.endOffset),t.nativeSelection.addRange(s(i)),t.nativeSelection.extend(n.startContainer,n.startOffset),t.refresh()};z.addRange=O?function(t,n){var r;if(U&&$&&this.docSelection.type==T)h(this,t);else if(n&&I)W(this,t);else if(F?r=this.rangeCount:(this.removeAllRanges(),r=0),this.nativeSelection.addRange(s(t)),this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==r+1){if(e.config.checkSelectionRanges){var o=B(this.nativeSelection,this.rangeCount-1);o&&!k.rangesEqual(o,t)&&(t=new S(o))}this._ranges[this.rangeCount-1]=t,i(this,t,V(this.nativeSelection)),this.isCollapsed=b(this)}else this.refresh()}:function(e,t){t&&I?W(this,e):(this.nativeSelection.addRange(s(e)),this.refresh())},z.setRanges=function(e){if(U&&e.length>1)m(this,e);else{this.removeAllRanges();for(var t=0,n=e.length;t<n;++t)this.addRange(e[t])}}}else{if(!(C.isHostMethod(R,"empty")&&C.isHostMethod(M,"select")&&U&&N))return t.fail("No means of selecting a Range or TextRange was found"),!1;z.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var e;if(this.anchorNode)e=w.getDocument(this.anchorNode);else if(this.docSelection.type==T){var t=this.docSelection.createRange();t.length&&(e=w.getDocument(t.item(0)).body.createTextRange())}if(e)e.body.createTextRange().select(),this.docSelection.empty()}}catch(n){}a(this)},z.addRange=function(e){this.docSelection.type==T?h(this,e):(S.rangeToTextRange(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,i(this,e,!1))},z.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?m(this,e):t&&this.addRange(e[0])}}if(z.getRangeAt=function(e){if(e<0||e>=this.rangeCount)throw new j("INDEX_SIZE_ERR");return this._ranges[e]},N)q=function(t){var n;e.isSelectionValid(t.win)?n=t.docSelection.createRange():(n=w.getBody(t.win.document).createTextRange()).collapse(!0),t.docSelection.type==T?f(t):c(n)?d(t,n):a(t)};else if(C.isHostMethod(R,"getRangeAt")&&"number"==typeof R.rangeCount)q=function(t){if(U&&$&&t.docSelection.type==T)f(t);else if(t._ranges.length=t.rangeCount=t.nativeSelection.rangeCount,t.rangeCount){for(var n=0,r=t.rangeCount;n<r;++n)t._ranges[n]=new e.WrappedRange(t.nativeSelection.getRangeAt(n));i(t,t._ranges[t.rangeCount-1],V(t.nativeSelection)),t.isCollapsed=b(t)}else a(t)};else{if(!A||typeof R.isCollapsed!=_||typeof M.collapsed!=_||!e.features.implementsDomRange)return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;q=function(e){var t,n=e.nativeSelection;n.anchorNode?(t=B(n,0),e._ranges=[t],e.rangeCount=1,o(e),e.isCollapsed=b(e)):a(e)}}z.refresh=function(e){var t=e?this._ranges.slice(0):null;if(q(this),e){var n=t.length;if(n!=this._ranges.length)return!1;for(;n--;)if(!k.rangesEqual(t[n],this._ranges[n]))return!1;return!0}};var V,K=function(e,t){var n=e.getAllRanges(),r=!1;e.removeAllRanges();for(var i=0,o=n.length;i<o;++i)r||t!==n[i]?e.addRange(n[i]):r=!0;e.rangeCount||a(e)};z.removeRange=U?function(e){if(this.docSelection.type==T){for(var t=this.docSelection.createRange(),n=l(e),r=w.getDocument(t.item(0)),i=w.getBody(r).createControlRange(),o=!1,a=0,s=t.length;a<s;++a)t.item(a)!==n||o?i.add(t.item(a)):o=!0;i.select(),f(this)}else K(this,e)}:function(e){K(this,e)},!N&&A&&e.features.implementsDomRange?(V=function(e){var t=!1;return e.anchorNode&&(t=1==w.comparePoints(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)),t},z.isBackwards=function(){return V(this)}):V=z.isBackwards=function(){return!1},z.toString=function(){for(var e=[],t=0,n=this.rangeCount;t<n;++t)e[t]=""+this._ranges[t];return e.join("")},z.collapse=function(t,n){v(this,t);var r=e.createRange(w.getDocument(t));r.collapseToPoint(t,n),this.removeAllRanges(),this.addRange(r),this.isCollapsed=!0},z.collapseToStart=function(){if(!this.rangeCount)throw new j("INVALID_STATE_ERR");var e=this._ranges[0];this.collapse(e.startContainer,e.startOffset)},z.collapseToEnd=function(){if(!this.rangeCount)throw new j("INVALID_STATE_ERR");var e=this._ranges[this.rangeCount-1];this.collapse(e.endContainer,e.endOffset)},z.selectAllChildren=function(t){v(this,t);var n=e.createRange(w.getDocument(t));n.selectNodeContents(t),this.removeAllRanges(),this.addRange(n)},z.deleteFromDocument=function(){if(U&&$&&this.docSelection.type==T){for(var e,t=this.docSelection.createRange();t.length;)e=t.item(0),t.remove(e),e.parentNode.removeChild(e);this.refresh()}else if(this.rangeCount){var n=this.getAllRanges();this.removeAllRanges();for(var r=0,i=n.length;r<i;++r)n[r].deleteContents();this.addRange(n[i-1])}},z.getAllRanges=function(){return this._ranges.slice(0)},z.setSingleRange=function(e){this.setRanges([e])},z.containsNode=function(e,t){for(var n=0,r=this._ranges.length;n<r;++n)if(this._ranges[n].containsNode(e,t))return!0;return!1},z.toHtml=function(){var e="";if(this.rangeCount){for(var t=k.getRangeDocument(this._ranges[0]).createElement("div"),n=0,r=this._ranges.length;n<r;++n)t.appendChild(this._ranges[n].cloneContents());e=t.innerHTML}return e},z.getName=function(){return"WrappedSelection"},z.inspect=function(){return g(this)},z.detach=function(){this.win[x]=null,this.win=this.anchorNode=this.focusNode=null},p.inspect=g,e.Selection=p,e.selectionPrototype=z,e.addCreateMissingNativeApiListener(function(t){"undefined"==typeof t.getSelection&&(t.getSelection=function(){return e.getSelection(this)}),t=null})}),Sanitize.REGEX_PROTOCOL=/^([A-Za-z0-9\+\-\.\&\;\*\s]*?)(?:\:|&*0*58|&*x0*3a)/i,Sanitize.RELATIVE="__RELATIVE__",Sanitize.ALL="__ALL__",Sanitize.prototype.clean_node=function(e){function t(e,t){var n;for(n=0;n<t.length;n++)if(t[n]==e)return n;return-1}function n(){var e,t,n=[],r={};for(e=0;e<arguments.length;e++)if(arguments[e]&&arguments[e].length)for(t=0;t<arguments[e].length;t++)r[arguments[e][t]]||(r[arguments[e][t]]=!0,n.push(arguments[e][t]));return n}function r(e){var t;switch(e.nodeType){case 1:o.call(this,e);break;case 3:case 5:t=e.cloneNode(!1),this.current_element.appendChild(t);break;case 8:this.config.allow_comments&&(t=e.cloneNode(!1),this.current_element.appendChild(t));break;default:console&&console.log&&console.log("unknown node type",e.no
229deType)}}function o(e){var i,o,s,u,l,c,d,f,h,p,m=a.call(this,e);if(s=(e=m.node).nodeName.toLowerCase(),o=this.current_element,this.allowed_elements[s]||m.whitelist){this.current_element=this.dom.createElement(e.nodeName),o.appendChild(this.current_element);var v=this.config.attributes;for(u=n(v[s],v[Sanitize.ALL],m.attr_whitelist),i=0;i<u.length;i++)c=u[i],(l=e.attributes[c])&&(p=!0,this.config.protocols[s]&&this.config.protocols[s][c]&&(f=this.config.protocols[s][c],p=(h=l.nodeValue.toLowerCase().match(Sanitize.REGEX_PROTOCOL))?-1!=t(h[1],f):-1!=t(Sanitize.RELATIVE,f)),p&&((d=document.createAttribute(c)).value=l.nodeValue,this.current_element.setAttributeNode(d)));if(this.config.add_attributes[s])for(c in this.config.add_attributes[s])(d=document.createAttribute(c)).value=this.config.add_attributes[s][c],this.current_element.setAttributeNode(d)}else if(-1!=t(e,this.whitelist_nodes)){for(this.current_element=e.cloneNode(!0);this.current_element.childNodes.length>0;)this.current_element.removeChild(this.current_element.firstChild);o.appendChild(this.current_element)}if(!this.config.remove_all_contents&&!this.config.remove_element_contents[s])for(i=0;i<e.childNodes.length;i++)r.call(this,e.childNodes[i]);this.current_element.normalize&&this.current_element.normalize(),this.current_element=o}function a(e){var r,i,o,a={attr_whitelist:[],node:e,whitelist:!1};for(r=0;r<this.transformers.length;r++)if(null!=(o=this.transformers[r]({allowed_elements:this.allowed_elements,config:this.config,node:e,node_name:e.nodeName.toLowerCase(),whitelist_nodes:this.whitelist_nodes,dom:this.dom}))){if("object"!=typeof o)throw new Error("transformer output must be an object or null");if(o.whitelist_nodes&&o.whitelist_nodes instanceof Array)for(i=0;i<o.whitelist_nodes.length;i++)-1==t(o.whitelist_nodes[i],this.whitelist_nodes)&&this.whitelist_nodes.push(o.whitelist_nodes[i]);a.whitelist=!!o.whitelist,o.attr_whitelist&&(a.attr_whitelist=n(a.attr_whitelist,o.attr_whitelist)),a.node=o.node?o.node:a.node}return a}var s=this.dom.createDocumentFragment();for(this.current_element=s,this.whitelist_nodes=[],i=0;i<e.childNodes.length;i++)r.call(this,e.childNodes[i]);return s.normalize&&s.normalize(),s},"function"==typeof define&&define("sanitize",[],function(){return Sanitize}), 230/*! 231 * typeahead.js 0.9.3 232 * https://github.com/twitter/typeahead 233 * Copyright 2013 Twitter, Inc. and other contributors; Licensed MIT 234 */ 235function(e){var t,n,r,i,o,a="0.9.3",s={isMsie:function(){var e=/(msie) ([\w.]+)/i.exec(navigator.userAgent);return!!e&&parseInt(e[2],10)},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return void 0===e},bind:e.proxy,bindAll:function(t){var n;for(var r in t)e.isFunction(n=t[r])&&(t[r]=e.proxy(n,t))},indexOf:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},each:e.each,map:e.map,filter:e.grep,every:function(t,n){var r=!0;return t?(e.each(t,function(e,i){if(!(r=n.call(null,i,e,t)))return!1}),!!r):r},some:function(t,n){var r=!1;return t?(e.each(t,function(e,i){if(r=n.call(null,i,e,t))return!1}),!!r):r},mixin:e.extend,getUniqueId:(t=0,function(){return t++}),defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r,i;return function(){var o,a,s=this,u=arguments;return o=function(){r=null,n||(i=e.apply(s,u))},a=n&&!r,clearTimeout(r),r=setTimeout(o,t),a&&(i=e.apply(s,u)),i}},throttle:function(e,t){var n,r,i,o,a,s;return a=0,s=function(){a=new Date,i=null,o=e.apply(n,r)},function(){var u=new Date,l=t-(u-a);return n=this,r=arguments,l<=0?(clearTimeout(i),i=null,a=u,o=e.apply(n,r)):i||(i=setTimeout(s,l)),o}},tokenizeQuery:function(t){return e.trim(t).toLowerCase().split(/[\s]+/)},tokenizeText:function(t){return e.trim(t).toLowerCase().split(/[\s\-_]+/)},getProtocol:function(){return location.protocol},noop:function(){}},u=(n=/\s+/,{on:function(e,t){var r;if(!t)return this;for(this._callbacks=this._callbacks||{},e=e.split(n);r=e.shift();)this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push(t);return this},trigger:function(e,t){var r,i;if(!this._callbacks)return this;for(e=e.split(n);r=e.shift();)if(i=this._callbacks[r])for(var o=0;o<i.length;o+=1)i[o].call(this,{type:r,data:t});return this}}),l=function(){function t(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var n="typeahead:";
235return s.mixin(t.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(n+e,t)}}),t}(),c=function(){function e(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function t(){return(new Date).getTime()}function n(e){return JSON.stringify(s.isUndefined(e)?null:e)}function r(e){return JSON.parse(e)}var i,o;try{(i=window.localStorage).setItem("~~~","!"),i.removeItem("~~~")}catch(a){i=null}return o=i&&window.JSON?{_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(e){return this.isExpired(e)&&this.remove(e),r(i.getItem(this._prefix(e)))},set:function(e,r,o){return s.isNumber(o)?i.setItem(this._ttlKey(e),n(t()+o)):i.removeItem(this._ttlKey(e)),i.setItem(this._prefix(e),n(r))},remove:function(e){return i.removeItem(this._ttlKey(e)),i.removeItem(this._prefix(e)),this},clear:function(){var e,t,n=[],r=i.length;for(e=0;e<r;e++)(t=i.key(e)).match(this.keyMatcher)&&n.push(t.replace(this.keyMatcher,""));for(e=n.length;e--;)this.remove(n[e]);return this},isExpired:function(e){var n=r(i.getItem(this._ttlKey(e)));return!!(s.isNumber(n)&&t()>n)}}:{get:s.noop,set:s.noop,remove:s.noop,clear:s.noop,isExpired:s.noop},s.mixin(e.prototype,o),e}(),d=function(){function e(e){s.bindAll(this),e=e||{},this.sizeLimit=e.sizeLimit||10,this.cache={},this.cachedKeysByAge=[]}return s.mixin(e.prototype,{get:function(e){return this.cache[e]},set:function(e,t){var n;this.cachedKeysByAge.length===this.sizeLimit&&(n=this.cachedKeysByAge.shift(),delete this.cache[n]),this.cache[e]=t,this.cachedKeysByAge.push(e)}}),e}(),f=function(){function t(e){s.bindAll(this),e=s.isString(e)?{url:e}:e,a=a||new d,o=s.isNumber(e.maxParallelRequests)?e.maxParallelRequests:o||6,this.url=e.url,this.wildcard=e.wildcard||"%QUERY",this.filter=e.filter,this.replace=e.replace,this.ajaxSettings={type:"get",cache:e.cache,timeout:e.timeout,dataType:e.dataType||"json",beforeSend:e.beforeSend},this._get=(/^throttle$/i.test(e.rateLimitFn)?s.throttle:s.debounce)(this._get,e.rateLimitWait||300)}function n(){u++}function r(){u--}function i(){return u<o}var o,a,u=0,l={};return s.mixin(t.prototype,{_get:function(e,t){function n(n){var i=r.filter?r.filter(n):n;t&&t(i),a.set(e,n)}var r=this;i()?this._sendRequest(e).done(n):this.onDeckRequestArgs=[].slice.call(arguments,0)},_sendRequest:function(t){function i(){r(),l[t]=null,o.onDeckRequestArgs&&(o._get.apply(o,o.onDeckRequestArgs),o.onDeckRequestArgs=null)}var o=this,a=l[t];return a||(n(),a=l[t]=e.ajax(t,this.ajaxSettings).always(i)),a},get:function(e,t){var n,r,i=this,o=encodeURIComponent(e||"");return t=t||s.noop,n=this.replace?this.replace(this.url,o):this.url.replace(this.wildcard,o),(r=a.get(n))?s.defer(function(){t(i.filter?i.filter(r):r)}):this._get(n,t),!!r}}),t}(),h=function(){function t(t){s.bindAll(this),s.isString(t.template)&&!t.engine&&e.error("no template engine specified"),t.local||t.prefetch||t.remote||e.error("one of local, prefetch, or remote is required"),this.name=t.name||s.getUniqueId(),this.limit=t.limit||5,this.minLength=t.minLength||1,this.header=t.header,this.footer=t.footer,this.valueKey=t.valueKey||"value",this.template=n(t.template,t.engine,this.valueKey),this.local=t.local,this.prefetch=t.prefetch,this.remote=t.remote,this.itemHash={},this.adjacencyList={},this.storage=t.name?new c(t.name):null}function n(e,t,n){var r,i;return s.isFunction(e)?r=e:s.isString(e)?(i=t.compile(e),r=s.bind(i.render,i)):r=function(e){return"<p>"+e[n]+"</p>"},r}var r={thumbprint:"thumbprint",protocol:"protocol",itemHash:"itemHash",adjacencyList:"adjacencyList"};return s.mixin(t.prototype,{_processLocalData:function(e){this._mergeProcessedData(this._processData(e))},_loadPrefetchData:function(t){function n(e){var n=t.filter?t.filter(e):e,i=f._processData(n),o=i.itemHash,a=i.adjacencyList;f.storage&&(f.storage.set(r.itemHash,o,t.ttl),f.storage.set(r.adjacencyList,a,t.ttl),f.storage.set(r.thumbprint,h,t.ttl),f.storage.set(r.protocol,s.getProtocol(),t.ttl)),f._mergeProcessedData(i)}var i,o,u,l,c,d,f=this,h=a+(t.thumbprint||"");return this.storage&&(i=this.storage.get(r.thumbprint),o=this.storage.get(r.protocol),u=this.storage.get(r.itemHash),l=this.storage.get(r.adjacencyList)),c=i!==h||o!==s.getProtocol(),(t=s.isString(t)?{url:t}:t).ttl=s.isNumber(t.ttl)?t.ttl:864e5,u&&l&&!c?(this._mergeProcessedData({itemHash:u,adjacencyList:l}),d=e.Deferred().resolve()):d=e.getJSON(t.url).done(n),d},_transformDatum:function(e){var t=s.isString(e)?e:e[this.valueKey],n={value:t,tokens:e.tokens||s.tokenizeText(t)}
235;return s.isString(e)?(n.datum={},n.datum[this.valueKey]=e):n.datum=e,n.tokens=s.filter(n.tokens,function(e){return!s.isBlankString(e)}),n.tokens=s.map(n.tokens,function(e){return e.toLowerCase()}),n},_processData:function(e){var t=this,n={},r={};return s.each(e,function(e,i){var o=t._transformDatum(i),a=s.getUniqueId(o.value);n[a]=o,s.each(o.tokens,function(e,t){var n=t.charAt(0),i=r[n]||(r[n]=[a]);!~s.indexOf(i,a)&&i.push(a)})}),{itemHash:n,adjacencyList:r}},_mergeProcessedData:function(e){var t=this;s.mixin(this.itemHash,e.itemHash),s.each(e.adjacencyList,function(e,n){var r=t.adjacencyList[e];t.adjacencyList[e]=r?r.concat(n):n})},_getLocalSuggestions:function(e){var t,n=this,r=[],i=[],o=[];return s.each(e,function(e,t){var n=t.charAt(0);!~s.indexOf(r,n)&&r.push(n)}),s.each(r,function(e,r){var o=n.adjacencyList[r];if(!o)return!1;i.push(o),(!t||o.length<t.length)&&(t=o)}),i.length<r.length?[]:(s.each(t,function(t,r){var a=n.itemHash[r];s.every(i,function(e){return~s.indexOf(e,r)})&&s.every(e,function(e){return s.some(a.tokens,function(t){return 0===t.indexOf(e)})})&&o.push(a)}),o)},initialize:function(){var t;return this.local&&this._processLocalData(this.local),this.transport=this.remote?new f(this.remote):null,t=this.prefetch?this._loadPrefetchData(this.prefetch):e.Deferred().resolve(),this.local=this.prefetch=this.remote=null,this.initialize=function(){return t},t},getSuggestions:function(e,t){function n(e){i=i.slice(0),s.each(e,function(e,t){var n=o._transformDatum(t);return!s.some(i,function(e){return n.value===e.value})&&i.push(n),i.length<o.limit}),t&&t(i)}var r,i,o=this,a=!1;e.length<this.minLength||(r=s.tokenizeQuery(e),(i=this._getLocalSuggestions(r).slice(0,this.limit)).length<this.limit&&this.transport&&(a=this.transport.get(e,n)),!a&&t&&t(i))}}),t}(),p=function(){function t(t){var r=this;s.bindAll(this),this.specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},this.$hint=e(t.hint),this.$input=e(t.input).on("blur.tt",this._handleBlur).on("focus.tt",this._handleFocus).on("keydown.tt",this._handleSpecialKeyEvent),s.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){r.specialKeyCodeMap[e.which||e.keyCode]||s.defer(r._compareQueryToInputValue)}):this.$input.on("input.tt",this._compareQueryToInputValue),this.query=this.$input.val(),this.$overflowHelper=n(this.$input)}function n(t){return e("<span></span>").css({position:"absolute",left:"-9999px",visibility:"hidden",whiteSpace:"nowrap",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function r(e,t){return(e=(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "))===(t=(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "))}return s.mixin(t.prototype,u,{_handleFocus:function(){this.trigger("focused")},_handleBlur:function(){this.trigger("blured")},_handleSpecialKeyEvent:function(e){var t=this.specialKeyCodeMap[e.which||e.keyCode];t&&this.trigger(t+"Keyed",e)},_compareQueryToInputValue:function(){var e=this.getInputValue(),t=r(this.query,e);!!t&&this.query.length!==e.length?this.trigger("whitespaceChanged",{value:this.query}):t||this.trigger("queryChanged",{value:this.query=e})},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){this.$input.val(e),!t&&this._compareQueryToInputValue()},getHintValue:function(){return this.$hint.val()},setHintValue:function(e){this.$hint.val(e)},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},isOverflow:function(){return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>this.$input.width()},isCursorAtEnd:function(){var e,t=this.$input.val().length,n=this.$input[0].selectionStart;return s.isNumber(n)?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)}}),t}(),m=function(){function t(t){s.bindAll(this),this.isOpen=!1,this.isEmpty=!0,this.isMouseOverDropdown=!1,this.$menu=e(t.menu).on("mouseenter.tt",this._handleMouseenter).on("mouseleave.tt",this._handleMouseleave).on("click.tt",".tt-suggestion",this._handleSelection).on("mouseover.tt",".tt-suggestion",this._handleMouseover)}function n(e){return e.data("suggestion")}var r={suggestionsList:'<span class="tt-suggestions"></span>'},i={suggestionsList:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"}};
235return s.mixin(t.prototype,u,{_handleMouseenter:function(){this.isMouseOverDropdown=!0},_handleMouseleave:function(){this.isMouseOverDropdown=!1},_handleMouseover:function(t){var n=e(t.currentTarget);this._getSuggestions().removeClass("tt-is-under-cursor"),n.addClass("tt-is-under-cursor")},_handleSelection:function(t){var r=e(t.currentTarget);this.trigger("suggestionSelected",n(r))},_show:function(){this.$menu.css("display","block")},_hide:function(){this.$menu.hide()},_moveCursor:function(e){var t,r,i,o;this.isVisible()&&((r=(t=this._getSuggestions()).filter(".tt-is-under-cursor")).removeClass("tt-is-under-cursor"),-1!==(i=((i=t.index(r)+e)+1)%(t.length+1)-1)?(i<-1&&(i=t.length-1),o=t.eq(i).addClass("tt-is-under-cursor"),this._ensureVisibility(o),this.trigger("cursorMoved",n(o))):this.trigger("cursorRemoved"))},_getSuggestions:function(){return this.$menu.find(".tt-suggestions > .tt-suggestion")},_ensureVisibility:function(e){var t=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),n=this.$menu.scrollTop(),r=e.position().top,i=r+e.outerHeight(!0);r<0?this.$menu.scrollTop(n+r):t<i&&this.$menu.scrollTop(n+(i-t))},destroy:function(){this.$menu.off(".tt"),this.$menu=null},isVisible:function(){return this.isOpen&&!this.isEmpty},closeUnlessMouseIsOverDropdown:function(){this.isMouseOverDropdown||this.close()},close:function(){this.isOpen&&(this.isOpen=!1,this.isMouseOverDropdown=!1,this._hide(),this.$menu.find(".tt-suggestions > .tt-suggestion").removeClass("tt-is-under-cursor"),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(e){var t={left:"0",right:"auto"},n={left:"auto",right:" 0"};"ltr"===e?this.$menu.css(t):this.$menu.css(n)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getSuggestionUnderCursor:function(){var e=this._getSuggestions().filter(".tt-is-under-cursor").first();return e.length>0?n(e):null},getFirstSuggestion:function(){var e=this._getSuggestions().first();return e.length>0?n(e):null},renderSuggestions:function(t,n){var o,a,u,l,c,d="tt-dataset-"+t.name,f='<div class="tt-suggestion">%body</div>',h=this.$menu.find("."+d);0===h.length&&(a=e(r.suggestionsList).css(i.suggestionsList),h=e("<div></div>").addClass(d).append(t.header).append(a).append(t.footer).appendTo(this.$menu)),n.length>0?(this.isEmpty=!1,this.isOpen&&this._show(),u=document.createElement("div"),l=document.createDocumentFragment(),s.each(n,function(n,r){r.dataset=t.name,o=t.template(r.datum),u.innerHTML=f.replace("%body",o),(c=e(u.firstChild).css(i.suggestion).data("suggestion",r)).children().each(function(){e(this).css(i.suggestionChild)}),l.appendChild(c[0])}),h.show().find(".tt-suggestions").html(l)):this.clearSuggestions(t.name),this.trigger("suggestionsRendered")},clearSuggestions:function(e){var t=e?this.$menu.find(".tt-dataset-"+e):this.$menu.find('[class^="tt-dataset-"]'),n=t.find(".tt-suggestions");t.hide(),n.empty(),0===this._getSuggestions().length&&(this.isEmpty=!0,this._hide())}}),t}(),v=function(){function t(e){var t,r,i;s.bindAll(this),this.$node=n(e.input),this.datasets=e.datasets,this.dir=null,this.eventBus=e.eventBus,t=this.$node.find(".tt-dropdown-menu"),r=this.$node.find(".tt-query"),i=this.$node.find(".tt-hint"),this.dropdownView=new m({menu:t}).on("suggestionSelected",this._handleSelection).on("cursorMoved",this._clearHint).on("cursorMoved",this._setInputValueToSuggestionUnderCursor).on("cursorRemoved",this._setInputValueToQuery).on("cursorRemoved",this._updateHint).on("suggestionsRendered",this._updateHint).on("opened",this._updateHint).on("closed",this._clearHint).on("opened closed",this._propagateEvent),this.inputView=new p({input:r,hint:i}).on("focused",this._openDropdown).on("blured",this._closeDropdown).on("blured",this._setInputValueToQuery).on("enterKeyed tabKeyed",this._handleSelection).on("queryChanged",this._clearHint).on("queryChanged",this._clearSuggestions).on("queryChanged",this._getSuggestions).on("whitespaceChanged",this._updateHint).on("queryChanged whitespaceChanged",this._openDropdown).on("queryChanged whitespaceChanged",this._setLanguageDirection).on("escKeyed",this._closeDropdown).on("escKeyed",this._setInputValueToQuery).on("tabKeyed upKeyed downKeyed",this._managePreventDefault).on("upKeyed downKeyed",this._moveDropdownCursor).on("upKeyed downKeyed",this._openDropdown).on("tabKeyed leftKeyed rightKeyed",this._autocomplete)}function n(t){var n=e(i.wrapper),r=e(i.dropdown),a=e(t),s=e(i.hint);
235n=n.css(o.wrapper),r=r.css(o.dropdown),s.css(o.hint).css({backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}),a.data("ttAttrs",{dir:a.attr("dir"),autocomplete:a.attr("autocomplete"),spellcheck:a.attr("spellcheck"),style:a.attr("style")}),a.addClass("tt-query").attr({autocomplete:"off",spellcheck:!1}).css(o.query);try{!a.attr("dir")&&a.attr("dir","auto")}catch(u){}return a.wrap(n).parent().prepend(s).append(r)}function r(e){var t=e.find(".tt-query");s.each(t.data("ttAttrs"),function(e,n){s.isUndefined(n)?t.removeAttr(e):t.attr(e,n)}),t.detach().removeData("ttAttrs").removeClass("tt-query").insertAfter(e),e.remove()}var i={wrapper:'<span class="twitter-typeahead"></span>',hint:'<input class="tt-hint" type="text" autocomplete="off" spellcheck="off" disabled>',dropdown:'<span class="tt-dropdown-menu"></span>'},o={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},query:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"}};return s.isMsie()&&s.mixin(o.query,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),s.isMsie()&&s.isMsie()<=7&&(s.mixin(o.wrapper,{display:"inline",zoom:"1"}),s.mixin(o.query,{marginTop:"-1px"})),s.mixin(t.prototype,u,{_managePreventDefault:function(e){var t,n,r=e.data,i=!1;switch(e.type){case"tabKeyed":t=this.inputView.getHintValue(),n=this.inputView.getInputValue(),i=t&&t!==n;break;case"upKeyed":case"downKeyed":i=!r.shiftKey&&!r.ctrlKey&&!r.metaKey}i&&r.preventDefault()},_setLanguageDirection:function(){var e=this.inputView.getLanguageDirection();e!==this.dir&&(this.dir=e,this.$node.css("direction",e),this.dropdownView.setLanguageDirection(e))},_updateHint:function(){var e,t,n,r,i=this.dropdownView.getFirstSuggestion(),o=i?i.value:null,a=this.dropdownView.isVisible(),u=this.inputView.isOverflow();o&&a&&!u&&(t=(e=this.inputView.getInputValue()).replace(/\s{2,}/g," ").replace(/^\s+/g,""),n=s.escapeRegExChars(t),r=new RegExp("^(?:"+n+")(.*$)","i").exec(o),this.inputView.setHintValue(e+(r?r[1]:"")))},_clearHint:function(){this.inputView.setHintValue("")},_clearSuggestions:function(){this.dropdownView.clearSuggestions()},_setInputValueToQuery:function(){this.inputView.setInputValue(this.inputView.getQuery())},_setInputValueToSuggestionUnderCursor:function(e){var t=e.data;this.inputView.setInputValue(t.value,!0)},_openDropdown:function(){this.dropdownView.open()},_closeDropdown:function(e){this.dropdownView["blured"===e.type?"closeUnlessMouseIsOverDropdown":"close"]()},_moveDropdownCursor:function(e){var t=e.data;t.shiftKey||t.ctrlKey||t.metaKey||this.dropdownView["upKeyed"===e.type?"moveCursorUp":"moveCursorDown"]()},_handleSelection:function(e){var t="suggestionSelected"===e.type,n=t?e.data:this.dropdownView.getSuggestionUnderCursor();n&&(this.inputView.setInputValue(n.value),t?this.inputView.focus():e.data.preventDefault(),t&&s.isMsie()?s.defer(this.dropdownView.close):this.dropdownView.close(),this.eventBus.trigger("selected",n.datum,n.dataset))},_getSuggestions:function(){var e=this,t=this.inputView.getQuery();s.isBlankString(t)||s.each(this.datasets,function(n,r){r.getSuggestions(t,function(n){t===e.inputView.getQuery()&&e.dropdownView.renderSuggestions(r,n)})})},_autocomplete:function(e){var t,n,r,i,o;("rightKeyed"!==e.type&&"leftKeyed"!==e.type||(t=this.inputView.isCursorAtEnd(),n="ltr"===this.inputView.getLanguageDirection()?"leftKeyed"===e.type:"rightKeyed"===e.type,t&&!n))&&(r=this.inputView.getQuery(),""!==(i=this.inputView.getHintValue())&&r!==i&&(o=this.dropdownView.getFirstSuggestion(),this.inputView.setInputValue(o.value),this.eventBus.trigger("autocompleted",o.datum,o.dataset)))},_propagateEvent:function(e){this.eventBus.trigger(e.type)}
235,destroy:function(){this.inputView.destroy(),this.dropdownView.destroy(),r(this.$node),this.$node=null},setQuery:function(e){this.inputView.setQuery(e),this.inputView.setInputValue(e),this._clearHint(),this._clearSuggestions(),this._getSuggestions()}}),t}();i={},o="ttView",r={initialize:function(t){function n(){var t,n=e(this),i=new l({el:n});t=s.map(r,function(e){return e.initialize()}),n.data(o,new v({input:n,eventBus:i=new l({el:n}),datasets:r})),e.when.apply(e,t).always(function(){s.defer(function(){i.trigger("initialized")})})}var r;return 0===(t=s.isArray(t)?t:[t]).length&&e.error("no datasets provided"),r=s.map(t,function(e){var t=i[e.name]?i[e.name]:new h(e);return e.name&&(i[e.name]=t),t}),this.each(n)},destroy:function(){function t(){var t=e(this),n=t.data(o);n&&(n.destroy(),t.removeData(o))}return this.each(t)},setQuery:function(t){function n(){var n=e(this).data(o);n&&n.setQuery(t)}return this.each(n)}},jQuery.fn.typeahead=function(e){return r[e]?r[e].apply(this,[].slice.call(arguments,1)):r.initialize.apply(this,arguments)}}(window.jQuery),document.createElement("video"),document.createElement("audio"),document.createElement("track");var vjs=function(e,t,n){var r;if("string"==typeof e){if(0===e.indexOf("#")&&(e=e.slice(1)),vjs.players[e])return vjs.players[e];r=vjs.el(e)}else r=e;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return r.player||new vjs.Player(r,t,n)},videojs=vjs;window.videojs=window.vjs=vjs,vjs.CDN_VERSION="4.5",vjs.ACCESS_PROTOCOL="https:"==document.location.protocol?"https://":"http://",vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}},notSupportedMessage:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'},"GENERATED_CDN_VSN"!==vjs.CDN_VERSION&&(videojs.options.flash.swf=vjs.ACCESS_PROTOCOL+"vjs.zencdn.net/"+vjs.CDN_VERSION+"/video-js.swf"),vjs.players={}, 236/*! 237 * Custom Universal Module Definition (UMD) 238 * 239 * Video.js will never be a non-browser lib so we can simplify UMD a bunch and 240 * still support requirejs and browserify. This also needs to be closure 241 * compiler compatible, so string keys are used. 242 */ 243"function"==typeof define&&define.amd?define([],function(){return videojs}):"object"==typeof exports&&"object"==typeof module&&(module.exports=videojs),vjs.CoreObject=vjs.CoreObject=function(){},vjs.CoreObject.extend=function(e){var t,n;for(var r in t=(e=e||{}).init||e.init||this.prototype.init||this.prototype.init||function(){},(n=function(){t.apply(this,arguments)}).prototype=vjs.obj.create(this.prototype),n.prototype.constructor=n,n.extend=vjs.CoreObject.extend,n.create=vjs.CoreObject.create,e)e.hasOwnProperty(r)&&(n.prototype[r]=e[r]);return n},vjs.CoreObject.create=function(){var e=vjs.obj.create(this.prototype);return this.apply(e,arguments),e},vjs.on=function(e,t,n){var r=vjs.getData(e);r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=vjs.guid++),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t){if(!r.disabled){t=vjs.fixEvent(t);var n=r.handlers[t.type];if(n)for(var i=n.slice(0),o=0,a=i.length;o<a&&!t.isImmediatePropagationStopped();o++)i[o].call(e,t)}}),1==r.handlers[t].length&&(document.addEventListener?e.addEventListener(t,r.dispatcher,!1):document.attachEvent&&e.attachEvent("on"+t,r.dispatcher))},vjs.off=function(e,t,n){if(vjs.hasData(e)){var r=vjs.getData(e);if(r.handlers){var i=function(t){r.handlers[t]=[],vjs.cleanUpEvents(e,t)};if(t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);vjs.cleanUpEvents(e,t)}else i(t)}else for(var s in r.handlers)i(s)}}},vjs.cleanUpEvents=function(e,t){var n=vjs.getData(e);0===n.handlers[t].length&&(delete n.handlers[t],document.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):document.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),vjs.isEmpty(n.handlers)&&(delete n.handlers,delete n.dispatcher,delete n.disabled),vjs.isEmpty(n)&&vjs.removeData(e)},vjs.fixEvent=function(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||window.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyboardEvent.keyLocation"!==i&&("returnValue"==i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||document),e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement,e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,e.isDefaultPrevented=t,e.defaultPrevented=!0},e.isDefaultPrevented=n,e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!=e.clientX){var o=document.documentElement,a=document.body;e.pageX=e.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}e.which=e.charCode||e.keyCode,null!=e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e},vjs.trigger=function(e,t){var n=vjs.hasData(e)?vjs.getData(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t&&(t={type:t,target:e}),t=vjs.fixEvent(t),n.dispatcher&&n.dispatcher.call(e,t),r&&!t.isPropagationStopped()&&!1!==t.bubbles)vjs.trigger(r,t);else if(!r&&!t.defaultPrevented){var i=vjs.getData(t.target);t.target[t.type]&&(i.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),i.disabled=!1)}return!t.defaultPrevented},vjs.one=function(e,t,n){var r=function(){vjs.off(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||vjs.guid++,vjs.on(e,t,r)};var hasOwnProp=Object.prototype.hasOwnProperty;vjs.createEl=function(e,t){var n,r;for(r in n=document.createElement(e||"div"),t)hasOwnProp.call(t,r)&&(-1!==r.indexOf("aria-")||"role"==r?n.setAttribute(r,t[r]):n[r]=t[r]);return n},vjs.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},vjs.obj={},vjs.obj.create=Object.create||function(e){function t(){}return t.prototype=e,new t},vjs.obj.each=function(e,t,n){for(var r in e)hasOwnProp.call(e,r)&&t.call(n||this,r,e[r])},vjs.obj.merge=function(e,t){if(!t)return e;for(var n in t)hasOwnProp.call(t,n)&&(e[n]=t[n]);return e},vjs.obj.deepMerge=function(e,t){var n,r,i;for(n in e=vjs.obj.copy(e),t)hasOwnProp.call(t,n)&&(r=e[n],i=t[n],vjs.obj.isPlain(r)&&vjs.obj.isPlain(i)?e[n]=vjs.obj.deepMerge(r,i):e[n]=t[n]);return e},vjs.obj.copy=function(e){return vjs.obj.merge({},e)},vjs.obj.isPlain=function(e){return!!e&&"object"==typeof e&&"[object Object]"===e.toString()&&e.constructor===Object},vjs.bind=function(e,t,n){t.guid||(t.guid=vjs.guid++);var r=function(){return t.apply(e,arguments)};return r.guid=n?n+"_"+t.guid:t.guid,r},vjs.cache={},vjs.guid=1,vjs.expando="vdata"+(new Date).getTime(),vjs.getData=function(e){var t=e[vjs.exp
243ando];return t||(t=e[vjs.expando]=vjs.guid++,vjs.cache[t]={}),vjs.cache[t]},vjs.hasData=function(e){var t=e[vjs.expando];return!(!t||vjs.isEmpty(vjs.cache[t]))},vjs.removeData=function(e){var t=e[vjs.expando];if(t){delete vjs.cache[t];try{delete e[vjs.expando]}catch(n){e.removeAttribute?e.removeAttribute(vjs.expando):e[vjs.expando]=null}}},vjs.isEmpty=function(e){for(var t in e)if(null!==e[t])return!1;return!0},vjs.addClass=function(e,t){-1==(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className=""===e.className?t:e.className+" "+t)},vjs.removeClass=function(e,t){var n,r;if(-1!=e.className.indexOf(t)){for(r=(n=e.className.split(" ")).length-1;r>=0;r--)n[r]===t&&n.splice(r,1);e.className=n.join(" ")}},vjs.TEST_VID=vjs.createEl("video"),vjs.USER_AGENT=navigator.userAgent,vjs.IS_IPHONE=/iPhone/i.test(vjs.USER_AGENT),vjs.IS_IPAD=/iPad/i.test(vjs.USER_AGENT),vjs.IS_IPOD=/iPod/i.test(vjs.USER_AGENT),vjs.IS_IOS=vjs.IS_IPHONE||vjs.IS_IPAD||vjs.IS_IPOD,vjs.IOS_VERSION=function(){var e=vjs.USER_AGENT.match(/OS (\d+)_/i);if(e&&e[1])return e[1]}(),vjs.IS_ANDROID=/Android/i.test(vjs.USER_AGENT),vjs.ANDROID_VERSION=function(){var e,t,n=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return n?(e=n[1]&&parseFloat(n[1]),t=n[2]&&parseFloat(n[2]),e&&t?parseFloat(n[1]+"."+n[2]):e||null):null}(),vjs.IS_OLD_ANDROID=vjs.IS_ANDROID&&/webkit/i.test(vjs.USER_AGENT)&&vjs.ANDROID_VERSION<2.3,vjs.IS_FIREFOX=/Firefox/i.test(vjs.USER_AGENT),vjs.IS_CHROME=/Chrome/i.test(vjs.USER_AGENT),vjs.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),vjs.getAttributeValues=function(e){var t,n,r,i,o;if(t={},n=",autoplay,controls,loop,muted,default,",e&&e.attributes&&e.attributes.length>0)for(var a=(r=e.attributes).length-1;a>=0;a--)i=r[a].name,o=r[a].value,"boolean"!=typeof e[i]&&-1===n.indexOf(","+i+",")||(o=null!==o),t[i]=o;return t},vjs.getComputedDimension=function(e,t){var n="";return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,"").getPropertyValue(t):e.currentStyle&&(n=e["client"+t.substr(0,1).toUpperCase()+t.substr(1)]+"px"),n},vjs.insertFirst=function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},vjs.support={},vjs.el=function(e){return 0===e.indexOf("#")&&(e=e.slice(1)),document.getElementById(e)},vjs.formatTime=function(e,t){t=t||e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===Infinity)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},vjs.blockTextSelection=function(){document.body.focus(),document.onselectstart=function(){return!1}},vjs.unblockTextSelection=function(){document.onselectstart=function(){return!0}},vjs.trim=function(e){return(e+"").replace(/^\s+|\s+$/g,"")},vjs.round=function(e,t){return t||(t=0),Math.round(e*Math.pow(10,t))/Math.pow(10,t)},vjs.createTimeRange=function(e,t){return{length:1,start:function(){return e},end:function(){return t}}},vjs.get=function(e,t,n){var r,i;"undefined"==typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("This browser does not support XMLHttpRequest.")}),i=new XMLHttpRequest;try{i.open("GET",e)}catch(o){n(o)}r=0===e.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===e.indexOf("http"),i.onreadystatechange=function(){4===i.readyState&&(200===i.status||r&&0===i.status?t(i.responseText):n&&n())};try{i.send()}catch(o){n&&n(o)}},vjs.setLocalStorage=function(e,t){try{var n=window.localStorage||!1;if(!n)return;n[e]=t}catch(r){22==r.code||1014==r.code?vjs.log("LocalStorage Full (VideoJS)",r):18==r.code?vjs.log("LocalStorage not allowed (VideoJS)",r):vjs.log("LocalStorage Error (VideoJS)",r)}},vjs.getAbsoluteURL=function(e){return e.match(/^https?:\/\//)||(e=vjs.createEl("div",{innerHTML:'<a href="'+e+'">x</a>'}).firstChild.href),e},vjs.log=function(){vjs.log.history=vjs.log.history||[],vjs.log.history.push(arguments)},vjs.findPosition=function(e){var t,n,r,i,o,a,s,u,l;return e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),t?(n=document.documentElement,r=document.body,i=n.clientLeft||r.clientLeft||0,o=window.pageXOffset||r.scrollLeft,a=t.left+o-i,s=n.clientTop||r.clientTop||0,u=window.pageYOffset||r.scrollTop,l=t.top+u-s,{left:vjs.round(a),top:vjs.round(l)}):{left:0,top:0}},vjs.util={},vjs.util.mergeOptions=function(e,t){var n,r,i;for(n in e=vjs.obj.copy(e),t)t.hasOwnProperty(n)&&(r=e[n],i=t[n],vjs.obj.isPlain(r)&&vjs.obj.isPlain(i)?e[n]=vjs.util.mergeOptions(r,i):e[n]=t[n]);return e},vjs.Component=vjs.CoreObject.extend({init:function(e,t,n){this.player_=e,this.options_=vjs.obj.copy(this.options_),t=this.options(t),this.id_=t.id||(t.el&&t.el.id?t.el.id:e.id()+"_component_"+vjs.guid++),this.name_=t.name||null,this.el_=t.el||this.createEl(),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}}),vjs.Component.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),vjs.removeData(this.el_),this.el_=null},vjs.Component.prototype.player_=!0,vjs.Component.prototype.player=function(){return this.player_},vjs.Component.prototype.options_,vjs.Component.prototype.options=function(e){return e===undefined?this.options_:this.options_=vjs.util.mergeOptions(this.options_,e)},vjs.Component.prototype.el_,vjs.Component.prototype.createEl=function(e,t){return vjs.createEl(e,t)},vjs.Component.prototype.el=function(){return this.el_}
243,vjs.Component.prototype.contentEl_,vjs.Component.prototype.contentEl=function(){return this.contentEl_||this.el_},vjs.Component.prototype.id_,vjs.Component.prototype.id=function(){return this.id_},vjs.Component.prototype.name_,vjs.Component.prototype.name=function(){return this.name_},vjs.Component.prototype.children_,vjs.Component.prototype.children=function(){return this.children_},vjs.Component.prototype.childIndex_,vjs.Component.prototype.getChildById=function(e){return this.childIndex_[e]},vjs.Component.prototype.childNameIndex_,vjs.Component.prototype.getChild=function(e){return this.childNameIndex_[e]},vjs.Component.prototype.addChild=function(e,t){var n,r,i;return"string"==typeof e?(i=e,r=(t=t||{}).componentClass||vjs.capitalize(i),t.name=i,n=new window.videojs[r](this.player_||this,t)):n=e,this.children_.push(n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(i=i||n.name&&n.name())&&(this.childNameIndex_[i]=n),"function"==typeof n.el&&n.el()&&this.contentEl().appendChild(n.el()),n},vjs.Component.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){this.childIndex_[e.id]=null,this.childNameIndex_[e.name]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},vjs.Component.prototype.initChildren=function(){var e=this.options_;if(e&&e.children){var t=this;vjs.obj.each(e.children,function(e,n){if(!1!==n){var r=function(){t[e]=t.addChild(e,n)};n.loadEvent||r()}})}},vjs.Component.prototype.buildCSSClass=function(){return""},vjs.Component.prototype.on=function(e,t){return vjs.on(this.el_,e,vjs.bind(this,t)),this},vjs.Component.prototype.off=function(e,t){return vjs.off(this.el_,e,t),this},vjs.Component.prototype.one=function(e,t){return vjs.one(this.el_,e,vjs.bind(this,t)),this},vjs.Component.prototype.trigger=function(e,t){return vjs.trigger(this.el_,e,t),this},vjs.Component.prototype.isReady_,vjs.Component.prototype.isReadyOnInitFinish_=!0,vjs.Component.prototype.readyQueue_,vjs.Component.prototype.ready=function(e){return e&&(this.isReady_?e.call(this):(this.readyQueue_===undefined&&(this.readyQueue_=[]),this.readyQueue_.push(e))),this},vjs.Component.prototype.triggerReady=function(){this.isReady_=!0;var e=this.readyQueue_;if(e&&e.length>0){for(var t=0,n=e.length;t<n;t++)e[t].call(this);this.readyQueue_=[],this.trigger("ready")}},vjs.Component.prototype.addClass=function(e){return vjs.addClass(this.el_,e),this},vjs.Component.prototype.removeClass=function(e){return vjs.removeClass(this.el_,e),this},vjs.Component.prototype.show=function(){return this.el_.style.display="block",this},vjs.Component.prototype.hide=function(){return this.el_.style.display="none",this},vjs.Component.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},vjs.Component.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},vjs.Component.prototype.disable=function(){this.hide(),this.show=function(){}},vjs.Component.prototype.width=function(e,t){return this.dimension("width",e,t)},vjs.Component.prototype.height=function(e,t){return this.dimension("height",e,t)},vjs.Component.prototype.dimensions=function(e,t){return this.width(e,!0).height(t)},vjs.Component.prototype.dimension=function(e,t,n){if(t!==undefined)return-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",n||this.trigger("resize"),this;if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+vjs.capitalize(e)],10)},vjs.Component.prototype.onResize,vjs.Component.prototype.emitTapEvents=function(){var e,t,n;e=0,this.on("touchstart",function(){e=(new Date).getTime(),t=!0}),n=function(){t=!1},this.on("touchmove",n),this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(){!0===t&&(new Date).getTime()-e<250&&this.trigger("tap")})},vjs.Component.prototype.enableTouchActivity=function(){var e,t,n;e=vjs.bind(this.player(),this.player().reportUserActivity),this.on("touchstart",function(){e(),clearInterval(t),t=setInterval(e,250)}),n=function(){e(),clearInterval(t)},this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)},vjs.Button=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t);var n=!1;this.on("touchstart",function(e){e.preventDefault(),n=!0}),this.on("touchmove",function(){n=!1});var r=this;this.on("touchend",function(e){n&&r.onClick(e),e.preventDefault()}),this.on("click",this.onClick),this.on("focus",this.onFocus),this.on("blur",this.onBlur)}}),vjs.Button.prototype.createEl=function(e,t){return t=vjs.obj.merge({className:this.buildCSSClass(),innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+(this.buttonText||"Need Text")+"</span></div>",role:"button","aria-live":"polite",tabIndex:0},t),vjs.Component.prototype.createEl.call(this,e,t)},vjs.Button.prototype.buildCSSClass=function(){return"vjs-control "+vjs.Component.prototype.buildCSSClass.call(this)},vjs.Button.prototype.onClick=function(){},vjs.Button.prototype.onFocus=function(){vjs.on(document,"keyup",vjs.bind(this,this.onKeyPress))},vjs.Button.prototype.onKeyPress=function(e){32!=e.which&&13!=e.which||(e.preventDefault(),this.onClick())},vjs.Button.prototype.onBlur=function(){vjs.off(document,"keyup",vjs.bind(this,this.onKeyPress))},vjs.Slider=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.bar=this.getChild(this.options_.barName),this.handle=this.getChild(this.options_.handleName),e.on(this.playerEvent,vjs.bind(this,this.update)),this.on("mousedown",this.onMouseDown),this.on("touchstart",this.onMouseDown),this.on("focus",this.onFocus),this.on("blur",this.onBlur),this.on("click",this.onClick),this.player_.on("controlsvisible",vjs.bind(this,this.update)),e.ready(vjs.bind(this,this.update)),this.boundEvents={}}
243}),vjs.Slider.prototype.createEl=function(e,t){return(t=t||{}).className=t.className+" vjs-slider",t=vjs.obj.merge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},t),vjs.Component.prototype.createEl.call(this,e,t)},vjs.Slider.prototype.onMouseDown=function(e){e.preventDefault(),vjs.blockTextSelection(),this.boundEvents.move=vjs.bind(this,this.onMouseMove),this.boundEvents.end=vjs.bind(this,this.onMouseUp),vjs.on(document,"mousemove",this.boundEvents.move),vjs.on(document,"mouseup",this.boundEvents.end),vjs.on(document,"touchmove",this.boundEvents.move),vjs.on(document,"touchend",this.boundEvents.end),this.onMouseMove(e)},vjs.Slider.prototype.onMouseUp=function(){vjs.unblockTextSelection(),vjs.off(document,"mousemove",this.boundEvents.move,!1),vjs.off(document,"mouseup",this.boundEvents.end,!1),vjs.off(document,"touchmove",this.boundEvents.move,!1),vjs.off(document,"touchend",this.boundEvents.end,!1),this.update()},vjs.Slider.prototype.update=function(){if(this.el_){var e,t=this.getPercent(),n=this.handle,r=this.bar;if(isNaN(t)&&(t=0),e=t,n){var i=this.el_.offsetWidth,o=n.el().offsetWidth,a=o?o/i:0,s=t*(1-a);e=s+a/2,n.el().style.left=vjs.round(100*s,2)+"%"}r.el().style.width=vjs.round(100*e,2)+"%"}},vjs.Slider.prototype.calculateDistance=function(e){var t,n,r,i,o,a,s,u,l;if(t=this.el_,n=vjs.findPosition(t),o=a=t.offsetWidth,s=this.handle,this.options_.vertical){if(i=n.top,l=e.changedTouches?e.changedTouches[0].pageY:e.pageY,s){var c=s.el().offsetHeight;i+=c/2,a-=c}return Math.max(0,Math.min(1,(i-l+a)/a))}if(r=n.left,u=e.changedTouches?e.changedTouches[0].pageX:e.pageX,s){var d=s.el().offsetWidth;r+=d/2,o-=d}return Math.max(0,Math.min(1,(u-r)/o))},vjs.Slider.prototype.onFocus=function(){vjs.on(document,"keyup",vjs.bind(this,this.onKeyPress))},vjs.Slider.prototype.onKeyPress=function(e){37==e.which?(e.preventDefault(),this.stepBack()):39==e.which&&(e.preventDefault(),this.stepForward())},vjs.Slider.prototype.onBlur=function(){vjs.off(document,"keyup",vjs.bind(this,this.onKeyPress))},vjs.Slider.prototype.onClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},vjs.SliderHandle=vjs.Component.extend(),vjs.SliderHandle.prototype.defaultValue=0,vjs.SliderHandle.prototype.createEl=function(e,t){return(t=t||{}).className=t.className+" vjs-slider-handle",t=vjs.obj.merge({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},t),vjs.Component.prototype.createEl.call(this,"div",t)},vjs.Menu=vjs.Component.extend(),vjs.Menu.prototype.addItem=function(e){this.addChild(e),e.on("click",vjs.bind(this,function(){this.unlockShowing()}))},vjs.Menu.prototype.createEl=function(){var e=this.options().contentElType||"ul";this.contentEl_=vjs.createEl(e,{className:"vjs-menu-content"});var t=vjs.Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),vjs.on(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},vjs.MenuItem=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.selected(t.selected)}}),vjs.MenuItem.prototype.createEl=function(e,t){return vjs.Button.prototype.createEl.call(this,"li",vjs.obj.merge({className:"vjs-menu-item",innerHTML:this.options_.label},t))},vjs.MenuItem.prototype.onClick=function(){this.selected(!0)},vjs.MenuItem.prototype.selected=function(e){e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-selected",!0)):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-selected",!1))},vjs.MenuButton=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),this.menu=this.createMenu(),this.addChild(this.menu),this.items&&0===this.items.length&&this.hide(),this.on("keyup",this.onKeyPress),this.el_.setAttribute("aria-haspopup",!0),this.el_.setAttribute("role","button")}}),vjs.MenuButton.prototype.buttonPressed_=!1,vjs.MenuButton.prototype.createMenu=function(){var e=new vjs.Menu(this.player_);if(this.options().title&&e.el().appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:vjs.capitalize(this.kind_),tabindex:-1})),this.items=this.createItems(),this.items)for(var t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e},vjs.MenuButton.prototype.createItems=function(){},vjs.MenuButton.prototype.buildCSSClass=function(){return this.className+" vjs-menu-button "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.MenuButton.prototype.onFocus=function(){},vjs.MenuButton.prototype.onBlur=function(){},vjs.MenuButton.prototype.onClick=function(){this.one("mouseout",vjs.bind(this,function(){this.menu.unlockShowing(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},vjs.MenuButton.prototype.onKeyPress=function(e){e.preventDefault(),32==e.which||13==e.which?this.buttonPressed_?this.unpressButton():this.pressButton():27==e.which&&this.buttonPressed_&&this.unpressButton()},vjs.MenuButton.prototype.pressButton=function(){this.buttonPressed_=!0,this.menu.lockShowing(),this.el_.setAttribute("aria-pressed",!0),this.items&&this.items.length>0&&this.items[0].el().focus()},vjs.MenuButton.prototype.unpressButton=function(){this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-pressed",!1)},vjs.Player=vjs.Component.extend({init:function(e,t,n){this.tag=e,e.id=e.id||"vjs_video_"+vjs.guid++,t=vjs.obj.merge(this.getTagSettings(e),t),this.cache_={},this.poster_=t.poster,this.controls_=t.controls,e.controls=!1,t.reportTouchActivity=!1,vjs.Component.call(this,this,t,n),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.one("play",function(e){var t={type:"firstplay",target:this.el_};vjs.trigger(this.el_,t)||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}),this.on("ended",this.onEnded),this.on("play",this.onPlay),this.on("firstplay",this.onFirstPlay),this.on("pause",this.onPause),this.on("progress",this.onProgress),this.on("durationchange",this.onDurationChange),this.on("error",this.onError),this.on("fullscreenchange",this.onFullscreenChange),vjs.players[this.id_]=this,t.plugins&&vjs.obj.each(t.plugins,function(e,t){this[e](t)},this),this.listenForUserActivity()}}),vjs.Player.prototype.options_=vjs.options,vjs.Player.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),vjs.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.stopTrackingProgress(),this.stopTrackingCurrentTime(),this.tech&&this.tech.dispose(),vjs.Component.prototype.dispose.call(this)},vjs.Player.prototype.getTagSettings=function(e){var t,n,r,i,o,a={sources:[],tracks:[]};if(vjs.obj.merge(a,vjs.getAttributeValues(e)),e.hasChildNodes())for(i=0,o=(t=e.childNodes).length;i<o;i++)"source"===(r=(n=t[i]).nodeName.toLowerCase())?a.sources.push(vjs.getAttributeValues(n)):"track"===r&&a.tracks.push(vjs.getAttributeValues(n));return a},vjs.Player.prototype.createEl=function(){var e=this.el_=vjs.Component.prototype.createEl.call(this,"div"),t=this.tag;if(t.removeAttribute("width"),t.removeAttribute("height"),t.hasChildNodes()){var n,r,i,o,a;for(r=(n=t.childNodes).length,a=[];r--;)"track"===(o=n[r]).nodeName.toLowerCase()&&a.push(o);for(i=0;i<a.length;i++)t.removeChild(a[i])}return e.id=t.id,e.className=t.className,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused"),this.width(this.options_.width,!0),this.height(this.options_.height,!0),t.parentNode&&t.parentNode.insertBefore(e,t),vjs.insertFirst(t,e),e},vjs.Player.prototype.loadTech=function(e,t){this.tech&&this.unloadTech(),"Html5"!==e&&this.tag&&(vjs.Html5.disposeMediaElement(this.tag),this.tag=null),this.techName=e,this.isReady_=!1;var n=function(){this.player_.triggerReady(),this.features.progressEvents||this.player_.manualProgressOn(),this.features.timeupdateEvents||this.player_.manualTimeUpdatesOn()},r=vjs.obj.merge({source:t,parentEl:this.el_},this.options_[e.toLowerCase()]);t&&(t.src==this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime),this.cache_.src=t.src),this.tech=new window.videojs[e](this,r),this.tech.ready(n)},vjs.Player.prototype.unloadTech=function(){this.isReady_=!1,this.tech.dispose(),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),this.tech=!1},vjs.Player.prototype.manualProgressOn=function(){this.manualProgress=!0,this.trackProgress(),this.tech.one("progress",function(){this.features.progressEvents=!0,this.player_.manualProgressOff()})},vjs.Player.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress()},vjs.Player.prototype.trackProgress=function(){this.progressInterval=setInterval(vjs.bind(this,function(){this.cache_.bufferEnd<this.buffered().end(0)?this.trigger("progress"):1==this.bufferedPercent()&&(this.stopTrackingProgress(),this.trigger("progress"))}),500)},vjs.Player.prototype.stopTrackingProgress=function(){clearInterval(this.progressInterval)}, 244/*! Time Tracking -------------------------------------------------------------- */ 245vjs.Player.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime),this.tech.one("timeupdate",function(){this.features.timeupdateEvents=!0,this.player_.manualTimeUpdatesOff()})},vjs.Player.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},vjs.Player.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=setInterval(vjs.bind(this,function(){this.trigger("timeupdate")}),250)},vjs.Player.prototype.stopTrackingCurrentTime=function(){clearInterval(this.currentTimeInterval)},vjs.Player.prototype.onLoadStart,vjs.Player.prototype.onLoadedMetaData,vjs.Player.prototype.onLoadedData,vjs.Player.prototype.onLoadedAllData,vjs.Player.prototype.onPlay=function(){vjs.removeClass(this.el_,"vjs-paused"),vjs.addClass(this.el_,"vjs-playing")},vjs.Player.prototype.onFirstPlay=function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started")},vjs.Player.prototype.onPause=function(){vjs.removeClass(this.el_,"vjs-playing"),vjs.addClass(this.el_,"vjs-paused")},vjs.Player.prototype.onTimeUpdate,vjs.Player.prototype.onProgress=function(){1==this.bufferedPercent()&&this.trigger("loadedalldata")},vjs.Player.prototype.onEnded=function(){this.options_.loop&&(this.currentTime(0),this.play())},vjs.Player.prototype.onDurationChange=function(){var e=this.techGet("duration");e&&this.duration(e)},vjs.Player.prototype.onVolumeChange,vjs.Player.prototype.onFullscreenChange=function(){this.isFullScreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},vjs.Player.prototype.onError=function(e){vjs.log("Video Error",e)},vjs.Player.prototype.cache_,vjs.Player.prototype.getCache=function(){return this.cache_},vjs.Player.prototype.techCall=function(e,t){if(this.tech&&!this.tech.isReady_)this.tech.ready(function(){this[e](t)});else try{this.tech[e](t)}catch(n){throw vjs.log(n),n}},vjs.Player.prototype.techGet=function(e){if(this.tech&&this.tech.isReady_)try{return this.tech[e]()}catch(t){throw this.tech[e]===undefined?vjs.log("Video.js: "+e+" method not defined for "+this.techName+" playback technology.",t):"TypeError"==t.name?(vjs.log("Video.js: "+e+" unavailable on "+this.techName+" playback technology element.",t),this.tech.isReady_=!1):vjs.log(t),t}},vjs.Player.prototype.play=function(){return this.techCall("play"),this},vjs.Player.prototype.pause=function(){return this.techCall("pause"),this},vjs.Player.prototype.paused=function(){return!1!==this.techGet("paused")},vjs.Player.prototype.currentTime=function(e){return e!==undefined?(this.techCall("setCurrentTime",e),this.manualTimeUpdates&&this.trigger("timeupdate"),this):this.cache_.currentTime=this.techGet("currentTime")||0},vjs.Player.prototype.duration=function(e){return e!==undefined?(this.cache_.duration=parseFloat(e),this):(this.cache_.duration===undefined&&this.onDurationChange(),this.cache_.duration||0)},vjs.Player.prototype.remainingTime=function(){return this.duration()-this.currentTime()},vjs.Player.prototype.buffered=function(){var e=this.techGet("buffered"),t=0,n=e.length-1,r=this.cache_.bufferEnd=this.cache_.bufferEnd||0;return e&&n>=0&&e.end(n)!==r&&(r=e.end(n),this.cache_.bufferEnd=r),vjs.createTimeRange(t,r)},vjs.Player.prototype.bufferedPercent=function(){return this.duration()?this.buffered().end(0)/this.duration():0},vjs.Player.prototype.volume=function(e){var t;return e!==undefined?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall("setVolume",t),vjs.setLocalStorage("volume",t),this):(t=parseFloat(this.techGet("volume")),isNaN(t)?1:t)},vjs.Player.prototype.muted=function(e){return e!==undefined?(this.techCall("setMuted",e),this):this.techGet("muted")||!1},vjs.Player.prototype.supportsFullScreen=function(){return this.techGet("supportsFullScreen")||!1},vjs.Player.prototype.isFullScreen_=!1,vjs.Player.prototype.isFullScreen=function(e){return e!==undefined?(this.isFullScreen_=e,this):this.isFullScreen_},vjs.Player.prototype.requestFullScreen=function(){var e=vjs.support.requestFullScreen;return this.isFullScreen(!0),e?(vjs.on(document,e.eventName,vjs.bind(this,function(){this.isFullScreen(document[e.isFullScreen]),!1===this.isFullScreen()&&vjs.off(document,e.eventName,arguments.callee),this.trigger("fullscreenchange")})),this.el_[e.requestFn]()):this.tech.supportsFullScreen()?this.techCall("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},vjs.Player.prototype.cancelFullScreen=function(){var e=vjs.support.requestFullScreen;return this.isFullScreen(!1),e?document[e.cancelFn]():this.tech.supportsFullScreen()?this.techCall("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},vjs.Player.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,vjs.on(document,"keydown",vjs.bind(this,this.fullWindowOnEscKey)),document.documentElement.style.overflow="hidden",vjs.addClass(document.body,"vjs-full-window"),this.trigger("enterFullWindow")}
245,vjs.Player.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullScreen()?this.cancelFullScreen():this.exitFullWindow())},vjs.Player.prototype.exitFullWindow=function(){this.isFullWindow=!1,vjs.off(document,"keydown",this.fullWindowOnEscKey),document.documentElement.style.overflow=this.docOrigOverflow,vjs.removeClass(document.body,"vjs-full-window"),this.trigger("exitFullWindow")},vjs.Player.prototype.selectSource=function(e){for(var t=0,n=this.options_.techOrder;t<n.length;t++){var r=vjs.capitalize(n[t]),i=window.videojs[r];if(i.isSupported())for(var o=0,a=e;o<a.length;o++){var s=a[o];if(i.canPlaySource(s))return{source:s,tech:r}}}return!1},vjs.Player.prototype.src=function(e){if(e===undefined)return this.techGet("src");if(e instanceof Array){var t,n=this.selectSource(e);n?(e=n.source,(t=n.tech)==this.techName?this.src(e):this.loadTech(t,e)):(this.el_.appendChild(vjs.createEl("p",{innerHTML:this.options().notSupportedMessage})),this.triggerReady())}else e instanceof Object?window.videojs[this.techName].canPlaySource(e)?this.src(e.src):this.src([e]):(this.cache_.src=e,this.isReady_?(this.techCall("src",e),"auto"==this.options_.preload&&this.load(),this.options_.autoplay&&this.play()):this.ready(function(){this.src(e)}));return this},vjs.Player.prototype.load=function(){return this.techCall("load"),this},vjs.Player.prototype.currentSrc=function(){return this.techGet("currentSrc")||this.cache_.src||""},vjs.Player.prototype.preload=function(e){return e!==undefined?(this.techCall("setPreload",e),this.options_.preload=e,this):this.techGet("preload")},vjs.Player.prototype.autoplay=function(e){return e!==undefined?(this.techCall("setAutoplay",e),this.options_.autoplay=e,this):this.techGet("autoplay",e)},vjs.Player.prototype.loop=function(e){return e!==undefined?(this.techCall("setLoop",e),this.options_.loop=e,this):this.techGet("loop")},vjs.Player.prototype.poster_,vjs.Player.prototype.poster=function(e){if(e===undefined)return this.poster_;this.poster_=e,this.techCall("setPoster",e),this.trigger("posterchange")},vjs.Player.prototype.controls_,vjs.Player.prototype.controls=function(e){return e!==undefined?(e=!!e,this.controls_!==e&&(this.controls_=e,e?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled")):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"))),this):this.controls_},vjs.Player.prototype.usingNativeControls_,vjs.Player.prototype.usingNativeControls=function(e){return e!==undefined?(e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,e?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):this.usingNativeControls_},vjs.Player.prototype.error=function(){return this.techGet("error")},vjs.Player.prototype.ended=function(){return this.techGet("ended")},vjs.Player.prototype.seeking=function(){return this.techGet("seeking")},vjs.Player.prototype.userActivity_=!0,vjs.Player.prototype.reportUserActivity=function(){this.userActivity_=!0},vjs.Player.prototype.userActive_=!0,vjs.Player.prototype.userActive=function(e){return e!==undefined?((e=!!e)!==this.userActive_&&(this.userActive_=e,e?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech&&this.tech.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.userActive_},vjs.Player.prototype.listenForUserActivity=function(){var e,t,n,r,i,o;e=vjs.bind(this,this.reportUserActivity),t=function(){e(),clearInterval(n),n=setInterval(e,250)},r=function(){e(),clearInterval(n)},this.on("mousedown",t),this.on("mousemove",e),this.on("mouseup",r),this.on("keydown",e),this.on("keyup",e),i=setInterval(vjs.bind(this,function(){this.userActivity_&&(this.userActivity_=!1,this.userActive(!0),clearTimeout(o),o=setTimeout(vjs.bind(this,function(){this.userActivity_||this.userActive(!1)}),2e3))}),250),this.on("dispose",function(){clearInterval(i),clearTimeout(o)})},function(){var e,t,n;t={},(n=document.createElement("div")).cancelFullscreen!==undefined?(t.requestFn="requestFullscreen",t.cancelFn="exitFullscreen",t.eventName="fullscreenchange",t.isFullScreen="fullScreen"):(document.mozCancelFullScreen?(e="moz",t.isFullScreen=e+"FullScreen"):(e="webkit",t.isFullScreen=e+"IsFullScreen"),n[e+"RequestFullScreen"]&&(t.requestFn=e+"RequestFullScreen",t.cancelFn=e+"CancelFullScreen"),t.eventName=e+"fullscreenchange"),document[t.cancelFn]&&(vjs.support.requestFullScreen=t)}(),vjs.ControlBar=vjs.Component.extend(),vjs.ControlBar.prototype.options_={loadEvent:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{}}},vjs.ControlBar.prototype.createEl=function(){return vjs.createEl("div",{className:"vjs-control-bar"})},vjs.PlayToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),e.on("play",vjs.bind(this,this.onPlay)),e.on("pause",vjs.bind(this,this.onPause))}}),vjs.PlayToggle.prototype.buttonText="Play",vjs.PlayToggle.prototype.buildCSSClass=function(){return"vjs-play-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.PlayToggle.prototype.onClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},vjs.PlayToggle.prototype.onPlay=function(){vjs.removeClass(this.el_,"vjs-paused"),vjs.addClass(this.el_,"vjs-playing"),this.el_.children[0].children[0].innerHTML="Pause"},vjs.PlayToggle.prototype.onPause=function(){vjs.removeClass(this.el_,"vjs-playing"),vjs.addClass(this.el_,"vjs-paused"),this.el_.children[0].children[0].innerHTML="Play"},vjs.CurrentTimeDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.on("timeupdate",vjs.bind(this,this.updateContent))}}),vjs.CurrentTimeDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control
245s vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.CurrentTimeDisplay.prototype.updateContent=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.contentEl_.innerHTML='<span class="vjs-control-text">Current Time </span>'+vjs.formatTime(e,this.player_.duration())},vjs.DurationDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.on("timeupdate",vjs.bind(this,this.updateContent))}}),vjs.DurationDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">Duration Time </span>0:00',"aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.DurationDisplay.prototype.updateContent=function(){var e=this.player_.duration();e&&(this.contentEl_.innerHTML='<span class="vjs-control-text">Duration Time </span>'+vjs.formatTime(e))},vjs.TimeDivider=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.TimeDivider.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},vjs.RemainingTimeDisplay=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.on("timeupdate",vjs.bind(this,this.updateContent))}}),vjs.RemainingTimeDisplay.prototype.createEl=function(){var e=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">Remaining Time </span>-0:00',"aria-live":"off"}),e.appendChild(this.contentEl_),e},vjs.RemainingTimeDisplay.prototype.updateContent=function(){this.player_.duration()&&(this.contentEl_.innerHTML='<span class="vjs-control-text">Remaining Time </span>-'+vjs.formatTime(this.player_.remainingTime()))},vjs.FullscreenToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t)}}),vjs.FullscreenToggle.prototype.buttonText="Fullscreen",vjs.FullscreenToggle.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.FullscreenToggle.prototype.onClick=function(){this.player_.isFullScreen()?(this.player_.cancelFullScreen(),this.el_.children[0].children[0].innerHTML="Fullscreen"):(this.player_.requestFullScreen(),this.el_.children[0].children[0].innerHTML="Non-Fullscreen")},vjs.ProgressControl=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.ProgressControl.prototype.options_={children:{seekBar:{}}},vjs.ProgressControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},vjs.SeekBar=vjs.Slider.extend({init:function(e,t){vjs.Slider.call(this,e,t),e.on("timeupdate",vjs.bind(this,this.updateARIAAttributes)),e.ready(vjs.bind(this,this.updateARIAAttributes))}}),vjs.SeekBar.prototype.options_={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"},vjs.SeekBar.prototype.playerEvent="timeupdate",vjs.SeekBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})},vjs.SeekBar.prototype.updateARIAAttributes=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",vjs.round(100*this.getPercent(),2)),this.el_.setAttribute("aria-valuetext",vjs.formatTime(e,this.player_.duration()))},vjs.SeekBar.prototype.getPercent=function(){return this.player_.currentTime()/this.player_.duration()},vjs.SeekBar.prototype.onMouseDown=function(e){vjs.Slider.prototype.onMouseDown.call(this,e),this.player_.scrubbing=!0,this.videoWasPlaying=!this.player_.paused(),this.player_.pause()},vjs.SeekBar.prototype.onMouseMove=function(e){var t=this.calculateDistance(e)*this.player_.duration();t==this.player_.duration()&&(t-=.1),this.player_.currentTime(t)},vjs.SeekBar.prototype.onMouseUp=function(e){vjs.Slider.prototype.onMouseUp.call(this,e),this.player_.scrubbing=!1,this.videoWasPlaying&&this.player_.play()},vjs.SeekBar.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},vjs.SeekBar.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},vjs.LoadProgressBar=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.on("progress",vjs.bind(this,this.update))}}),vjs.LoadProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text">Loaded: 0%</span>'})},vjs.LoadProgressBar.prototype.update=function(){this.el_.style&&(this.el_.style.width=vjs.round(100*this.player_.bufferedPercent(),2)+"%")},vjs.PlayProgressBar=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.PlayProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text">Progress: 0%</span>'})},vjs.SeekHandle=vjs.SliderHandle.extend({init:function(e,t){vjs.SliderHandle.call(this,e,t),e.on("timeupdate",vjs.bind(this,this.updateContent))}}),vjs.SeekHandle.prototype.defaultValue="00:00",vjs.SeekHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})},vjs.SeekHandle.prototype.updateContent=function(){var e=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.innerHTML='<span class="vjs-control-text">'+vjs.formatTime(e,this.player_.duration())+"</span>"},vjs.VolumeControl=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.tech&&e.tech.features&&!1===e.tech.features.volumeControl&&this.addClass("vjs-hidden"),e.on("loadstart",vjs.bind(this,function(){e.tech.features&&!1===e.tech.features.volumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}))}}),vjs.VolumeControl.prototype.options_={children:{volumeBar:{}}},vjs.VolumeControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},vjs.VolumeBar=vjs.Slider.extend({init:function(e,t){vjs.Slider.call(this,e,t),e.on("volumechange",vjs.bind(this,this.updateARIAAttributes)),e.ready(vjs.bind(this,this.updateARIAAttributes)),setTimeout(vjs.bind(this,this.update),0)}}),vjs.VolumeBar.prototype.updateARIAAttributes=function(){this.el_.setAttribute("aria-valuenow",vjs.round(100*this.player_.volume(),2)),this.el_.setAttribute("aria-valuetext",vjs.round(100*this.player_.volume(),2)+"%")},vjs.VolumeBar.prototype.options_={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"},vjs.VolumeBar.prototype.playerEvent="volumechange",vjs.VolumeBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})},vjs.VolumeBar.prototype.onMouseMove=function(e){this.player_.muted()&&this.player_.muted(!1),this.player_.volume(this.calculateDistance(e))},vjs.VolumeBar.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},vjs.VolumeBar.prototype.stepForward=function(){this.player_.volume(this.player_.volume()+.1)},vjs.VolumeBar.prototype.stepBack=function(){this.player_.volume(this.player_.volume()-.1)},vjs.VolumeLevel=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t)}}),vjs.VolumeLevel.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},vjs.VolumeHandle=vjs.SliderHandle.extend(),vjs.VolumeHandle.prototype.defaultValue="00:00",vjs.VolumeHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-volume-handle"})},vjs.MuteToggle=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),e.on("volumechange",vjs.bind(this,this.update)),e.tech&&e.tech.features&&!1===e.tech.features.volumeControl&&this.addClass("vjs-hidden"),e.on("loadstart",vjs.bind(this,function(){e.tech.features&&!1===e.tech.features.volumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}))}}),vjs.MuteToggle.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})},vjs.MuteToggle.prototype.onClick=function(){this.player_.muted(!this.player_.muted())},vjs.MuteToggle.prototype.update=function(){var e=this.player_.volume(),t=3;0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2),this.player_.muted()?"Unmute"!=this.el_.children[0].children[0].innerHTML&&(this.el_.children[0].children[0].innerHTML="Unmute"):"Mute"!=this.el_.children[0].children[0].innerHTML&&(this.el_.children[0].children[0].innerHTML="Mute");for(var n=0;n<4;n++)vjs.removeClass(this.el_,"vjs-vol-"+n);vjs.addClass(this.el_,"vjs-vol-"+t)},vjs.VolumeMenuButton=vjs.MenuButton.extend({init:function(e,t){vjs.MenuButton.call(this,e,t),e.on("volumechange",vjs.bind(this,this.update)),e.tech&&e.tech.features&&!1===e.tech.features.volumeControl&&this.addClass("vjs-hidden"),e.on("loadstart",vjs.bind(this,function(){e.tech.features&&!1===e.tech.features.volumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),this.addClass("vjs-menu-button")}}),vjs.VolumeMenuButton.prototype.createMenu=function(){var e=new vjs.Menu(this.player_,{contentElType:"div"}),t=new vjs.VolumeBar(this.player_,vjs.obj.merge({vertical:!0},this.options_.volumeBar));return e.addChild(t),e},vjs.VolumeMenuButton.prototype.onClick=function(){vjs.MuteToggle.prototype.onClick.call(this),vjs.MenuButton.prototype.onClick.call(this)},vjs.VolumeMenuButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute</span></div>'})},vjs.VolumeMenuButton.prototype.update=vjs.MuteToggle.prototype.update,vjs.PosterImage=vjs.Button.extend({init:function(e,t){vjs.Button.call(this,e,t),e.poster()&&this.src(e.poster()
245),e.poster()&&e.controls()||this.hide(),e.on("posterchange",vjs.bind(this,function(){this.src(e.poster())})),e.on("play",vjs.bind(this,this.hide))}});var _backgroundSizeSupported="backgroundSize"in vjs.TEST_VID.style;vjs.PosterImage.prototype.createEl=function(){var e=vjs.createEl("div",{className:"vjs-poster",tabIndex:-1});return _backgroundSizeSupported||e.appendChild(vjs.createEl("img")),e},vjs.PosterImage.prototype.src=function(e){var t=this.el();e!==undefined&&(_backgroundSizeSupported?t.style.backgroundImage='url("'+e+'")':t.firstChild.src=e)},vjs.PosterImage.prototype.onClick=function(){this.player().controls()&&this.player_.play()},vjs.LoadingSpinner=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),e.on("canplay",vjs.bind(this,this.hide)),e.on("canplaythrough",vjs.bind(this,this.hide)),e.on("playing",vjs.bind(this,this.hide)),e.on("seeking",vjs.bind(this,this.show)),e.on("seeked",vjs.bind(this,this.hide)),e.on("error",vjs.bind(this,this.show)),e.on("ended",vjs.bind(this,this.hide)),e.on("waiting",vjs.bind(this,this.show))}}),vjs.LoadingSpinner.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner"})},vjs.BigPlayButton=vjs.Button.extend(),vjs.BigPlayButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})},vjs.BigPlayButton.prototype.onClick=function(){this.player_.play()},vjs.MediaTechController=vjs.Component.extend({init:function(e,t,n){(t=t||{}).reportTouchActivity=!1,vjs.Component.call(this,e,t,n),this.initControlsListeners()}}),vjs.MediaTechController.prototype.initControlsListeners=function(){var e,t,n;t=this,e=this.player();var r=function(){e.controls()&&!e.usingNativeControls()&&t.addControlsListeners()};n=vjs.bind(t,t.removeControlsListeners),this.ready(r),e.on("controlsenabled",r),e.on("controlsdisabled",n)},vjs.MediaTechController.prototype.addControlsListeners=function(){var e;this.on("mousedown",this.onClick),this.on("touchstart",function(t){t.preventDefault(),e=this.player_.userActive()}),this.on("touchmove",function(){e&&this.player().reportUserActivity()}),this.emitTapEvents(),this.on("tap",this.onTap)},vjs.MediaTechController.prototype.removeControlsListeners=function(){this.off("tap"),this.off("touchstart"),this.off("touchmove"),this.off("touchleave"),this.off("touchcancel"),this.off("touchend"),this.off("click"),this.off("mousedown")},vjs.MediaTechController.prototype.onClick=function(e){0===e.button&&this.player().controls()&&(this.player().paused()?this.player().play():this.player().pause())},vjs.MediaTechController.prototype.onTap=function(){this.player().userActive(!this.player().userActive())},vjs.MediaTechController.prototype.setPoster=function(){},vjs.MediaTechController.prototype.features={volumeControl:!0,fullscreenResize:!1,progressEvents:!1,timeupdateEvents:!1},vjs.media={},vjs.media.ApiMethods="play,pause,paused,currentTime,setCurrentTime,duration,buffered,volume,setVolume,muted,setMuted,width,height,supportsFullScreen,enterFullScreen,src,load,currentSrc,preload,setPreload,autoplay,setAutoplay,loop,setLoop,error,networkState,readyState,seeking,initialTime,startOffsetTime,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks,defaultPlaybackRate,playbackRate,mediaGroup,controller,controls,defaultMuted".split(",");for(var i=vjs.media.ApiMethods.length-1;i>=0;i--){var methodName=vjs.media.ApiMethods[i];vjs.MediaTechController.prototype[vjs.media.ApiMethods[i]]=createMethod(methodName)}vjs.Html5=vjs.MediaTechController.extend({init:function(e,t,n){this.features.volumeControl=vjs.Html5.canControlVolume(),this.features.movingMediaElementInDOM=!vjs.IS_IOS,this.features.fullscreenResize=!0,vjs.MediaTechController.call(this,e,t,n),this.setupTriggers();var r=t.source;r&&this.el_.currentSrc===r.src&&this.el_.networkState>0?e.trigger("loadstart"):r&&(this.el_.src=r.src),vjs.TOUCH_ENABLED&&
245!1!==e.options().nativeControlsForTouch&&this.useNativeControls(),e.ready(function(){this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())}),this.triggerReady()}}),vjs.Html5.prototype.dispose=function(){vjs.MediaTechController.prototype.dispose.call(this)},vjs.Html5.prototype.createEl=function(){var e,t=this.player_,n=t.tag;n&&!1!==this.features.movingMediaElementInDOM||(n?(e=n.cloneNode(!1),vjs.Html5.disposeMediaElement(n),n=e,t.tag=null):n=vjs.createEl("video",{id:t.id()+"_html5_api",className:"vjs-tech"}),n.player=t,vjs.insertFirst(n,t.el()));for(var r=["autoplay","preload","loop","muted"],i=r.length-1;i>=0;i--){var o=r[i];null!==t.options_[o]&&(n[o]=t.options_[o])}return n},vjs.Html5.prototype.setupTriggers=function(){for(var e=vjs.Html5.Events.length-1;e>=0;e--)vjs.on(this.el_,vjs.Html5.Events[e],vjs.bind(this.player_,this.eventHandler))},vjs.Html5.prototype.eventHandler=function(e){this.trigger(e),e.stopPropagation()},vjs.Html5.prototype.useNativeControls=function(){var e,t,n,r,i;e=this,t=this.player(),e.setControls(t.controls()),n=function(){e.setControls(!0)},r=function(){e.setControls(!1)},t.on("controlsenabled",n),t.on("controlsdisabled",r),i=function(){t.off("controlsenabled",n),t.off("controlsdisabled",r)},e.on("dispose",i),t.on("usingcustomcontrols",i),t.usingNativeControls(!0)},vjs.Html5.prototype.play=function(){this.el_.play()},vjs.Html5.prototype.pause=function(){this.el_.pause()},vjs.Html5.prototype.paused=function(){return this.el_.paused},vjs.Html5.prototype.currentTime=function(){return this.el_.currentTime},vjs.Html5.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(t){vjs.log(t,"Video is not ready. (Video.js)")}},vjs.Html5.prototype.duration=function(){return this.el_.duration||0},vjs.Html5.prototype.buffered=function(){return this.el_.buffered},vjs.Html5.prototype.volume=function(){return this.el_.volume},vjs.Html5.prototype.setVolume=function(e){this.el_.volume=e},vjs.Html5.prototype.muted=function(){return this.el_.muted},vjs.Html5.prototype.setMuted=function(e){this.el_.muted=e},vjs.Html5.prototype.width=function(){return this.el_.offsetWidth},vjs.Html5.prototype.height=function(){return this.el_.offsetHeight},vjs.Html5.prototype.supportsFullScreen=function(){return!("function"!=typeof this.el_.webkitEnterFullScreen||!/Android/.test(vjs.USER_AGENT)&&/Chrome|Mac OS X 10.5/.test(vjs.USER_AGENT))},vjs.Html5.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},vjs.Html5.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},vjs.Html5.prototype.src=function(e){this.el_.src=e},vjs.Html5.prototype.load=function(){this.el_.load()},vjs.Html5.prototype.currentSrc=function(){return this.el_.currentSrc},vjs.Html5.prototype.poster=function(){return this.el_.poster},vjs.Html5.prototype.setPoster=function(e){this.el_.poster=e},vjs.Html5.prototype.preload=function(){return this.el_.preload},vjs.Html5.prototype.setPreload=function(e){this.el_.preload=e},vjs.Html5.prototype.autoplay=function(){return this.el_.autoplay},vjs.Html5.prototype.setAutoplay=function(e){this.el_.autoplay=e},vjs.Html5.prototype.controls=function(){return this.el_.controls},vjs.Html5.prototype.setControls=function(e){this.el_.controls=!!e},vjs.Html5.prototype.loop=function(){return this.el_.loop},vjs.Html5.prototype.setLoop=function(e){this.el_.loop=e},vjs.Html5.prototype.error=function(){return this.el_.error},vjs.Html5.prototype.seeking=function(){return this.el_.seeking},vjs.Html5.prototype.ended=function(){return this.el_.ended},vjs.Html5.prototype.defaultMuted=function(){return this.el_.defaultMuted},vjs.Html5.isSupported=function(){try{vjs.TEST_VID.volume=.5}catch(e){return!1}return!!vjs.TEST_VID.canPlayType},vjs.Html5.canPlaySource=function(e){try{return!!vjs.TEST_VID.canPlayType(e.type)}catch(t){return""}},vjs.Html5.canControlVolume=function(){var e=vjs.TEST_VID.volume;return vjs.TEST_VID.volume=e/2+.1,e!==vjs.TEST_VID.volume},function(){var e,t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,n=/^video\/mp4/i;vjs.Html5.patchCanPlayType=function(){vjs.ANDROID_VERSION>=4&&(e||(e=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&t.test(n)?"maybe":e.call(this,n)}),vjs.IS_OLD_ANDROID&&(e||(e=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&n.test(t)?"maybe":e.call(this,t)})},vjs.Html5.unpatchCanPlayType=function(){var t=vjs.TEST_VID.constructor.prototype.canPlayType;return vjs.TEST_VID.constructor.prototype.canPlayType=e,e=null,t},vjs.Html5.patchCanPlayType()}(),vjs.Html5.Events="loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(","),vjs.Html5.disposeMediaElement=function(e){if(e){for(e.player=null,e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(t){}}()}},vjs.Flash=vjs.MediaTechController.extend({init:function(e,t,n){vjs.MediaTechController.call(this,e,t,n);var r,i=t.source,o=t.parentEl,a=this.el_=vjs.createEl("div",{id:e.id()+"_temp_flash"}),s=e.id()+"_flash_api",u=e.options_,l=vjs.obj.merge({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:u.autoplay,preload:u.preload,loop:u.loop,muted:u.muted},t.flashVars),c=vjs.obj.merge({wmode:"opaque",bgcolor:"#000000"},t.params),d=vjs.obj.merge({id:s,name:s,"class":"vjs-tech"},t.attributes);if(i)if(i.type&&vjs.Flash.isStreamingType(i.type)){var f=vjs.Flas
245h.streamToParts(i.src);l.rtmpConnection=encodeURIComponent(f.connection),l.rtmpStream=encodeURIComponent(f.stream)}else l.src=encodeURIComponent(vjs.getAbsoluteURL(i.src));if(this.setCurrentTime=function(e){r=e,this.el_.vjs_setProperty("currentTime",e)},this.currentTime=function(){return this.seeking()?r:this.el_.vjs_getProperty("currentTime")},vjs.insertFirst(a,o),t.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(t.startTime)}),vjs.IS_FIREFOX&&this.ready(function(){vjs.on(this.el(),"mousemove",vjs.bind(this,function(){this.player().trigger({type:"mousemove",bubbles:!1})}))}),!0!==t.iFrameMode||vjs.IS_FIREFOX)vjs.Flash.embed(t.swf,a,l,c,d);else{ 246var h=vjs.createEl("iframe",{id:s+"_iframe",name:s+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});l.readyFunction="ready",l.eventProxyFunction="events",l.errorEventProxyFunction="errors",vjs.on(h,"load",vjs.bind(this,function(){var e,n=h.contentWindow;(e=h.contentDocument?h.contentDocument:h.contentWindow.document).write(vjs.Flash.getEmbedCode(t.swf,l,c,d)),n.player=this.player_,n.ready=vjs.bind(this.player_,function(t){var n=e.getElementById(t),r=this.tech;r.el_=n,vjs.Flash.checkReady(r)}
246),n.events=vjs.bind(this.player_,function(e,t){var n=this;n&&"flash"===n.techName&&n.trigger(t)}),n.errors=vjs.bind(this.player_,function(e,t){vjs.log("Flash Error",t)})})),a.parentNode.replaceChild(h,a)}}}),vjs.Flash.prototype.dispose=function(){vjs.MediaTechController.prototype.dispose.call(this)},vjs.Flash.prototype.play=function(){this.el_.vjs_play()},vjs.Flash.prototype.pause=function(){this.el_.vjs_pause()},vjs.Flash.prototype.src=function(e){if(e===undefined)return this.currentSrc();if(vjs.Flash.isStreamingSrc(e)?(e=vjs.Flash.streamToParts(e),this.setRtmpConnection(e.connection),this.setRtmpStream(e.stream)):(e=vjs.getAbsoluteURL(e),this.el_.vjs_src(e)),this.player_.autoplay()){var t=this;setTimeout(function(){t.play()},0)}},vjs.Flash.prototype.currentSrc=function(){var e=this.el_.vjs_getProperty("currentSrc");if(null==e){var t=this.rtmpConnection(),n=this.rtmpStream();t&&n&&(e=vjs.Flash.streamFromParts(t,n))}return e},vjs.Flash.prototype.load=function(){this.el_.vjs_load()},vjs.Flash.prototype.poster=function(){this.el_.vjs_getProperty("poster")},vjs.Flash.prototype.setPoster=function(){},vjs.Flash.prototype.buffered=function(){return vjs.createTimeRange(0,this.el_.vjs_getProperty("buffered"))},vjs.Flash.prototype.supportsFullScreen=function(){return!1},vjs.Flash.prototype.enterFullScreen=function(){return!1};var api=vjs.Flash.prototype,readWrite="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),readOnly="error,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),createSetter=function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);api["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}},createGetter=function(e){api[e]=function(){return this.el_.vjs_getProperty(e)}},requirejs,require,define;if(function(){var e;for(e=0;e<readWrite.length;e++)createGetter(readWrite[e]),createSetter(readWrite[e]);for(e=0;e<readOnly.length;e++)createGetter(readOnly[e])}(),vjs.Flash.isSupported=function(){return vjs.Flash.version()[0]>=10},vjs.Flash.canPlaySource=function(e){var t;return e.type?(t=e.type.replace(/;.*/,"").toLowerCase())in vjs.Flash.formats||t in vjs.Flash.streamingFormats?"maybe":void 0:""},vjs.Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},vjs.Flash.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},vjs.Flash.onReady=function(e){var t=vjs.el(e),n=t.player||t.parentNode.player,r=n.tech;t.player=n,r.el_=t,vjs.Flash.checkReady(r)}
246,vjs.Flash.checkReady=function(e){e.el().vjs_getProperty?e.triggerReady():setTimeout(function(){vjs.Flash.checkReady(e)},50)},vjs.Flash.onEvent=function(e,t){vjs.el(e).player.trigger(t)},vjs.Flash.onError=function(e,t){vjs.el(e).player.trigger("error"),vjs.log("Flash Error",t,e)},vjs.Flash.version=function(){var e="0,0,0";try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(n){}}return e.split(",")},vjs.Flash.embed=function(e,t,n,r,i){var o=vjs.Flash.getEmbedCode(e,n,r,i),a=vjs.createEl("div",{innerHTML:o}).childNodes[0],s=t.parentNode;t.parentNode.replaceChild(a,t);var u=s.childNodes[0];return setTimeout(function(){u.style.display="block"},1e3),a},vjs.Flash.getEmbedCode=function(e,t,n,r){var i='<object type="application/x-shockwave-flash"',o="",a="",s="";return t&&vjs.obj.each(t,function(e,t){o+=e+"="+t+"&"}),n=vjs.obj.merge({movie:e,flashvars:o,allowScriptAccess:"always",allowNetworking:"all"},n),vjs.obj.each(n,function(e,t){a+='<param name="'+e+'" value="'+t+'" />'}),r=vjs.obj.merge({data:e,width:"100%",height:"100%"},r),vjs.obj.each(r,function(e,t){s+=e+'="'+t+'" '}),i+s+">"+a+"</object>"},vjs.Flash.streamFromParts=function(e,t){return e+"&"+t},vjs.Flash.streamToParts=function(e){var t={connection:"",stream:""};if(!e)return t;var n,r=e.indexOf("&");return-1!==r?n=r+1:0===(r=n=e.lastIndexOf("/")+1)&&(r=n=e.length),t.connection=e.substring(0,r),t.stream=e.substring(n,e.length),t},vjs.Flash.isStreamingType=function(e){return e in vjs.Flash.streamingFormats},vjs.Flash.RTMP_RE=/^rtmp[set]?:\/\//i,vjs.Flash.isStreamingSrc=function(e){return vjs.Flash.RTMP_RE.test(e)},vjs.MediaLoader=vjs.Component.extend({init:function(e,t,n){if(vjs.Component.call(this,e,t,n),e.options_.sources&&0!==e.options_.sources.length)e.src(e.options_.sources);else for(var r=0,i=e.options_.techOrder;r<i.length;r++){var o=vjs.capitalize(i[r]),a=window.videojs[o];if(a&&a.isSupported()){e.loadTech(o);break}}}}),vjs.Player.prototype.textTracks_,vjs.Player.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||[],this.textTracks_},vjs.Player.prototype.addTextTrack=function(e,t,n,r){var i=this.textTracks_=this.textTracks_||[];(r=r||{}).kind=e,r.label=t,r.language=n;var o=vjs.capitalize(e||"subtitles"),a=new window.videojs[o+"Track"](this,r);return i.push(a),a},vjs.Player.prototype.addTextTracks=function(e){for(var t,n=0;n<e.length;n++)t=e[n],this.addTextTrack(t.kind,t.label,t.language,t);return this},vjs.Player.prototype.showTextTrack=function(e,t){for(var n,r,i,o=this.textTracks_,a=0,s=o.length;a<s;a++)(n=o[a]).id()===e?(n.show(),r=n):t&&n.kind()==t&&n.mode()>0&&n.disable();return(i=r?r.kind():t||!1)&&this.trigger(i+"trackchange"),this},vjs.TextTrack=vjs.Component.extend({init:function(e,t){vjs.Component.call(this,e,t),this.id_=t.id||"vjs_"+t.kind+"_"+t.language+"_"+vjs.guid++,this.src_=t.src,this.dflt_=t["default"]||t.dflt,this.title_=t.title,this.language_=t.srclang,this.label_=t.label,this.cues_=[],this.activeCues_=[],this.readyState_=0,this.mode_=0,this.player_.on("fullscreenchange",vjs.bind(this,this.adjustFontSize))}}),vjs.TextTrack.prototype.kind_,vjs.TextTrack.prototype.kind=function(){return this.kind_},vjs.TextTrack.prototype.src_,vjs.TextTrack.prototype.src=function(){return this.src_},vjs.TextTrack.prototype.dflt_,vjs.TextTrack.prototype.dflt=function(){return this.dflt_},vjs.TextTrack.prototype.title_,vjs.TextTrack.prototype.title=function(){return this.title_},vjs.TextTrack.prototype.language_,vjs.TextTrack.prototype.language=function(){return this.language_},vjs.TextTrack.prototype.label_,vjs.TextTrack.prototype.label=function(){return this.label_},vjs.TextTrack.prototype.cues_,vjs.TextTrack.prototype.cues=function(){return this.cues_},vjs.TextTrack.prototype.activeCues_,vjs.TextTrack.prototype.activeCues=function(){return this.activeCues_},vjs.TextTrack.prototype.readyState_,vjs.TextTrack.prototype.readyState=function(){return this.readyState_},vjs.TextTrack.prototype.mode_,vjs.TextTrack.prototype.mode=function(){return this.mode_},vjs.TextTrack.prototype.adjustFontSize=function(){this.player_.isFullScreen()?this.el_.style.fontSize=screen.width/this.player_.width()*1.4*100+"%":this.el_.style.fontSize=""},vjs.TextTrack.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-"+this.kind_+" vjs-text-track"})},vjs.TextTrack.prototype.show=function(){this.activate(),this.mode_=2,vjs.C
246omponent.prototype.show.call(this)},vjs.TextTrack.prototype.hide=function(){this.activate(),this.mode_=1,vjs.Component.prototype.hide.call(this)},vjs.TextTrack.prototype.disable=function(){2==this.mode_&&this.hide(),this.deactivate(),this.mode_=0},vjs.TextTrack.prototype.activate=function(){0===this.readyState_&&this.load(),0===this.mode_&&(this.player_.on("timeupdate",vjs.bind(this,this.update,this.id_)),this.player_.on("ended",vjs.bind(this,this.reset,this.id_)),"captions"!==this.kind_&&"subtitles"!==this.kind_||this.player_.getChild("textTrackDisplay").addChild(this))},vjs.TextTrack.prototype.deactivate=function(){this.player_.off("timeupdate",vjs.bind(this,this.update,this.id_)),this.player_.off("ended",vjs.bind(this,this.reset,this.id_)),this.reset(),this.player_.getChild("textTrackDisplay").removeChild(this)},vjs.TextTrack.prototype.load=function(){0===this.readyState_&&(this.readyState_=1,vjs.get(this.src_,vjs.bind(this,this.parseCues),vjs.bind(this,this.onError)))},vjs.TextTrack.prototype.onError=function(e){this.error=e,this.readyState_=3,this.trigger("error")},vjs.TextTrack.prototype.parseCues=function(e){for(var t,n,r,i,o=e.split("\n"),a="",s=1,u=o.length;s<u;s++)if(a=vjs.trim(o[s])){for(-1==a.indexOf("-->")?(i=a,a=vjs.trim(o[++s])):i=this.cues_.length,t={id:i,index:this.cues_.length},n=a.split(" --> "),t.startTime=this.parseCueTime(n[0]),t.endTime=this.parseCueTime(n[1]),r=[];o[++s]&&(a=vjs.trim(o[s]));)r.push(a);t.text=r.join("<br/>"),this.cues_.push(t)}this.readyState_=2,this.trigger("loaded")},vjs.TextTrack.prototype.parseCueTime=function(e){var t,n,r,i,o,a=e.split(":"),s=0;return 3==a.length?(t=a[0],n=a[1],r=a[2]):(t=0,n=a[0],r=a[1]),i=(i=(r=r.split(/\s+/)).splice(0,1)[0]).split(/\.|,/),o=parseFloat(i[1]),i=i[0],s+=3600*parseFloat(t),s+=60*parseFloat(n),s+=parseFloat(i),o&&(s+=o/1e3),s},vjs.TextTrack.prototype.update=function(){if(this.cues_.length>0){var e=this.player_.currentTime();if(this.prevChange===undefined||e<this.prevChange||this.nextChange<=e){var t,n,r,i,o=this.cues_,a=this.player_.duration(),s=0,u=!1,l=[];for(e>=this.nextChange||this.nextChange===undefined?i=this.firstActiveIndex!==undefined?this.firstActiveIndex:0:(u=!0,i=this.lastActiveIndex!==undefined?this.lastActiveIndex:o.length-1);;){if((r=o[i]).endTime<=e)s=Math.max(s,r.endTime),r.active&&(r.active=!1);else if(e<r.startTime){if(a=Math.min(a,r.startTime),r.active&&(r.active=!1),!u)break}else u?(l.splice(0,0,r),n===undefined&&(n=i),t=i):(l.push(r),t===undefined&&(t=i),n=i),a=Math.min(a,r.endTime),s=Math.max(s,r.startTime),r.active=!0;if(u){if(0===i)break;i--}else{if(i===o.length-1)break;i++}}this.activeCues_=l,this.nextChange=a,this.prevChange=s,this.firstActiveIndex=t,this.lastActiveIndex=n,this.updateDisplay(),this.trigger("cuechange")}}},vjs.TextTrack.prototype.updateDisplay=function(){for(var e=this.activeCues_,t="",n=0,r=e.length;n<r;n++)t+='<span class="vjs-tt-cue">'+e[n].text+"</span>";this.el_.innerHTML=t},vjs.TextTrack.prototype.reset=function(){this.nextChange=0,this.prevChange=this.player_.duration(),this.firstActiveIndex=0,this.lastActiveIndex=0},vjs.CaptionsTrack=vjs.TextTrack.extend(),vjs.CaptionsTrack.prototype.kind_="captions",vjs.SubtitlesTrack=vjs.TextTrack.extend(),vjs.SubtitlesTrack.prototype.kind_="subtitles",vjs.ChaptersTrack=vjs.TextTrack.extend(),vjs.ChaptersTrack.prototype.kind_="chapters",vjs.TextTrackDisplay=vjs.Component.extend({init:function(e,t,n){vjs.Component.call(this,e,t,n),e.options_.tracks&&e.options_.tracks.length>0&&this.player_.addTextTracks(e.options_.tracks)}}),vjs.TextTrackDisplay.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"})},vjs.TextTrackMenuItem=vjs.MenuItem.extend({init:function(e,t){var n=this.track=t.track;t.label=n.label(),t.selected=n.dflt(),vjs.MenuItem.call(this,e,t),this.player_.on(n.kind()+"trackchange",vjs.bind(this,this.update))}}),vjs.TextTrackMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this),this.player_.showTextTrack(this.track.id_,this.track.kind())},vjs.TextTrackMenuItem.prototype.update=function(){this.selected(2==this.track.mode())},vjs.OffTextTrackMenuItem=vjs.TextTrackMenuItem.extend({init:function(e,t){t.track={kind:function(){return t.kind},player:e,label:function(){return t.kind+" off"},dflt:function(){return!1},mode:function(){return!1}},vjs.TextTrackMenuItem.call(this,e,t),this.selected(!0)}}),vjs.OffTextTrackMenuItem.prototype.onClick=function(){vjs.TextTrackMenuItem.prototype.onClick.call(this),this.player_.showTextTrack(this.track.id_,this.track.kind())},vjs.OffTextTrackMenuItem.prototype.update=function(){for(var e,t=this.player_.textTracks(),n=0,r=t.length,i=!0;n<r;n++)(e=t[n]).kind()==this.track.kind()&&2==e.mode()&&(i=!1);this.selected(i)},vjs.TextTrackButton=vjs.MenuButton.extend({init:function(e,t){vjs.MenuButton.call(this,e,t),this.items.length<=1&&this.hide()}}),vjs.TextTrackButton.prototype.createItems=function(){var e,t=[];t.push(new vjs.OffTextTrackMenuItem(this.player_,{kind:this.kind_}));for(var n=0;n<this.player_.textTracks().length;n++)(e=this.player_.textTracks()[n]).kind()===this.kind_&&t.push(new vjs.TextTrackMenuItem(this.player_,{track:e}));return t},vjs.CaptionsButton=vjs.TextTrackButton.extend({init:function(e,t,n){vjs.TextTrackButton.call(this,e,t,n),this.el_.setAttribute("aria-label","Captions Menu")}}),vjs.CaptionsButton.prototype.kind_="captions",vjs.CaptionsButton.prototype.buttonText="Captions",vjs.CaptionsButton.prototype.className="vjs-captions-button",vjs.SubtitlesButton=vjs.TextTrackButton.extend({init:function(e,t,n){vjs.TextTrackButton.call(this,e,t,n),this.el_.setAttribute("aria-label","Subtitles Menu")}}),vjs.SubtitlesButton.prototype.kind_="subtitles",vjs.SubtitlesButton.prototype.buttonText="Subtitles",vjs.SubtitlesButton.prototype.className="vjs-subtitles-button",vjs.ChaptersButton=vjs.TextTrackButton.extend({init:function(e,t,n){vjs.TextTrackButton.call(this,e,t,n),this.el_.setAttribute("aria-label","Chapters Menu")}}),vjs.ChaptersButton.prototype.kind_="chapters",vjs.ChaptersButton.prototype.buttonText="Chapters",vjs.ChaptersButton.prototype.className="vjs-chapters-button",vjs.ChaptersButton.prototype.createItems=function(){for(var e,t=[],n=0;n<this.player_.textTracks().length;n++)(e=this.player_.textTracks()[n]).kind()===this.kind_&&t.push(new vjs.TextTrackMenuItem(this.player_,{track:e}));return t},vjs.ChaptersButton.prototype.createMenu=function(){for(var e,t,n=this.player_.textTracks(),r=0,i=n.length,o=this.items=[];r<i;r++)if((e=n[r]).kind()==this.kind_&&e.dflt()){if(e.readyState()<2)return this.chaptersTrack=e,void e.on("loaded",vjs.bind(this,this.createMenu));t=e;break}var a=this.menu=new vjs.Menu(this.player_);if(a.el_.appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:v
246js.capitalize(this.kind_),tabindex:-1})),t){var s,u,l=t.cues_;for(r=0,i=l.length;r<i;r++)s=l[r],u=new vjs.ChaptersTrackMenuItem(this.player_,{track:t,cue:s}),o.push(u),a.addChild(u)}return this.items.length>0&&this.show(),a},vjs.ChaptersTrackMenuItem=vjs.MenuItem.extend({init:function(e,t){var n=this.track=t.track,r=this.cue=t.cue,i=e.currentTime();t.label=r.text,t.selected=r.startTime<=i&&i<r.endTime,vjs.MenuItem.call(this,e,t),n.on("cuechange",vjs.bind(this,this.update))}}),vjs.ChaptersTrackMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},vjs.ChaptersTrackMenuItem.prototype.update=function(){var e=this.cue,t=this.player_.currentTime();this.selected(e.startTime<=t&&t<e.endTime)},vjs.obj.merge(vjs.ControlBar.prototype.options_.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}}),vjs.JSON,"undefined"!=typeof window.JSON&&"function"===window.JSON.parse)vjs.JSON=window.JSON;else{vjs.JSON={};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;vjs.JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&((r=walk(i,n))!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.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(): invalid or malformed JSON data")}}vjs.autoSetup=function(){var e,t,n=document.getElementsByTagName("video");if(n&&n.length>0)for(var r=0,i=n.length;r<i;r++){if(!(t=n[r])||!t.getAttribute){vjs.autoSetupTimeout(1);break}t.player===undefined&&null!==(e=t.getAttribute("data-setup"))&&(e=vjs.JSON.parse(e||"{}"),videojs(t,e))}else vjs.windowLoaded||vjs.autoSetupTimeout(1)},vjs.autoSetupTimeout=function(e){setTimeout(vjs.autoSetup,e)},"complete"===document.readyState?vjs.windowLoaded=!0:vjs.one(window,"load",function(){vjs.windowLoaded=!0}),vjs.autoSetupTimeout(1),vjs.plugin=function(e,t){vjs.Player.prototype[e]=t}, 247/** 248 * jQuery org-chart/tree plugin. 249 * 250 * Author: Wes Nolte 251 * http://twitter.com/wesnolte 252 * 253 * Based on the work of Mark Lee 254 * http://www.capricasoftware.co.uk 255 * 256 * Copyright (c) 2011 Wesley Nolte 257 * Dual licensed under the MIT and GPL licenses. 258 * 259 */ 260function(e){function t(r,i,o,a){var s,u=e("<table cellpadding='0' cellspacing='0' border='0'/>"),l=e("<tbody/>"),c=e("<tr/>").addClass("node-cells"),d=e("<td/>").addClass("node-cell").attr("colspan",2),f=r.children("ul:first").children("li");f.length>1&&d.attr("colspan",2*f.length);var h=r.clone().children("ul,li").remove().end().html();if(n++,r.data("tree-node",n),s=e("<div>").addClass("node").data("tree-node",n).append(h),f.length>0&&s.click(function(){var t=e(this),n=t.closest("tr");n.hasClass("contracted")?(t.css("cursor","n-resize"),n.removeClass("contracted").addClass("expanded"),n.nextAll("tr").css("visibility",""),r.removeClass("collapsed")):(t.css("cursor","s-resize"),n.removeClass("expanded").addClass("contracted"),n.nextAll("tr").css("visibility","hidden"),r.addClass("collapsed"))}),d.append(s),c.append(d),l.append(c),f.length>0){if(s.css("cursor","n-resize"),-1==a.depth||o+1<a.depth){var p=e("<tr/>"),m=e("<td/>").attr("colspan",2*f.length);p.append(m),$downLine=e("<div></div>").addClass("line down"),m.append($downLine),l.append(p);var v=e("<tr/>");f.each(function(){var t=e("<td> </td>").addClass("line left top"),n=e("<td> </td>").addClass("line right top");v.append(t).append(n)}),v.find("td:first").removeClass("top").end().find("td:last").removeClass("top"),l.append(v);var g=e("<tr/>");f.each(function(){var n=e("<td class='node-container'/>");n.attr("colspan",2),t(e(this),n,o+1,a),g.append(n)})}l.append(g)}if(r.attr("class")!=undefined){var y=r.attr("class").split(/\s+/);e.each(y,function(e,t){"collapsed"==t?(console.log(r),c.nextAll("tr").css("visibility","hidden"),c.removeClass("expanded"),c.addClass("contracted"),s.css("cursor","s-resize")):s.addClass(t)})}u.append(l),i.append(u),s.children("a").click(function(e){console.log(e),e.stopPropagation()})}e.fn.jOrgChart=function(n){var r=e.extend({},e.fn.jOrgChart.defaults,n),i=e(r.chartElement);$this=e(this);var o=e("<div class='"+r.chartClass+"'/>");$this.is("ul")?t($this.find("li:first"),o,0,r):$this.is("li")&&t($this,o,
2600,r),i.append(o),r.dragAndDrop&&(e("div.node").draggable({cursor:"move",distance:40,helper:"clone",opacity:.8,revert:"invalid",revertDuration:100,snap:"div.node.expanded",snapMode:"inner",stack:"div.node"}),e("div.node").droppable({accept:".node",activeClass:"drag-active",hoverClass:"drop-hover"}),e("div.node").bind("dragstart",function(){e(this).parentsUntil(".node-container").find("*").filter(".node").droppable("disable")}),e("div.node").bind("dragstop",function(){e(r.chartElement).children().remove(),$this.jOrgChart(r)}),e("div.node").bind("drop",function(t,n){var r=e(this).data("tree-node"),i=$this.find("li").filter(function(){return e(this).data("tree-node")===r}),o=i.children("ul"),a=n.draggable.data("tree-node"),s=$this.find("li").filter(function(){return e(this).data("tree-node")===a}),u=s.parent("ul");o.length>0?o.append(s):(i.append("<ul></ul>"),i.children("ul").append(s)),0===u.children().length&&u.remove()}))},e.fn.jOrgChart.defaults={chartElement:"body",depth:-1,chartClass:"jOrgChart",dragAndDrop:!1};var n=0}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.instantsearch=t():e.instantsearch=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=r(n(1));e.exports=i["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),n(2),n(3);var i=r(n(4)),o=r(n(5)),a=r(n(99)),s=r(n(222)),u=r(n(393)),l=r(n(397)),c=r(n(401)),d=r(n(404)),f=r(n(409)),h=r(n(413)),p=r(n(415)),m=r(n(417)),v=r(n(418)),g=r(n(425)),y=r(n(430)),b=r(n(432)),_=r(n(436)),x=r(n(437)),w=r(n(440)),C=r(n(443)),k=r(n(220)),S=(0,i["default"])(o["default"]);S.widgets={clearAll:s["default"],currentRefinedValues:u["default"],hierarchicalMenu:l["default"],hits:c["default"],hitsPerPageSelector:d["default"],menu:f["default"],refinementList:h["default"],numericRefinementList:p["default"],numericSelector:m["default"],pagination:v["default"],priceRanges:g["default"],searchBox:y["default"],rangeSlider:b["default"],sortBySelector:_["default"],starRating:x["default"],stats:w["default"],toggle:C["default"]},S.version=k["default"],S.createQueryString=a["default"].url.getQueryStringFromState,t["default"]=S},function(){"use strict";Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e})},function(){"use strict";var e={};if(!Object.setPrototypeOf&&!e.__proto__){var t=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:t.call(Object,e)}}},function(e){"use strict";function t(e){var t=function(){for(var t=arguments.length,r=Array(t),i=0;t>i;i++)r[i]=arguments[i];return new(n.apply(e,[null].concat(r)))};return t.__proto__=e,t.prototype=e.prototype,t}var n=Function.prototype.bind;e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){return"#"}function u(e,t){if(!t.getConfiguration)return e;var n=t.getConfiguration(e);return(0,p["default"])({},e,n,function(e,t){return Array.isArray(e)?(0,m["default"])(e,t):void 0})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=r(n(6)),f=r(n(99)),h=r(n(15)),p=r(n(80)),m=r(n(217)),v=r(n(45)),g=n(89),y=r(n(219)),b=r(n(220)),_=r(n(221)),x=function(){function e(t){var n=t.appId,r=void 0===n?null:n,a=t.apiKey,s=void 0===a?null:a,u=t.indexName,c=void 0===u?null:u,f=t.numberLocale,h=t.searchParameters,p=void 0===h?{}:h,m=t.urlSync,v=void 0===m?null:m,g=t.searchFunction;i(this,e);var y=o(this,Object.getPrototypeOf(e).call(this));if(null===r||null===s||null===c)throw new Error("\nUsage: instantsearch({\n appId: 'my_application_id',\n apiKey: 'my_search_api_key',\n indexName: 'my_index_name'\n});");var x=(0,d["default"])(r,s);return x.addAlgoliaAgent("instantsearch.js "+b["default"]),y.client=x,y.helper=null,y.indexName=c,y.searchParameters=l({},p,{index:c}),y.widgets=[],y.templatesConfig={helpers:(0,_["default"])({numberLocale:f}),compileOptions:{}},g&&(y._searchFunction=g),y.urlSync=!0===v?{}:v,y}return a(e,g.EventEmitter),c(e,[{key:"addWidget",value:function(e){if(void 0===e.render&&void 0===e.init)throw new Error("Widget definition missing render or init method");this.widgets.push(e)}},{key:"start",value:function(){if(!this.widgets)throw new Error("No widgets were added to instantsearch.js");if(this.urlSync){var e=(0,y["default"])(this.urlSync);this._createURL=e.createURL.bind(e),this._onHistoryChange=e.onHistoryChange.bind(e),this.widgets.push(e)}else this._createURL=s,this._onHistoryChange=function(){};this.searchParameters=this.widgets.reduce(u,this.searchParameters);var t=(0,f["default"])(this.client,this.searchParameters.index||this.indexName,this.searchParameters);this._searchFunction&&(this._originalHelperSearch=t.search.bind(t),t.search=this._wrappedSearch.bind(this)),this.helper=t,this._init(t.state,t),t.on("result",this._render.bind(this,t)),t.search()}},{key:"_wrappedSearch",value:function(){var e=(0,v["default"])(this.helper);e.search=this._originalHelperSearch,this._searchFunction(e)}},{key:"createURL",value:function(e){if(!this._createURL)throw new Error("You need to call start() before calling createURL()");return this._createURL(this.helper.state.setQueryParameters(e))}},{key:"_render",value:function(e,t,n){(0,h["default"])(this.widgets,function(r){r.render&&r.render({templatesConfig:this.templatesConfig,results:t,state:n,helper:e,createURL:this._createURL})}
260,this),this.emit("render")}},{key:"_init",value:function(e,t){var n=this._onHistoryChange,r=this.templatesConfig;(0,h["default"])(this.widgets,function(i){i.init&&i.init({state:e,helper:t,templatesConfig:r,createURL:this._createURL,onHistoryChange:n})},this)}}]),e}();t["default"]=x},function(e,t,n){"use strict";function r(e,t,o){var a=n(96),s=n(97);return void 0===(o=a(o||{})).protocol&&(o.protocol=s()),o._ua=o._ua||r.ua,new i(e,t,o)}function i(){s.apply(this,arguments)}e.exports=r;var o=n(7),a=window.Promise||n(8).Promise,s=n(13),u=n(14),l=n(90),c=n(94),d=n(95);"development"==={NODE_ENV:"production"}.APP_ENV&&n(42).enable("algoliasearch*"),r.version=n(98),r.ua="Algolia for vanilla JavaScript "+r.version,r.initPlaces=d(r),window.__algolia={debug:n(42),algoliasearch:r};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};o(i,s),i.prototype._request=function(e,t){return new a(function(n,r){function i(){if(!c){var e;f.timeout||clearTimeout(s);try{e={body:JSON.parse(h.responseText),responseText:h.responseText,statusCode:h.status,headers:h.getAllResponseHeaders&&h.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:h.responseText})}e instanceof u.UnparsableJSON?r(e):n(e)}}function o(e){c||(f.timeout||clearTimeout(s),r(new u.Network({more:e})))}function a(){f.timeout||(c=!0,h.abort()),r(new u.RequestTimeout)}if(f.cors||f.hasXDomainRequest){e=l(e,t.headers);var s,c,d=t.body,h=f.cors?new XMLHttpRequest:new XDomainRequest;h instanceof XMLHttpRequest?h.open(t.method,e,!0):h.open(t.method,e),f.cors&&(d&&("POST"===t.method?h.setRequestHeader("content-type","application/x-www-form-urlencoded"):h.setRequestHeader("content-type","application/json")),h.setRequestHeader("accept","application/json")),h.onprogress=function(){},h.onload=i,h.onerror=o,f.timeout?(h.timeout=t.timeout,h.ontimeout=a):s=setTimeout(a,t.timeout),h.send(d)}else r(new u.Network("CORS not supported"))})},i.prototype._request.fallback=function(e,t){return e=l(e,t.headers),new a(function(n,r){c(e,t,function(e,t){return e?void r(e):void n(t)})})},i.prototype._promise={reject:function(e){return a.reject(e)},resolve:function(e){return a.resolve(e)},delay:function(e){return new a(function(t){setTimeout(t,e)})}}},function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r;(function(e,i,o){(function(){"use strict";function a(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return"function"==typeof e}function u(e){V=e}function l(e){Y=e}function c(){return function(){e.nextTick(m)}}function d(){return function(){W(m)}}function f(){var e=0,t=new Z(m),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function h(){var e=new MessageChannel;return e.port1.onmessage=m,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(m,1)}}function m(){for(var e=0;G>e;e+=2){(0,ne[e])(ne[e+1]),ne[e]=void 0,ne[e+1]=void 0}G=0}function v(){try{var e=n(11);return W=e.runOnLoop||e.runOnContext,d()}catch(t){return p()}}function g(e,t){var n=this,r=n._state;if(r===ae&&!e||r===se&&!t)return this;var i=new this.constructor(b),o=n._result;if(r){var a=arguments[r-1];Y(function(){A(r,i,a,o)})}else N(n,i,e,t);return i}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return E(n,e),n}function b(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function x(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return ue.error=t,ue}}function C(e,t,n,r){try{e.call(t,n,r)}catch(i){return i}}function k(e,t,n){Y(function(e){var r=!1,i=C(n,t,function(n){r||(r=!0,t!==n?E(e,n):P(e,n))},function(t){r||(r=!0,$(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,$(e,i))},e)}function S(e,t){t._state===ae?P(e,t._result):t._state===se?$(e,t._result):N(t,void 0,function(t){E(e,t)},function(t){$(e,t)})}function j(e,t,n){t.constructor===e.constructor&&n===re&&constructor.resolve===ie?S(e,t):n===ue?$(e,ue.error):void 0===n?P(e,t):s(n)?k(e,t,n
260):P(e,t)}function E(e,t){e===t?$(e,_()):a(t)?j(e,t,w(t)):P(e,t)}function T(e){e._onerror&&e._onerror(e._result),R(e)}function P(e,t){e._state===oe&&(e._result=t,e._state=ae,0!==e._subscribers.length&&Y(R,e))}function $(e,t){e._state===oe&&(e._state=se,e._result=t,Y(T,e))}function N(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+ae]=n,i[o+se]=r,0===o&&e._state&&Y(R,e)}function R(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,i,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?A(n,r,i,o):i(o);e._subscribers.length=0}}function M(){this.error=null}function D(e,t){try{return e(t)}catch(n){return le.error=n,le}}function A(e,t,n,r){var i,o,a,u,l=s(n);if(l){if((i=D(n,r))===le?(u=!0,o=i.error,i=null):a=!0,t===i)return void $(t,x())}else i=r,a=!0;t._state!==oe||(l&&a?E(t,i):u?$(t,o):e===ae?P(t,i):e===se&&$(t,i))}function I(e,t){try{t(function(t){E(e,t)},function(t){$(e,t)})}catch(n){$(e,n)}}function O(e){return new me(this,e).promise}function F(e){function t(e){E(i,e)}function n(e){$(i,e)}var r=this,i=new r(b);if(!Q(e))return $(i,new TypeError("You must pass an array to race.")),i;for(var o=e.length,a=0;i._state===oe&&o>a;a++)N(r.resolve(e[a]),void 0,t,n);return i}function L(e){var t=new this(b);return $(t,e),t}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function B(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
260onstructor cannot be called as a function.")}function U(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&H(),this instanceof U?I(this,e):B())}function q(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&P(this.promise,this._result))):$(this.promise,this._validationError())}function z(){var e;if(void 0!==i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=pe)}var W,V,K,Q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},G=0,Y=function(e,t){ne[G]=e,ne[G+1]=t,2===(G+=2)&&(V?V(m):K())},X="undefined"!=typeof window?window:void 0,J=X||{},Z=J.MutationObserver||J.WebKitMutationObserver,ee=void 0!==e&&"[object process]"==={}.toString.call(e),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3);K=ee?c():Z?f():te?h():void 0===X?v():p();var re=g,ie=y,oe=void 0,ae=1,se=2,ue=new M,le=new M,ce=O,de=F,fe=L,he=0,pe=U;U.all=ce,U.race=de,U.resolve=ie,U.reject=fe,U._setScheduler=u,U._setAsap=l,U._asap=Y,U.prototype={constructor:U,then:re,"catch":function(e){return this.then(null,e)}};var me=q;q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===oe&&e>n;n++)this._eachEntry(t[n],n)},q.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ie){var i=w(e);if(i===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===pe){var o=new n(b);j(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},q.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===oe&&(this._remaining--,e===se?$(r,n):this._result[t]=n),0===this._remaining&&P(r,this._result)},q.prototype._willSettleAt=function(e,t){var n=this;N(e,void 0,function(e){n._settledAt(ae,t,e)},function(e){n._settledAt(se,t,e)})};var ve=z,ge={Promise:pe,polyfill:ve};n(12).amd?void 0!==(r=function(){return ge}.call(t,n,t,o))&&(o.exports=r):void 0!==o&&o.exports?o.exports=ge:void 0!==this&&(this.ES6Promise=ge),ve()}).call(this)}).call(t,n(9),function(){return this}(),n(10)(e))},function(e){function t(){u=!1,o.length?s=o.concat(s):l=-1,s.length&&n()}function n(){if(!u){var e=setTimeout(t);u=!0;for(var n=s.length;n;){for(o=s,s=[];++l<n;)o&&o[l].run();l=-1,n=s.length}o=null,u=!1,clearTimeout(e)}}function r(e,t){this.fun=e,this.array=t}function i(){}var o,a=e.exports={},s=[],u=!1,l=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];s.push(new r(e,t)),1!==s.length||u||setTimeout(n,0)},r.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(){},function(e){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";function r(e,t,r){var o=n(42)("algoliasearch"),a=n(45),s=n(34),u=n(55),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!e)throw new c.AlgoliaSearchError("Please provide an application ID. "+l);if(!t)throw new c.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=e,this.apiKey=t;var d=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]},this.hostIndex={read:0,write:0};var f=(r=r||{}).protocol||"https:",h=void 0===r.timeout?2e3:r.timeout;if(/:$/.test(f)||(f+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new c.AlgoliaSearchError("protocol must be `http:` or `https:`
260(was `"+r.protocol+"`)");r.hosts?s(r.hosts)?(this.hosts.read=a(r.hosts),this.hosts.write=a(r.hosts)):(this.hosts.read=a(r.hosts.read),this.hosts.write=a(r.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(d),this.hosts.write=[this.applicationID+".algolia.net"].concat(d)),this.hosts.read=u(this.hosts.read,i(f)),this.hosts.write=u(this.hosts.write,i(f)),this.requestTimeout=h,this.extraHeaders=[],this.cache=r._cache||{},this._ua=r._ua,this._useCache=!(void 0!==r._useCache&&!r._cache)||r._useCache,this._useFallback=void 0===r.useFallback||r.useFallback,this._setTimeout=r._setTimeout,o("init done, %j",this)}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function o(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to [email protected]";throw new c.AlgoliaSearchError(e)}function a(e,t){return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+e.toLowerCase().replace(".","").replace("()","")}function s(e,t){t(e,0)}function u(e,t){function n(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return n}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(e);return Array.prototype.toJSON=t,n}e.exports=r;var c=n(14),d=n(41),f=500;r.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,n){var r={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},copyIndex:function(e,t,n){var r={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},getLogs:function(e,t,n){return 0===arguments.length||"function"==typeof e?(n=e,e=0,t=10):1!==arguments.length&&"function"!=typeof t||(n=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:n})},listIndexes:function(e,t){var n="";return void 0===e||"function"==typeof e?t=e:n="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+n,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){var i="Usage: client.addUserKey(arrayOfAcls[, params, callback])";if(!n(34)(e))throw new Error(i);1!==arguments.length&&"function"!=typeof t||(r=t,t=null);var o={acl:e};return t&&(o.validity=t.validity,o.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,o.maxHitsPerQuery=t.maxHitsPerQuery,o.indexes=t.indexes,o.description=t.description,t.queryParameters&&(o.queryParameters=this._getSearchParams(t.queryParameters,"")),o.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:o,hostType:"write",callback:r})},addUserKeyWithValidity:u(function(e,t,n){return this.addUserKey(e,t,n)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,r,i){var o="Usage: client.updateUserKey(key, arrayOfAcls[, params, callback])";if(!n(34)(t))throw new Error(o);2!==arguments.length&&"function"!=typeof r||(i=r,r=null);var a={acl:t};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.indexes=r.indexes,a.description=r.description,r.queryParameters&&(a.queryParameters=this._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:a,hostType:"write",callback:i})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],n=0;n<e.length;++n)if("[object Array]"===Object.prototype.toString.call(e[n])){for(var r=[],i=0;i<e[n].length;++i)r.push(e[n][i]);t.push("("+r.join(",")+")")}else t.push(e[n]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:u(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:u(function(e,t,n){this._batch.push({indexName:e,query:t,params:n})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:u(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var r=n(34),i=n(55),o="Usage: client.search(arrayOfQueries[, callback])";if(!r(e))throw new Error(o);var a=this,s={requests:i(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}})},u=i(s.requests,function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)}).join("&");return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:s,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:u}},callback:t})},batch:function(e,t){var r="Usage: client.batch(operations[, callback])";if(!n(34)(e))throw new Error(r);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:o,enableRateLimitForward:o,disableRateLimitForward:o,useSecuredAPIKey:o,disableSecuredAPIKey:o,generateSecuredApiKey:o,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},addAlgoliaAgent:function(e){this._ua+=";"+e},_jsonRequest:function(e){function t(n,s){function f(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;o("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=200===t||201===t,r=!n&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(u._useCache&&n&&a&&(a[g]=e.responseText),n)return e.body;if(r)return d+=1,v();var i=new c.AlgoliaSearchError(e.body&&e.body.message);return u._promise.reject(i)}function m(r){return o("error: %s, stack: %s",r.message,r.stack),r instanceof c.AlgoliaSearchError||(r=new c.Unknown(r&&r.message,r)),d+=1,r instanceof c.Unknown||r instanceof c.UnparsableJSON||d>=u.hosts[e.hostType].length&&(h||!p)?u._promise.reject(r):(u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,r instanceof c.RequestTimeout?v():(h||(d=1/0),t(n,s)))}function v(){return u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,s.timeout=u.requestTimeout*(d+1),t(n,s)}var g;if(u._useCache&&(g=e.url),u._useCache&&r&&(g+="_body_"+s.body),u._useCache&&a&&void 0!==a[g])return o("serving response from cache"),u._promise.resolve(JSON.parse(a[g]));if(d>=u.hosts[e.hostType].length)return!p||h?(o("could not get any response"),u._promise.reject(new c.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to supp
260[email protected] to report and resolve the issue. Application id was: "+u.applicationID))):(o("switching to fallback"),d=0,s.method=e.fallback.method,s.url=e.fallback.url,s.jsonBody=e.fallback.body,s.jsonBody&&(s.body=l(s.jsonBody)),i=u._computeRequestHeaders(),s.timeout=u.requestTimeout*(d+1),u.hostIndex[e.hostType]=0,h=!0,t(u._request.fallback,s));var y=u.hosts[e.hostType][u.hostIndex[e.hostType]]+s.url,b={body:s.body,jsonBody:s.jsonBody,method:s.method,headers:i,timeout:s.timeout,debug:o};return o("method: %s, url: %s, headers: %j, timeout: %d",b.method,y,b.headers,b.timeout),n===u._request.fallback&&o("using fallback"),n.call(u,y,b).then(f,m)}var r,i,o=n(42)("algoliasearch:"+e.url),a=e.cache,u=this,d=0,h=!1,p=u._useFallback&&u._request.fallback&&e.fallback;this.apiKey.length>f&&void 0!==e.body&&void 0!==e.body.params?(e.body.apiKey=this.apiKey,i=this._computeRequestHeaders(!1)):i=this._computeRequestHeaders(),void 0!==e.body&&(r=l(e.body)),o("request start");var m=t(u._request,{url:e.url,method:e.method,body:r,jsonBody:e.body,timeout:u.requestTimeout*(d+1)});return e.callback?void m.then(function(t){s(function(){e.callback(null,t)},u._setTimeout||setTimeout)},function(t){s(function(){e.callback(t)},u._setTimeout||setTimeout)}):m},_getSearchParams:function(e,t){if(null==e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_computeRequestHeaders:function(e){var t=n(15),r={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return!1!==e&&(r["x-algolia-api-key"]=this.apiKey),this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,n){var r=this;return 1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:n})},addObjects:function(e,t){var r="Usage: index.addObjects(arrayOfObjects[, callback])";if(!n(34)(e))throw new Error(r);for(var i=this,o={requests:[]},a=0;a<e.length;++a){var s={action:"addObject",body:e[a]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/batch",body:o,hostType:"write",callback:t})},getObject:function(e,t,n){var r=this;1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0);var i="";if(void 0!==t){i="?attributes=";for(var o=0;o<t.length;++o)0!==o&&(i+=","),i+=t[o]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+i,hostType:"read",callback:n})},getObjects:function(e,t,r){var i=n(34),o=n(55),a="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!i(e))throw new Error(a);var s=this;1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var u={requests:o(e,function(e){var n={indexName:s.indexName,objectID:e};return t&&(n.attributesToRetrieve=t.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:u,callback:r})},partialUpdateObject:function(e,t,n){1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0);var r="/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial";return!1===t&&(r+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:r,body:e,hostType:"write",callback:n})},partialUpdateObjects:function(e,t){var r="Usage: index.partialUpdateObjects(arrayOfObjects[, callback])";if(!n(34)(e))throw new Error(r);for(var i=this,o={requests:[]},a=0;a<e.length;++a){var s={action:"partialUpdateObject",objectID:e[a].objectID,body:e[a]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/batch",body:o,hostType:"write",callback:t})},saveObject:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){var r="Usage: index.saveObjects(arrayOfObjects[, callback])";if(!n(34)(e))throw new Error(r);for(var i=this,o={requests:[]},a=0;a<e.length;++a){var s={action:"updateObject",objectID:e[a].objectID,body:e[a]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/batch",body:o,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var n=new c.AlgoliaSearchError("Cannot delete an object without an objectID");return"function"==typeof(t=e)?t(n):this.as._promise.reject(n)}
260var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var r=n(34),i=n(55),o="Usage: index.deleteObjects(arrayOfObjectIDs[, callback])";if(!r(e))throw new Error(o);var a=this,s={requests:i(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/batch",body:s,hostType:"write",callback:t})},deleteByQuery:function(e,t,r){function i(e){if(0===e.nbHits)return e;var t=d(e.hits,function(e){return e.objectID});return f.deleteObjects(t).then(o).then(a)}function o(e){return f.waitTask(e.taskID)}function a(){return f.deleteByQuery(e,t)}function u(){s(function(){r(null)},h._setTimeout||setTimeout)}function l(e){s(function(){r(e)},h._setTimeout||setTimeout)}var c=n(45),d=n(55),f=this,h=f.as;1===arguments.length||"function"==typeof t?(r=t,t={}):t=c(t), 261t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,t.distinct=!1,this.clearCache();var p=this.search(e,t).then(i);return r?void p.then(u,l):p},search:d("query"),similarSearch:d("similarQuery"),browse:function(e,t,r){var i,o,a=n(80),s=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(i=0,r=arguments[0],e=void 0):"number"==typeof arguments[0]?(i=arguments[0],"number"==typeof arguments[1]?o=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],o=void 0),e=void 0,t=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),t=arguments[0],e=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],t=void 0),t=a({},t||{},{page:i,hitsPerPage:o,query:e});var u=this.as._getSearchParams(t,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/browse?"+u,hostType:"read",callback:r})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(e),hostType:"read",callback:t})},browseAll:function(e,t){function r(e){var t;a._stopped||(t=void 0!==e?"cursor="+encodeURIComponent(e):l,s._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(u.indexName)+"/browse?"+t,hostType:"read",callback:i}))}function i(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void r(t.cursor))}"object"==typeof e&&(t=e,e=void 0);var o=n(80),a=new(n(88)),s=this.as,u=this,l=s._getSearchParams(o({},t||{},{query:e}),"");return r(),a},ttAdapter:function(e){var t=this;return function(n,r,i){var o;o="function"==typeof i?i:r,t.search(n,e,function(e,t){return e?void o(e):void o(t.hits)})}},waitTask:function(e,t){function n(){return c._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(l.indexName)+"/task/"+e}).then(function(e){var t=o*++u*u;return t>a&&(t=a),"published"!==e.status?c._promise.delay(t).then(n):e})}function r(e){s(function(){t(null,e)},c._setTimeout||setTimeout)}function i(e){s(function(){t(e)},c._setTimeout||setTimeout)}var o=100,a=5e3,u=0,l=this,c=l.as,d=n();return t?void d.then(r,i):d},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){var i="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!n(34)(e))throw new Error(i);1!==arguments.length&&"function"!=typeof t||(r=t,t=null);var o={acl:e};return t&&(o.validity=t.validity,o.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,o.maxHitsPerQuery=t.maxHitsPerQuery,o.description=t.description,t.queryParameters&&(o.queryParameters=this.as._getSearchParams(t.queryParameters,"")),o.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:o,hostType:"write",callback:r})},addUserKeyWithValidity:u(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,i){var o="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!n(34)(t))throw new Error(o);2!==arguments.length&&"function"!=typeof r||(i=r,r=null);var a={acl:t};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.description=r.description,r.queryParameters&&(a.queryParameters=this.as._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:a,hostType:"write",callback:i})},_search:function(e,t,n){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:n})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},function(e,t,n){"use strict";function r(e,t){var r=n(15),i=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):i.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=e||"Unknown error",t&&r(t,function(e,t){i[t]=e})}function i(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return o(n,r),n}var o=n(7);o(r,Error),e.exports={AlgoliaSearchError:r,UnparsableJSON:i("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:i("RequestTimeout","Request timedout before getting a response"),Network:i("Network","Network issue, see err.more for details"),JSONPScriptFail:i("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:i("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:i("Unknown","Unknown error occured")}},function(e,t,n){var r=n(16),i=n(17),o=n(38)(r,i);e.exports=o},function(e){function t(e,t){for(var n=-1,r=e.length;
261++n<r&&!1!==t(e[n],n,e););return e}e.exports=t},function(e,t,n){var r=n(18),i=n(37)(r);e.exports=i},function(e,t,n){function r(e,t){return i(e,t,o)}var i=n(19),o=n(23);e.exports=r},function(e,t,n){var r=n(20)();e.exports=r},function(e,t,n){function r(e){return function(t,n,r){for(var o=i(t),a=r(t),s=a.length,u=e?s:-1;e?u--:++u<s;){var l=a[u];if(!1===n(o[l],l,o))break}return t}}var i=n(21);e.exports=r},function(e,t,n){function r(e){return i(e)?e:Object(e)}var i=n(22);e.exports=r},function(e){function t(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=t},function(e,t,n){var r=n(24),i=n(28),o=n(22),a=n(32),s=r(Object,"keys"),u=s?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&i(e)?a(e):o(e)?s(e):[]}:a;e.exports=u},function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return i(n)?n:void 0}var i=n(25);e.exports=r},function(e,t,n){function r(e){return null!=e&&(i(e)?c.test(u.call(e)):o(e)&&a.test(e))}var i=n(26),o=n(27),a=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,l=s.hasOwnProperty,c=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return i(e)&&a.call(e)==o}var i=n(22),o="[object Function]",a=Object.prototype.toString;e.exports=r},function(e){function t(e){return!!e&&"object"==typeof e}e.exports=t},function(e,t,n){function r(e){return null!=e&&o(i(e))}var i=n(29),o=n(31);e.exports=r},function(e,t,n){var r=n(30)("length");e.exports=r},function(e){function t(e){return function(t){return null==t?void 0:t[e]}}e.exports=t},function(e){function t(e){return"number"==typeof e&&e>-1&&e%1==0&&n>=e}var n=9007199254740991;e.exports=t},function(e,t,n){function r(e){for(var t=u(e),n=t.length,r=n&&e.length,c=!!r&&s(r)&&(o(e)||i(e)),d=-1,f=[];++d<n;){var h=t[d];(c&&a(h,r)||l.call(e,h))&&f.push(h)}return f}var i=n(33),o=n(34),a=n(35),s=n(31),u=n(36),l=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e)&&s.call(e,"callee")&&!u.call(e,"callee")}var i=n(28),o=n(27),a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;e.exports=r},function(e,t,n){var r=n(24),i=n(31),o=n(27),a="[object Array]",s=Object.prototype.toString,u=r(Array,"isArray")||function(e){return o(e)&&i(e.length)&&s.call(e)==a};e.exports=u},function(e){function t(e,t){return e="number"==typeof e||n.test(e)?+e:-1,t=null==t?r:t,e>-1&&e%1==0&&t>e}var n=/^\d+$/,r=9007199254740991;e.exports=t},function(e,t,n){function r(e){if(null==e)return[];u(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(o(e)||i(e))&&t||0;for(var n=e.constructor,r=-1,c="function"==typeof n&&n.prototype===e,d=Array(t),f=t>0;++r<t;)d[r]=r+"";for(var h in e)f&&a(h,t)||"constructor"==h&&(c||!l.call(e,h))||d.push(h);return d}var i=n(33),o=n(34),a=n(35),s=n(31),u=n(22),l=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){return function(n,r){var s=n?i(n):0;if(!o(s))return e(n,r);for(var u=t?s:-1,l=a(n);(t?u--:++u<s)&&!1!==r(l[u],u,l););return n}}var i=n(29),o=n(31),a=n(21);e.exports=r},function(e,t,n){function r(e,t){return function(n,r,a){return"function"==typeof r&&void 0===a&&o(n)?e(n,r):t(n,i(r,a,3))}}var i=n(39),o=n(34);e.exports=r},function(e,t,n){function r(e,t,n){if("function"!=typeof e)return i;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}var i=n(40);e.exports=r},function(e){function t(e){return e}e.exports=t},function(e,t,n){function r(e,t){return function(n,r,o){if("function"==typeof n&&"object"==typeof r||"object"==typeof o)throw new i.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof n?(o=n,n=""):1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0),"object"==typeof n&&null!==n?(r=n,n=void 0):null!=n||(n="");var a="";return void 0!==n&&(a+=e+"="+encodeURIComponent(n)),void 0!==r&&(a=this.as._getSearchParams(r,a)),this._search(a,t,o)}}e.exports=r;var i=n(14)},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&("%c"===e&&(o=++i))}),e.splice(o,0,r),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function s(){var e;try{e=t.storage.debug}catch(n){}return e}function u(){try{return window.localStorage}catch(e){}}
261(t=e.exports=n(43)).log=o,t.formatArgs=i,t.save=a,t.load=s,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(s())},function(e,t,n){function r(){return t.colors[c++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(l||n);e.diff=o,e.prev=l,e.curr=n,l=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var a=Array.prototype.slice.call(arguments);a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;s++;var i=t.formatters[r];if("function"==typeof i){var o=a[s];n=i.call(e,o),a.splice(s,1),s--}return n}),"function"==typeof t.formatArgs&&(a=t.formatArgs.apply(e,a)),(i.log||t.log||console.log.bind(console)).apply(e,a)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;r>i;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function s(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}(t=e.exports=i).coerce=u,t.disable=a,t.enable=o,t.enabled=s,t.humanize=n(44),t.names=[],t.skips=[],t.formatters={};var l,c=0},function(e){function t(e){if(!((e=""+e).length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*s;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function n(e){return e>=u?Math.round(e/u)+"d":e>=s?Math.round(e/s)+"h":e>=a?Math.round(e/a)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function r(e){return i(e,u,"day")||i(e,s,"hour")||i(e,a,"minute")||i(e,o,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var o=1e3,a=60*o,s=60*a,u=24*s,l=365.25*u;e.exports=function(e,i){return i=i||{},"string"==typeof e?t(e):i.long?r(e):n(e)}},function(e,t,n){function r(e,t,n,r){return t&&"boolean"!=typeof t&&a(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?i(e,t,o(n,r,3)):i(e,t)}var i=n(46),o=n(39),a=n(54);e.exports=r},function(e,t,n){function r(e,t,n,p,m,v,g){var b;if(n&&(b=m?n(e,p,m):n(e)),void 0!==b)return b;if(!f(e))return e;var _=d(e);if(_){if(b=u(e),!t)return i(e,b)}else{var w=O.call(e),C=w==y;if(w!=x&&w!=h&&(!C||m))return I[w]?l(e,w,t):m?e:{};if(b=c(C?{}:e),!t)return a(b,e)}v||(v=[]),g||(g=[]);for(var k=v.length;k--;)if(v[k]==e)return g[k];return v.push(e),g.push(b),(_?o:s)(e,function(i,o){b[o]=r(i,t,n,o,e,v,g)}),b}var i=n(47),o=n(16),a=n(48),s=n(18),u=n(50),l=n(51),c=n(53),d=n(34),f=n(22),h="[object Arguments]",p="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",y="[object Function]",b="[object Map]",_="[object Number]",x="[object Object]",w="[object RegExp]",C="[object Set]",k="[object String]",S="[object WeakMap]",j="[object ArrayBuffer]",E="[object Float32Array]",T="[object Float64Array]",P="[object Int8Array]",$="[object Int16Array]",N="[object Int32Array]",R="[object Uint8Array]",M="[object Uint8ClampedArray]",D="[object Uint16Array]",A="[object Uint32Array]",I={};I[h]=I[p]=I[j]=I[m]=I[v]=I[E]=I[T]=I[P]=I[$]=I[N]=I[_]=I[x]=I[w]=I[k]=I[R]=I[M]=I[D]=I[A]=!0,I[g]=I[y]=I[b]=I[C]=I[S]=!1;var O=Object.prototype.toString;e.exports=r},function(e){function t(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=t},function(e,t,n){function r(e,t){return null==t?e:i(t,o(t),e)}var i=n(49),o=n(23);e.exports=r},function(e){function t(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}
261e.exports=t},function(e){function t(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var n=Object.prototype.hasOwnProperty;e.exports=t},function(e,t,n){function r(e,t,n){var r=e.constructor;switch(t){case c:return i(e);case o:case a:return new r(+e);case d:case f:case h:case p:case m:case v:case g:case y:case b:var x=e.buffer;return new r(n?i(x):x,e.byteOffset,e.length);case s:case l:return new r(e);case u:var w=new r(e.source,_.exec(e));w.lastIndex=e.lastIndex}return w}var i=n(52),o="[object Boolean]",a="[object Date]",s="[object Number]",u="[object RegExp]",l="[object String]",c="[object ArrayBuffer]",d="[object Float32Array]",f="[object Float64Array]",h="[object Int8Array]",p="[object Int16Array]",m="[object Int32Array]",v="[object Uint8Array]",g="[object Uint8ClampedArray]",y="[object Uint16Array]",b="[object Uint32Array]",_=/\w*$/;e.exports=r},function(e,t){(function(t){function n(e){var t=new r(e.byteLength);return new i(t).set(new i(e)),t}var r=t.ArrayBuffer,i=t.Uint8Array;e.exports=n}).call(t,function(){return this}())},function(e){function t(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}e.exports=t},function(e,t,n){function r(e,t,n){if(!a(n))return!1;var r=typeof t;if("number"==r?i(n)&&o(t,n.length):"string"==r&&t in n){var s=n[t];return e==e?e===s:s!=s}return!1}var i=n(28),o=n(35),a=n(22);e.exports=r},function(e,t,n){function r(e,t,n){return(s(e)?i:a)(e,t=o(t,n,3))}var i=n(56),o=n(57),a=n(79),s=n(34);e.exports=r},function(e){function t(e,t){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e.exports=t},function(e,t,n){function r(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:a(e,t,n):null==e?s:"object"==r?i(e):void 0===t?u(e):o(e,t)}var i=n(58),o=n(70),a=n(39),s=n(40),u=n(77);e.exports=r},function(e,t,n){function r(e){var t=o(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(void 0!==r||n in a(e)))}}return function(e){return i(e,t)}}var i=n(59),o=n(67),a=n(21);e.exports=r},function(e,t,n){function r(e,t,n){var r=t.length,a=r,s=!n;if(null==e)return!a;for(e=o(e);r--;){var u=t[r];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++r<a;){var l=(u=t[r])[0],c=e[l],d=u[1];if(s&&u[2]){if(void 0===c&&!(l in e))return!1}else{var f=n?n(c,d,l):void 0;if(!(void 0===f?i(d,c,n,!0):f))return!1}}return!0}var i=n(60),o=n(21);e.exports=r},function(e,t,n){function r(e,t,n,s,u,l){return e===t||(null==e||null==t||!o(e)&&!a(t)?e!=e&&t!=t:i(e,t,r,n,s,u,l))}var i=n(61),o=n(22),a=n(27);e.exports=r},function(e,t,n){function r(e,t,n,r,f,m,v){var g=s(e),y=s(t),b=c,_=c;g||((b=p.call(e))==l?b=d:b!=d&&(g=u(e))),y||((_=p.call(t))==l?_=d:_!=d&&(y=u(t)));var x=b==d,w=_==d,C=b==_;if(C&&!g&&!x)return o(e,t,b);if(!f){var k=x&&h.call(e,"__wrapped__"),S=w&&h.call(t,"__wrapped__");
261if(k||S)return n(k?e.value():e,S?t.value():t,r,f,m,v)}if(!C)return!1;m||(m=[]),v||(v=[]);for(var j=m.length;j--;)if(m[j]==e)return v[j]==t;m.push(e),v.push(t);var E=(g?i:a)(e,t,n,r,f,m,v);return m.pop(),v.pop(),E}var i=n(62),o=n(64),a=n(65),s=n(34),u=n(66),l="[object Arguments]",c="[object Array]",d="[object Object]",f=Object.prototype,h=f.hasOwnProperty,p=f.toString;e.exports=r},function(e,t,n){function r(e,t,n,r,o,a,s){var u=-1,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;for(;++u<l;){var d=e[u],f=t[u],h=r?r(o?f:d,o?d:f,u):void 0;if(void 0!==h){if(h)continue;return!1}if(o){if(!i(t,function(e){return d===e||n(d,e,r,o,a,s)}))return!1}else if(d!==f&&!n(d,f,r,o,a,s))return!1}return!0}var i=n(63);e.exports=r},function(e){function t(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=t},function(e){function t(e,t,u){switch(u){case n:case r:return+e==+t;case i:return e.name==t.name&&e.message==t.message;case o:return e!=+e?t!=+t:e==+t;case a:case s:return e==t+""}return!1}var n="[object Boolean]",r="[object Date]",i="[object Error]",o="[object Number]",a="[object RegExp]",s="[object String]";e.exports=t},function(e,t,n){function r(e,t,n,r,a,s,u){var l=i(e),c=l.length;if(c!=i(t).length&&!a)return!1;for(var d=c;d--;){var f=l[d];if(!(a?f in t:o.call(t,f)))return!1}for(var h=a;++d<c;){var p=e[f=l[d]],m=t[f],v=r?r(a?m:p,a?p:m,f):void 0;if(!(void 0===v?n(p,m,r,a,s,u):v))return!1;h||(h="constructor"==f)}if(!h){var g=e.constructor,y=t.constructor;if(g!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y))return!1}return!0}var i=n(23),o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e.length)&&!!T[P.call(e)]}var i=n(31),o=n(27),a="[object Arguments]",s="[object Array]",u="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",f="[object Map]",h="[object Number]",p="[object Object]",m="[object RegExp]",v="[object Set]",g="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",_="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",C="[object Int32Array]",k="[object Uint8Array]",S="[object Uint8ClampedArray]",j="[object Uint16Array]",E="[object Uint32Array]",T={};T["[object Float32Array]"]=T[_]=T[x]=T[w]=T[C]=T[k]=T[S]=T[j]=T[E]=!0,T[a]=T[s]=T[b]=T[u]=T[l]=T[c]=T[d]=T[f]=T[h]=T[p]=T[m]=T[v]=T[g]=T[y]=!1;var P=Object.prototype.toString;e.exports=r},function(e,t,n){function r(e){for(var t=o(e),n=t.length;n--;)t[n][2]=i(t[n][1]);return t}var i=n(68),o=n(69);e.exports=r},function(e,t,n){function r(e){return e==e&&!i(e)}var i=n(22);e.exports=r},function(e,t,n){function r(e){e=o(e);for(var t=-1,n=i(e),r=n.length,a=Array(r);++t<r;){var s=n[t];a[t]=[s,e[s]]}return a}var i=n(23),o=n(21);e.exports=r},function(e,t,n){function r(e,t){var n=s(e),r=u(e)&&l(t),h=e+"";return e=f(e),function(s){if(null==s)return!1;var u=h;if(s=d(s),(n||!r)&&!(u in s)){if(null==(s=1==e.length?s:i(s,a(e,0,-1))))return!1;u=c(e),s=d(s)}return s[u]===t?void 0!==t||u in s:o(t,s[u],void 0,!0)}}var i=n(71),o=n(60),a=n(72),s=n(34),u=n(73),l=n(68),c=n(74),d=n(21),f=n(75);e.exports=r},function(e,t,n){function r(e,t,n){if(null!=e){void 0!==n&&n in i(e)&&(t=[n]);for(var r=0,o=t.length;null!=e&&o>r;)e=e[t[r++]];return r&&r==o?e:void 0}}var i=n(21);e.exports=r},function(e){function t(e,t,n){var r=-1,i=e.length;0>(t=null==t?0:+t||0)&&(t=-t>i?0:i+t),0>(n=void 0===n||n>i?i:+n||0)&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}e.exports=t},function(e,t,n){function r(e,t){var n=typeof e;return!!("string"==n&&s.test(e)||"number"==n)||!i(e)&&(!a.test(e)||null!=t&&e in o(t))}var i=n(34),o=n(21),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=r},function(e){function t(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=t},function(e,t,n){function r(e){if(o(e))return e;var t=[];return i(e).replace(a,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t}var i=n(76),o=n(34),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;e.exports=r},function(e){function t(e){return null==e?"":e+""}e.exports=t},function(e,t,n){function r(e){return a(e)?i(e):o(e)}var i=n(30),o=n(78),a=n(73);e.exports=r},function(e,t,n){function r(e){var t=e+"";return e=o(e),function(n){return i(n,e,t)}}var i=n(71),o=n(75);e.exports=r},function(e,t,n){function r(e,t){var n=-1,r=o(e)?Array(e.length):[];return i(e,function(e,i,o){r[++n]=t(e,i,o)}),r}var i=n(17),o=n(28);e.exports=r},function(e,t,n){var r=n(81),i=n(86)(r);e.exports=i},function(e,t,n){function r(e,t,n,f,h){if(!u(e))return e;var p=s(t)&&(a(t)||c(t)),m=p?void 0:d(t);return i(m||t,function(i,a){if(m&&(i=t[a=i]),l(i))f||(f=[]),h||(h=[]),o(e,t,a,r,n,f,h);else{var s=e[a],u=n?n(s,i,a,e,t):void 0,c=void 0===u;c&&(u=i),void 0===u&&(!p||a in e)||!c&&(u==u?u===s:s!=s)||(e[a]=u)}}),e}var i=n(16),o=n(82),a=n(34),s=n(28),u=n(22),l=n(27),c=n(66),d=n(23);e.exports=r},function(e,t,n){function r(e,t,n,r,d,f,h){for(var p=f.length,m=t[n];p--;)if(f[p]==m)return void(e[n]=h[p]);var v=e[n],g=d?d(v,m,n,e,t):void 0,y=void 0===g;
261y&&(g=m,s(m)&&(a(m)||l(m))?g=a(v)?v:s(v)?i(v):[]:u(m)||o(m)?g=o(v)?c(v):u(v)?v:{}:y=!1),f.push(m),h.push(g),y?e[n]=r(g,m,d,f,h):(g==g?g!==v:v==v)&&(e[n]=g)}var i=n(47),o=n(33),a=n(34),s=n(28),u=n(83),l=n(66),c=n(85);e.exports=r},function(e,t,n){function r(e){var t,n;return!(!a(e)||c.call(e)!=s||o(e)||!(l.call(e,"constructor")||(t=e.constructor,"function"!=typeof t||t instanceof t)))&&(i(e,function(e,t){n=t}),void 0===n||l.call(e,n))}var i=n(84),o=n(33),a=n(27),s="[object Object]",u=Object.prototype,l=u.hasOwnProperty,c=u.toString;e.exports=r},function(e,t,n){function r(e,t){return i(e,t,o)}var i=n(19),o=n(36);e.exports=r},function(e,t,n){function r(e){return i(e,o(e))}var i=n(49),o=n(36);e.exports=r},function(e,t,n){function r(e){return a(function(t,n){var r=-1,a=null==t?0:n.length,s=a>2?n[a-2]:void 0,u=a>2?n[2]:void 0,l=a>1?n[a-1]:void 0;for("function"==typeof s?(s=i(s,l,5),a-=2):a-=(s="function"==typeof l?l:void 0)?1:0,u&&o(n[0],n[1],u)&&(s=3>a?void 0:s,a=1);++r<a;){var c=n[r];c&&e(t,c,s)}return t})}var i=n(39),o=n(54),a=n(87);e.exports=r},function(e){function t(e,t){if("function"!=typeof e)throw new TypeError(n);return t=r(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,i=-1,o=r(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var s=Array(t+1);for(i=-1;++i<t;)s[i]=n[i];return s[t]=a,e.apply(this,s)}}var n="Expected a function",r=Math.max;e.exports=t},function(e,t,n){"use strict";function r(){}e.exports=r,n(7)(r,n(89).EventEmitter),r.prototype.stop=function(){this._stopped=!0,this._clean()},r.prototype._end=function(){this.emit("end"),this._clean()},r.prototype._error=function(e){this.emit("error",e),this._clean()},r.prototype._result=function(e){this.emit("result",e)},r.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function r(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,r,a,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(o(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),a=(l=r.slice()).length,u=0;a>u;u++)l[u].apply(this,s);return!0},t.prototype.addListener=function(e,r){var a;if(!n(r))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(r.listener)?r.listener:r),this._events[e]?i(this._events[e])?this._events[e].push(r):this._events[e]=[this._events[e],r]:this._events[e]=r,i(this._events[e])&&!this._events[e].warned&&((a=o(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},t.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit
261("removeListener",e,t);else if(i(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";function r(e,t){return(e+=/\?/.test(e)?"&":"?")+i.encode(t)}e.exports=r;var i=n(91)},function(e,t,n){"use strict";t.decode=t.parse=n(92),t.encode=t.stringify=n(93)},function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,i){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(n);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;u>l;++l){var c,d,f,h,p=e[l].replace(a,"%20"),m=p.indexOf(r);m>=0?(c=p.substr(0,m),d=p.substr(m+1)):(c=p,d=""),f=decodeURIComponent(c),h=decodeURIComponent(d),t(o,f)?Array.isArray(o[f])?o[f].push(h):o[f]=[o[f],h]:o[f]=h}return o}},function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,i){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(t(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(t(e))}).join(n):o+encodeURIComponent(t(e[i]))}).join(n):i?encodeURIComponent(t(i))+r+encodeURIComponent(t(e)):""}},function(e,t,n){"use strict";function r(e,t,n){function r(){t.debug("JSONP: success"),m||d||(m=!0,c||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),s(),n(new i.JSONPScriptFail)))}function a(){"loaded"!==this.readyState&&"complete"!==this.readyState||r()}function s(){clearTimeout(v),h.onload=null,h.onreadystatechange=null,h.onerror=null,f.removeChild(h);try{delete window[p],delete window[p+"_loaded"]}catch(e){window[p]=null,window[p+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),d=!0,s(),n(new i.RequestTimeout)}function l(){t.debug("JSONP: Script error"),m||d||(s(),n(new i.JSONPScriptError))}if("GET"===t.method){t.debug("JSONP: start");var c=!1,d=!1;o+=1;var f=document.getElementsByTagName("head")[0],h=document.createElement("script"),p="algoliaJSONP_"+o,m=!1;window[p]=function(e){try{delete window[p]}catch(t){window[p]=void 0}d||(c=!0,s(),n(null,{body:e}))},e+="&callback="+p,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var v=setTimeout(u,t.timeout);h.onreadystatechange=a,h.onload=r,h.onerror=l,h.async=!0,h.defer=!0,h.src=e,f.appendChild(h)}else n(new Error("Method "+t.method+" "+e+" is not supported by JSONP."))}e.exports=r;var i=n(14),o=0},function(e,t,n){function r(e){return function(t,r,o){var a=n(96);(o=o&&a(o)||{}).hosts=o.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"];var s=e(t,r,o).initIndex("places");return s.search=i("query","/1/places/query"),s}}e.exports=r;var i=n(41)},function(e,t,n){function r(e,t,n){return"function"==typeof t?i(e,!0,o(t,n,3)):i(e,!0)}var i=n(46),o=n(39);e.exports=r},function(e){"use strict";function t(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}e.exports=t},function(e){"use strict";e.exports="3.13.0"},function(e,t,n){"use strict";function r(e,t,n){return new i(e,t,n)}var i=n(100),o=n(101),a=n(173);r.version=n(216),r.AlgoliaSearchHelper=i,r.SearchParameters=o,r.SearchResults=a,r.url=n(206),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.client=e;var r=n||{};r.index=t,this.state=a.make(r),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1}function i(e){if(0>e)throw new Error("Page requested below 0.");return this.state=this.state.setPage(e), 262this._change(),this}function o(){return this.state.page}var a=n(101),s=n(173),u=n(202),l=n(203),c=n(89),d=n(15),f=n(55),h=n(143),p=n(127),m=n(195),v=n(206);l.inherits(r,c.EventEmitter),r.prototype.search=function(){return this._search(),this},r.prototype.searchOnce=function(e,t){var n=this.state.setQueryParameters(e),r=u._getQueries(n.index,n);return t?this.client.search(r,function(e,r){t(e,new s(n,r),n)}):this.client.search(r).then(function(e){return{content:new s(n,e),state:n}})},r.prototype.setQuery=function(e){return this.state=this.state.setQuery(e),this._change(),this},r.prototype.clearRefinements=function(e){return this.state=this.state.clearRefinements(e),this._change(),this},r.prototype.clearTags=function(){return this.state=this.state.clearTags(),this._change(),this},r.prototype.addDisjunctiveFacetRefinement=function(e,t){return this.state=this.state.addDisjunctiveFacetRefinement(e,t),this._change(),this},r.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},r.prototype.addNumericRefinement=function(e,t,n){return this.state=this.state.addNumericRefinement(e,t,n),this._change(),this},r.prototype.addFacetRefinement=function(e,t){return this.state=this.state.addFacetRefinement(e,t),this._change(),this},r.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},r.prototype.addFacetExclusion=function(e,t){return this.state=this.state.addExcludeRefinement(e,t),this._change(),this},r.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},r.prototype.addTag=function(e){return this.state=this.state.addTagRefinement(e),this._change(),this},r.prototype.removeNumericRefinement=function(e,t,n){return this.state=this.state.removeNumericRefinement(e,t,n),this._change(),this},r.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this.state=this.state.removeDisjunctiveFacetRefinement(e,t),this._change(),this},r.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},r.prototype.removeFacetRefinement=function(e,t){return this.state=this.state.removeFacetRefinement(e,t),this._change(),this},r.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},r.prototype.removeFacetExclusion=function(e,t){return this.state=this.state.removeExcludeRefinement(e,t),this._change(),this},r.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},r.prototype.removeTag=function(e){return this.state=this.state.removeTagRefinement(e),this._change(),this},r.prototype.toggleFacetExclusion=function(e,t){return this.state=this.state.toggleExcludeFacetRefinement(e,t),this._change(),this},r.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},r.prototype.toggleRefinement=function(e,t){return this.state=this.state.toggleRefinement(e,t),this._change(),this},r.prototype.toggleRefine=function(){return this.toggleRefinement.apply(this,arguments)},r.prototype.toggleTag=function(e){return this.state=this.state.toggleTagRefinement(e),this._change(),this},r.prototype.nextPage=function(){return this.setPage(this.state.page+1)},r.prototype.previousPage=function(){return this.setPage(this.state.page-1)},r.prototype.setCurrentPage=i,r.prototype.setPage=i,r.prototype.setIndex=function(e){return this.state=this.state.setIndex(e),this._change(),this},r.prototype.setQueryParameter=function(e,t){var n=this.state.setQueryParameter(e,t);return this.state===n?this:(this.state=n,this._change(),this)},r.prototype.setState=function(e){return this.state=new a(e),this._change(),this},r.prototype.getState=function(e){return void 0===e?this.state:this.state.filter(e)},r.prototype.getStateAsQueryString=function(e){var t=e&&e.filters||["query","attribute:*"],n=this.getState(t);return v.getQueryStringFromState(n,e)},r.getConfigurationFromQueryString=v.getStateFromQueryString,r.getForeignConfigurationInQueryString=v.getUnrecognizedParametersInQueryString,r.prototype.setStateFromQueryString=function(e,t){var n=t&&t.triggerChange||!1,r=v.getStateFromQueryString(e,t),i=this.state.setQueryParameters(r);n?this.setState(i):this.overrideStateWithoutTriggeringChangeEvent(i)},r.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new a(e),this},r.prototype.isRefined=function(e,t){if(this.state.isConjunctiveFacet(e))return this.state.isFacetRefined(e,t);if(this.state.isDisjunctiveFacet(e))return this.state.isDisjunctiveFacetRefined(e,t);throw new Error(e+" is not properly defined in this helper configuration(use the facets or disjunctiveFacets keys to configure it)")}
262,r.prototype.hasRefinements=function(e){return!p(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},r.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},r.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},r.prototype.hasTag=function(e){return this.state.isTagRefined(e)},r.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},r.prototype.getIndex=function(){return this.state.index},r.prototype.getCurrentPage=o,r.prototype.getPage=o,r.prototype.getTags=function(){return this.state.tagRefinements},r.prototype.getQueryParameter=function(e){return this.state.getQueryParameter(e)},r.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var n=this.state.getConjunctiveRefinements(e);d(n,function(e){t.push({value:e,type:"conjunctive"})});var r=this.state.getExcludeRefinements(e);d(r,function(e){t.push({value:e,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);d(i,function(e){t.push({value:e,type:"disjunctive"})})}var o=this.state.getNumericRefinements(e);return d(o,function(e,n){t.push({value:e,operator:n,type:"numeric"})}),t},r.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},r.prototype.getHierarchicalFacetBreadcrumb=function(e){return f(this.state.getHierarchicalRefinement(e)[0].split(this.state._getHierarchicalFacetSeparator(this.state.getHierarchicalFacetByName(e))),function(e){return m(e)})},r.prototype._search=function(){var e=this.state,t=u._getQueries(e.index,e);this.emit("search",e,this.lastResults),this.client.search(t,h(this._handleResponse,this,e,this._queryId++))},r.prototype._handleResponse=function(e,t,n,r){if(!(t<this._lastQueryIdReceived)){if(this._lastQueryIdReceived=t,n)return void this.emit("error",n);var i=this.lastResults=new s(e,r);this.emit("result",i,e)}},r.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},r.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},r.prototype._change=function(){this.emit("change",this.state,this.lastResults)},e.exports=r},function(e,t,n){"use strict";function r(e,t){return _(e,function(e){return v(e,t)})}function i(e){var t=e?i._parseNumbers(e):{};this.index=t.index||"",this.query=t.query||"",this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{},this.numericFilters=t.numericFilters,this.tagFilters=t.tagFilters,this.optionalTagFilters=t.optionalTagFilters,this.optionalFacetFilters=t.optionalFacetFilters,this.hitsPerPage=t.hitsPerPage,this.maxValuesPerFacet=t.maxValuesPerFacet,this.page=t.page||0,this.queryType=t.queryType,this.typoTolerance=t.typoTolerance,this.minWordSizefor1Typo=t.minWordSizefor1Typo,this.minWordSizefor2Typos=t.minWordSizefor2Typos,this.minProximity=t.minProximity,this.allowTyposOnNumericTokens=t.allowTyposOnNumericTokens,this.ignorePlurals=t.ignorePlurals,this.restrictSearchableAttributes=t.restrictSearchableAttributes,this.advancedSyntax=t.advancedSyntax,this.analytics=t.analytics,this.analyticsTags=t.analyticsTags,this.synonyms=t.synonyms,this.replaceSynonymsInHighlight=t.replaceSynonymsInHighlight,this.optionalWords=t.optionalWords,this.removeWordsIfNoResults=t.removeWordsIfNoResults,this.attributesToRetrieve=t.attributesToRetrieve,this.attributesToHighlight=t.attributesToHighlight,this.highlightPreTag=t.highlightPreTag,this.highlightPostTag=t.highlightPostTag,this.attributesToSnippet=t.attributesToSnippet,this.getRankingInfo=t.getRankingInfo,this.distinct=t.distinct,this.aroundLatLng=t.aroundLatLng,this.aroundLatLngViaIP=t.aroundLatLngViaIP,this.aroundRadius=t.aroundRadius,this.minimumAroun
262dRadius=t.minimumAroundRadius,this.aroundPrecision=t.aroundPrecision,this.insideBoundingBox=t.insideBoundingBox,this.insidePolygon=t.insidePolygon,this.snippetEllipsisText=t.snippetEllipsisText,this.disableExactOnAttributes=t.disableExactOnAttributes,this.enableExactOnSingleWordQuery=t.enableExactOnSingleWordQuery,this.offset=t.offset,this.length=t.length,s(t,function(e,t){-1===i.PARAMETERS.indexOf(t)&&(this[t]=e,S("Unknown SearchParameter: `"+t+"` (this might raise an error in the Algolia API)"))},this)}var o=n(23),a=n(102),s=n(109),u=n(15),l=n(111),c=n(55),d=n(114),f=n(118),h=n(124),p=n(34),m=n(127),v=n(129),g=n(130),y=n(128),b=n(26),_=n(131),x=n(135),w=n(136),C=n(80),k=n(141),S=n(142),j=n(169),E=n(171),T=n(172);i.PARAMETERS=o(new i),i._parseNumbers=function(e){var t={};if(u(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"],function(n){var r=e[n];y(r)&&(t[n]=parseFloat(e[n]))}),e.numericRefinements){var n={};u(e.numericRefinements,function(e,t){n[t]={},u(e,function(e,r){var i=c(e,function(e){return p(e)?c(e,function(e){return y(e)?parseFloat(e):e}):y(e)?parseFloat(e):e});n[t][r]=i})}),t.numericRefinements=n}return C({},e,t)},i.make=function(e){var t=new i(e);return u(e.hierarchicalFacets,function(e){if(e.rootPath){var n=t.getHierarchicalRefinement(e.name);n.length>0&&0!==n[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(n=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),k(t)},i.validate=function(e,t){var n=t||{},r=o(n),a=l(r,function(e){return-1===i.PARAMETERS.indexOf(e)});return 1===a.length?S("Unknown parameter "+a[0]+" (this might rise an error in the Algolia API)"):a.length>1&&S("Unknown parameters "+a.join(", ")+" (this might raise an error in the Algolia API)"),e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&!m(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):!m(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},i.prototype={constructor:i,clearRefinements:function(e){var t=T.clearRefinement;return this.setQueryParameters({page:0,numericRefinements:this._clearNumericRefinements(e),facetsRefinements:t(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:t(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:t(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:t(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")})},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({page:0,tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e,page:0})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e,page:0})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e,page:0})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e,page:0})},addNumericRefinement:function(e,t,n){var r=j(n);if(this.isNumericRefined(e,t,r))return this;var i=C({},this.numericRefinements);return i[e]=C({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(r)):i[e][t]=[r],this.setQueryParameters({page:0,numericRefinements:i})},getConjunctiveRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,n){if(void 0!==n){var r=j(n);return this.isNumericRefined(e,t,r)?this.setQueryParameters({page:0,numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&v(n.val,r)})}):this}return void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({page:0,numericRefinements:this._clearNumericRefinements(function(n,r){return r===e&&n.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({page:0,numericRefinements:this._clearNumericRefinements(function(t,n){return n===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){return g(e)?{}:y(e)?f(this.numericRefinements,e):b(e)?d(this.numericRefinements,function(t,n,r){var i={};return u(n,function(t,n){var o=[];u(t,function(t){e({val:t,op:n},r,"numeric")||o.push(t)}),m(o)||(i[n]=o)}),m(i)||(t[r]=i),t},{}):void 0},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({page:0,facetsRefinements:T.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({page:0,facetsExcludes:T.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return T.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({page:0,disjunctiveFacetsRefinements:T.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={page:0,tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({page:0,facetsRefinements:T.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({page:0,facetsExcludes:T.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return T.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({page:0,disjunctiveFacetsRefinements:T.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={page:0,tagRefinements:l(this.tagRefinements,function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({page:0,facetsRefinements:T.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({page:0,facetsExcludes:T.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({page:0,disjunctiveFacetsRefinements:T.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({page:0,hierarchicalFacetsRefinements:w({},r,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return h(this.disjunctiveFacets,e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return h(this.facets,e)>-1},isFacetRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return T.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return T.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this.getHierarchicalRefinement(e);return t?-1!==h(n,t):n.length>0},isNumericRefined:function(e,t,n){if(g(n)&&g(t))return!!this.numericRefinements[e];var i=this.numericRefinements[e]&&!g(this.numericRefinements[e][t]);if(g(n)||!i)return i;var o=j(n),a=!g(r(this.numericRefinements[e][t],o));return i&&a},isTagRefined:function(e){return-1!==h(this.tagRefinements,e)},getRefinedDisjunctiveFacets:function(){var e=a(o(this.numericRefinements),this.disjunctiveFacets);return o(this.disjunctiveFacetsRefinements).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){return a(x(this.hierarchicalFacets,"name"),o(this.hierarchicalFacetsRefinements))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return l(this.disjunctiveFacets,function(t){return-1===h(e,t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={};return s(this,function(n,r){-1===h(e,r)&&void 0!==n&&(t[r]=n)}),t},getQueryParameter:function(e){if(!this.hasOwnProperty(e))throw new Error("Parameter '"+e+"' is not an attribute of SearchParameters (http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)");return this[e]},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){var t=i.validate(this,e);if(t)throw t;var n=i._parseNumbers(e);return this.mutateMe(function(t){var r=o(e);return u(r,function(e){t[e]=n[e]}),t})},filter:function(e){return E(this,e)},mutateMe:function(e){var t=new this.constructor(this);return e(t,this),k(t)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return _(this.hierarchicalFacets,{name:e})}},e.exports=i},function(e,t,n){var r=n(103),i=n(105),o=n(106),a=n(28),s=n(87)(function(e){for(var t=e.length,n=t,s=Array(p),u=r,l=!0,c=[];n--;){var d=e[n]=a(d=e[n])?d:[];s[n]=l&&d.length>=120?o(n&&d):null}var f=e[0],h=-1,p=f?f.length:0,m=s[0];e:for(;++h<p;)if(d=f[h],(m?i(m,d):u(c,d,0))<0){for(n=t;--n;){var v=s[n];if((v?i(v,d):u(e[n],d,0))<0)continue e}m&&m.push(d),c.push(d)}return c});e.exports=s},function(e,t,n){function r(e,t,n){if(t!=t)return i(e,n);for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}var i=n(104);e.exports=r},function(e){function t(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!=o)return i}return-1}e.exports=t},function(e,t,n){function r(e,t){var n=e.data;return("string"==typeof t||i(t)?n.set.has(t):n.hash[t])?0:-1}var i=n(22);e.exports=r},function(e,t,n){(function(t){function r(e){return s&&a?new i(e):null}var i=n(107),o=n(24),a=o(t,"Set"),s=o(Object,"create");e.exports=r}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e){var t=e?e.length:0;for(this.data={hash:s(null),set:new a};t--;)this.push(e[t])}var i=n(108),o=n(24),a=o(t,"Set"),s=o(Object,"create");r.prototype.push=i,e.exports=r}).call(t,function(){return this}())},function(e,t,n){function r(e){var t=this.data;"string"==typeof e||i(e)?t.set.add(e):t.hash[e]=!0}var i=n(22);e.exports=r},function(e,t,n){var r=n(18),i=n(110)(r);e.exports=i},function(e,t,n){function r(e){return function(t,n,r){return"function"==typeof n&&void 0===r||(n=i(n,r,3)),e(t,n)}}var i=n(39);e.exports=r},function(e,t,n){function r(e,t,n){return(s(e)?i:a)(e,t=o(t,n,3))}var i=n(112),o=n(57),a=n(113),s=n(34);e.exports=r},function(e){function t(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[++i]=a)}return o}e.exports=t},function(e,t,n){function r(e,t){var n=[];return i(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var i=n(17);e.exports=r},function(e,t,n){var r=n(115),i=n(17),o=n(116)(r,i);e.exports=o},function(e){function t(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}
262e.exports=t},function(e,t,n){function r(e,t){return function(n,r,s,u){var l=arguments.length<3;return"function"==typeof r&&void 0===u&&a(n)?e(n,r,s,l):o(n,i(r,u,4),s,l,t)}}var i=n(57),o=n(117),a=n(34);e.exports=r},function(e){function t(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}e.exports=t},function(e,t,n){var r=n(56),i=n(119),o=n(120),a=n(39),s=n(36),u=n(122),l=n(123),c=n(87)(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){t=r(o(t),String);return u(e,i(s(e),t))}var n=a(t[0],t[1],3);return l(e,function(e,t,r){return!n(e,t,r)})});e.exports=c},function(e,t,n){function r(e,t){var n=e?e.length:0,r=[];if(!n)return r;var u=-1,l=i,c=!0,d=c&&t.length>=s?a(t):null,f=t.length;d&&(l=o,c=!1,t=d);e:for(;++u<n;){var h=e[u];if(c&&h==h){for(var p=f;p--;)if(t[p]===h)continue e;r.push(h)}else l(t,h,0)<0&&r.push(h)}return r}var i=n(103),o=n(105),a=n(106),s=200;e.exports=r},function(e,t,n){function r(e,t,n,l){l||(l=[]);for(var c=-1,d=e.length;++c<d;){var f=e[c];u(f)&&s(f)&&(n||a(f)||o(f))?t?r(f,t,n,l):i(l,f):n||(l[l.length]=f)}return l}var i=n(121),o=n(33),a=n(34),s=n(28),u=n(27);e.exports=r},function(e){function t(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e.exports=t},function(e,t,n){function r(e,t){e=i(e);for(var n=-1,r=t.length,o={};++n<r;){var a=t[n];a in e&&(o[a]=e[a])}return o}var i=n(21);e.exports=r},function(e,t,n){function r(e,t){var n={};return i(e,function(e,r,i){t(e,r,i)&&(n[r]=e)}),n}var i=n(84);e.exports=r},function(e,t,n){function r(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?a(r+n,0):n;else if(n){var s=o(e,t);return r>s&&(t==t?t===e[s]:e[s]!=e[s])?s:-1}return i(e,t,n||0)}var i=n(103),o=n(125),a=Math.max;e.exports=r},function(e,t,n){function r(e,t,n){var r=0,s=e?e.length:r;if("number"==typeof t&&t==t&&a>=s){for(;s>r;){var u=r+s>>>1,l=e[u];(n?t>=l:t>l)&&null!==l?r=u+1:s=u}return s}return i(e,t,o,n)}var i=n(126),o=n(40),a=4294967295>>>1;e.exports=r},function(e){function t(e,t,o,a){t=o(t);for(var s=0,u=e?e.length:0,l=t!=t,c=null===t,d=void 0===t;u>s;){var f=n((s+u)/2),h=o(e[f]),p=void 0!==h,m=h==h;if(l)var v=m||a;else v=c?m&&p&&(a||null!=h):d?m&&(a||p):null!=h&&(a?t>=h:t>h);v?s=f+1:u=f}return r(u,i)}var n=Math.floor,r=Math.min,i=4294967295-1;e.exports=t},function(e,t,n){function r(e){return null==e||(a(e)&&(o(e)||l(e)||i(e)||u(e)&&s(e.splice))?!e.length:!c(e).length)}var i=n(33),o=n(34),a=n(28),s=n(26),u=n(27),l=n(128),c=n(23);e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||i(e)&&a.call(e)==o}var i=n(27),o="[object String]",a=Object.prototype.toString;e.exports=r},function(e,t,n){function r(e,t,n,r){var a=(n="function"==typeof n?o(n,r,3):void 0)?n(e,t):void 0;return void 0===a?i(e,t,n):!!a}var i=n(60),o=n(39);e.exports=r},function(e){function t(e){return void 0===e}e.exports=t},function(e,t,n){var r=n(17),i=n(132)(r);e.exports=i},function(e,t,n){function r(e,t){return function(n,r,u){if(r=i(r,u,3),s(n)){var l=a(n,r,t);return l>-1?n[l]:void 0}return o(n,r,e)}}var i=n(57),o=n(133),a=n(134),s=n(34);e.exports=r},function(e){function t(e,t,n,r){var i;return n(e,function(e,n,o){return t(e,n,o)?(i=r?n:e,!1):void 0}),i}e.exports=t},function(e){function t(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}e.exports=t},function(e,t,n){function r(e,t){return i(e,o(t))}var i=n(55),o=n(77);e.exports=r},function(e,t,n){var r=n(137),i=n(139),o=n(140)(r,i);e.exports=o},function(e,t,n){var r=n(138),i=n(48),o=n(86)(function(e,t,n){return n?r(e,t,n):i(e,t)});e.exports=o},function(e,t,n){function r(e,t,n){for(var r=-1,o=i(t),a=o.length;++r<a;){var s=o[r],u=e[s],l=n(u,t[s],s,e,t);(l==l?l===u:u!=u)&&(void 0!==u||s in e)||(e[s]=l)}return e}var i=n(23);e.exports=r},function(e){function t(e,t){return void 0===e?t:e}e.exports=t},function(e,t,n){function r(e,t){return i(function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(void 0,n))})}var i=n(87);e.exports=r},function(e,t,n){"use strict";var r=n(15),i=n(40),o=n(22),a=function(e){return o(e)?(r(e,a),Object.isFrozen(e)||Object.freeze(e),e):e};e.exports=Object.freeze?a:i},function(e,t,n){"use strict";var r=n(143);try{var i=function(e){var t=[];return function(n){-1===t.indexOf(n)&&(e(n),t.push(n))}}("undefined"!=typeof window?window.console&&r(window.console.warn,console):r(console.warn,console));e.exports=i}catch(o){e.exports=function(){}}},function(e,t,n){var r=n(144),i=n(164),o=n(87),a=1,s=32,u=o(function(e,t,n){var o=a;if(n.length){var l=i(n,u.placeholder);o|=s}
262return r(e,o,t,n,l)});u.placeholder={},e.exports=u},function(e,t,n){function r(e,t,n,r,g,y,b,_){var x=t&f;if(!x&&"function"!=typeof e)throw new TypeError(m);var w=r?r.length:0;if(w||(t&=~(h|p),r=g=void 0),w-=g?g.length:0,t&p){var C=r,k=g;r=g=void 0}var S=x?void 0:u(e),j=[e,t,n,r,g,C,k,y,b,_];if(S&&(l(j,S),t=j[1],_=j[9]),j[9]=null==_?x?0:e.length:v(_-w,0)||0,t==d)var E=o(j[0],j[2]);else E=t!=h&&t!=(d|h)||j[4].length?a.apply(void 0,j):s.apply(void 0,j);return(S?i:c)(E,j)}var i=n(145),o=n(147),a=n(150),s=n(167),u=n(156),l=n(168),c=n(165),d=1,f=2,h=32,p=64,m="Expected a function",v=Math.max;e.exports=r},function(e,t,n){var r=n(40),i=n(146),o=i?function(e,t){return i.set(e,t),e}:r;e.exports=o},function(e,t,n){(function(t){var r=n(24)(t,"WeakMap"),i=r&&new r;e.exports=i}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e,n){function r(){return(this&&this!==t&&this instanceof r?o:e).apply(n,arguments)}var o=i(e);return r}var i=n(148);e.exports=r}).call(t,function(){return this}())},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=i(e.prototype),r=e.apply(n,t);return o(r)?r:n}}var i=n(149),o=n(22);e.exports=r},function(e,t,n){var r=n(22),i=function(){function e(){}return function(t){if(r(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();e.exports=i},function(e,t,n){(function(t){function r(e,n,x,w,C,k,S,j,E,T){function P(){for(var p=arguments.length,m=p,v=Array(p);m--;)v[m]=arguments[m];if(w&&(v=o(v,w,C)),k&&(v=a(v,k,S)),M||A){var b=P.placeholder,O=c(v,b);if(p-=O.length,T>p){var F=j?i(j):void 0,L=_(T-p,0);n|=M?g:y,n&=~(M?y:g),D||(n&=~(f|h));var H=[e,n,x,M?v:void 0,M?O:void 0,M?void 0:v,M?void 0:O,F,E,L],B=r.apply(void 0,H);return u(e)&&d(B,H),B.placeholder=b,B}}var U=N?x:this,q=R?U[e]:e;return j&&(v=l(v,j)),$&&E<v.length&&(v.length=E),this&&this!==t&&this instanceof P&&(q=I||s(e)),q.apply(U,v)}var $=n&b,N=n&f,R=n&h,M=n&m,D=n&p,A=n&v,I=R?void 0:s(e);return P}var i=n(47),o=n(151),a=n(152),s=n(148),u=n(153),l=n(163),c=n(164),d=n(165),f=1,h=2,p=4,m=8,v=16,g=32,y=64,b=128,_=Math.max;e.exports=r}).call(t,function(){return this}())},function(e){function t(e,t,r){for(var i=r.length,o=-1,a=n(e.length-i,0),s=-1,u=t.length,l=Array(u+a);++s<u;)l[s]=t[s];for(;++o<i;)l[r[o]]=e[o];for(;a--;)l[s++]=e[o++];return l}var n=Math.max;e.exports=t},function(e){function t(e,t,r){for(var i=-1,o=r.length,a=-1,s=n(e.length-o,0),u=-1,l=t.length,c=Array(s+l);++a<s;)c[a]=e[a];for(var d=a;++u<l;)c[d+u]=t[u];for(;++i<o;)c[d+r[i]]=e[a++];return c}var n=Math.max;e.exports=t},function(e,t,n){function r(e){var t=a(e),n=s[t];if("function"!=typeof n||!(t in i.prototype))return!1;if(e===n)return!0;var r=o(n);return!!r&&e===r[0]}var i=n(154),o=n(156),a=n(158),s=n(160);e.exports=r},function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}var i=n(149),o=n(155),a=Number.POSITIVE_INFINITY;r.prototype=i(o.prototype),r.prototype.constructor=r,e.exports=r},function(e){function t(){}e.exports=t},function(e,t,n){var r=n(146),i=n(157),o=r?function(e){return r.get(e)}:i;e.exports=o},function(e){function t(){}e.exports=t},function(e,t,n){ 263function r(e){for(var t=e.name+"",n=i[t],r=n?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}var i=n(159);e.exports=r},function(e){var t={};e.exports=t},function(e,t,n){function r(e){if(u(e)&&!s(e)&&!(e instanceof i)){if(e instanceof o)return e;if(c.call(e,"__chain__")&&c.call(e,"__wrapped__"))return l(e)}return new o(e)}var i=n(154),o=n(161),a=n(155),s=n(34),u=n(27),l=n(162),c=Object.prototype.hasOwnProperty;r.prototype=a.prototype,e.exports=r},function(e,t,n){function r(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}var i=n(149),o=n(155);r.prototype=i(o.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){function r(e){return e instanceof i?e.clone():new o(e.__wrapped__,e.__chain__,a(e.__actions__))}var i=n(154),o=n(161),a=n(47);e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length,r=a(t.length,n),s=i(e);r--;){var u=t[r];e[r]=o(u,n)?s[u]:void 0}return e}var i=n(47),o=n(35),a=Math.min;e.exports=r},function(e){function t(e,t){for(var r=-1,i=e.length,o=-1,a=[];++r<i;)e[r]===t&&(e[r]=n,a[++o]=r);return a}var n="__lodash_placeholder__";e.exports=t},function(e,t,n){var r=n(145),i=n(166),o=150,a=16,s=function(){var e=0,t=0;return function(n,s){var u=i(),l=a-(u-t);if(t=u,l>0){if(++e>=o)return n}else e=0;return r(n,s)}}();e.exports=s},function(e,t,n){var r=n(24)(Date,"now")||function(){return(new Date).getTime()};e.exports=r},function(e,t,n){(function(t){function r(e,n,r,a){function s(){for(var n=-1,i=arguments.length,o=-1,c=a.length,d=Array(c+i);++o<c;)d[o]=a[o];for(;i--;)d[o++]=arguments[++n];return(this&&this!==t&&this instanceof s?l:e).apply(u?r:this,d)}var u=n&o,l=i(e);return s}var i=n(148),o=1;e.exports=r}).call(t,function(){return this}())},function(e,t,n){function r(e,t){var n=e[1],r=t[1],m=n|r,v=d>m,g=r==d&&n==c||r==d&&n==f&&e[7].length<=t[8]||r==(d|f)&&n==c;if(!v&&!g)return e;r&u&&(e[2]=t[2],m|=n&u?0:l);var y=t[3];if(y){var b=e[3];e[3]=b?o(b,y,t[4]):i(y),e[4]=b?s(e[3],h):i(t[4])}return(y=t[5])&&(b=e[5],e[5]=b?a(b,y,t[6]):i(y),e[6]=b?s(e[5],h):i(t[6])),(y=t[7])&&(e[7]=i(y)),r&d&&(e[8]=null==e[8]?t[8]:p(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var i=n(47),o=n(151),a=n(152),s=n(164),u=1,l=4,c=8,d=128,f=256,h="__lodash_placeholder__",p=Math.min;e.exports=r},function(e,t,n){"use strict";function r(e){if(a(e))return e;if(s(e))return parseFloat(e);
263if(o(e))return i(e,r);throw new Error("The value should be a number, a parseable string or an array of those.")}var i=n(55),o=n(34),a=n(170),s=n(128);e.exports=r},function(e,t,n){function r(e){return"number"==typeof e||i(e)&&a.call(e)==o}var i=n(27),o="[object Number]",a=Object.prototype.toString;e.exports=r},function(e,t,n){"use strict";function r(e,t){var n={},r=o(t,function(e){return-1!==e.indexOf("attribute:")}),l=a(r,function(e){return e.split(":")[1]});-1===u(l,"*")?i(l,function(t){e.isConjunctiveFacet(t)&&e.isFacetRefined(t)&&(n.facetsRefinements||(n.facetsRefinements={}),n.facetsRefinements[t]=e.facetsRefinements[t]),e.isDisjunctiveFacet(t)&&e.isDisjunctiveFacetRefined(t)&&(n.disjunctiveFacetsRefinements||(n.disjunctiveFacetsRefinements={}),n.disjunctiveFacetsRefinements[t]=e.disjunctiveFacetsRefinements[t]),e.isHierarchicalFacet(t)&&e.isHierarchicalFacetRefined(t)&&(n.hierarchicalFacetsRefinements||(n.hierarchicalFacetsRefinements={}),n.hierarchicalFacetsRefinements[t]=e.hierarchicalFacetsRefinements[t]);var r=e.getNumericRefinements(t);s(r)||(n.numericRefinements||(n.numericRefinements={}),n.numericRefinements[t]=e.numericRefinements[t])}):(s(e.numericRefinements)||(n.numericRefinements=e.numericRefinements),s(e.facetsRefinements)||(n.facetsRefinements=e.facetsRefinements),s(e.disjunctiveFacetsRefinements)||(n.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements),s(e.hierarchicalFacetsRefinements)||(n.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements));var c=o(t,function(e){return-1===e.indexOf("attribute:")});return i(c,function(t){n[t]=e[t]}),n}var i=n(15),o=n(111),a=n(55),s=n(127),u=n(124);e.exports=r},function(e,t,n){"use strict";var r=n(130),i=n(128),o=n(26),a=n(127),s=n(136),u=n(114),l=n(111),c=n(118),d={addRefinement:function(e,t,n){if(d.isRefined(e,t,n))return e;var r=""+n,i=e[t]?e[t].concat(r):[r],o={};return o[t]=i,s({},o,e)},removeRefinement:function(e,t,n){if(r(n))return d.clearRefinement(e,t);var i=""+n;return d.clearRefinement(e,function(e,n){return t===n&&i===e})},toggleRefinement:function(e,t,n){if(r(n))throw new Error("toggleRefinement should be used with a value");return d.isRefined(e,t,n)?d.removeRefinement(e,t,n):d.addRefinement(e,t,n)},clearRefinement:function(e,t,n){return r(t)?{}:i(t)?c(e,t):o(t)?u(e,function(e,r,i){var o=l(r,function(e){return!t(e,i,n)});return a(o)||(e[i]=o),e},{}):void 0},isRefined:function(e,t,i){var o=n(124),a=!!e[t]&&e[t].length>0;if(r(i)||!a)return a;var s=""+i;return-1!==o(e[t],s)}};e.exports=d},function(e,t,n){"use strict";function r(e){var t={};return d(e,function(e,n){t[e]=n}),t}function i(e,t,n){t&&t[n]&&(e.stats=t[n])}function o(e,t){return v(e,function(e){return g(e.attributes,t)})}function a(e,t){var n=t.results[0];this.query=n.query,this.parsedQuery=n.parsedQuery,this.hits=n.hits,this.index=n.index,this.hitsPerPage=n.hitsPerPage,this.nbHits=n.nbHits,this.nbPages=n.nbPages,this.page=n.page,this.processingTimeMS=m(t.results,"processingTimeMS"),this.aroundLatLng=n.aroundLatLng,this.automaticRadius=n.automaticRadius,this.serverUsed=n.serverUsed,this.timeoutCounts=n.timeoutCounts,this.timeoutHits=n.timeoutHits,this.disjunctiveFacets=[],this.hierarchicalFacets=y(e.hierarchicalFacets,function(){return[]}),this.facets=[];var a=e.getRefinedDisjunctiveFacets(),s=r(e.facets),u=r(e.disjunctiveFacets),l=1;d(n.facets,function(t,r){var a=o(e.hierarchicalFacets,r);if(a){var l=a.attributes.indexOf(r);this.hierarchicalFacets[p(e.hierarchicalFacets,{name:a.name})][l]={attribute:r,data:t,exhaustive:n.exhaustiveFacetsCount}}else{var c,d=-1!==h(e.disjunctiveFacets,r),f=-1!==h(e.facets,r);d&&(c=u[r],this.disjunctiveFacets[c]={name:r,data:t,exhaustive:n.exhaustiveFacetsCount},i(this.disjunctiveFacets[c],n.facets_stats,r)),f&&(c=s[r],this.facets[c]={name:r,data:t,exhaustive:n.exhaustiveFacetsCount},i(this.facets[c],n.facets_stats,r))}},this),this.hierarchicalFacets=f(this.hierarchicalFacets),d(a,function(r){var o=t.results[l],a=e.getHierarchicalFacetByName(r);d(o.facets,function(t,r){var s;if(a){s=p(e.hierarchicalFacets,{name:a.name});var l=p(this.hierarchicalFacets[s],{attribute:r});if(-1===l)return;this.hierarchicalFacets[s][l].data=x({},this.hierarchicalFacets[s][l].data,t)}else{s=u[r];var c=n.facets&&n.facets[r]||{};this.disjunctiveFacets[s]={name:r,data:_({},t,c),exhaustive:o.exhaustiveFacetsCount},i(this.disjunctiveFacets[s],o.facets_stats,r),e.disjunctiveFacetsRefinements[r]&&d(e.disjunctiveFacetsRefinements[r],function(t){!this.disjunctiveFacets[s].data[t]&&h(e.disjunctiveFacetsRefinements[r],t)>-1&&(this.disjunctiveFacets[s].data[t]=0)},this)}},this),l++},this),d(e.getRefinedHierarchicalFacets(),function(n){var r=e.getHierarchicalFacetByName(n),i=e._getHierarchicalFacetSeparator(r),o=e.getHierarchicalRefinement(n);if(!(0===o.length||o[0].split(i).length<2)){var a=t.results[l];d(a.facets,function(t,n){var a=p(e.hierarchicalFacets,{name:r.name}),s=p(this.hierarchicalFacets[a],{attribute:n});if(-1!==s){var u={};if(o.length>0){var l=o[0].split(i)[0];u[l]=this.hierarchicalFacets[a][s].data[l]}this.hierarchicalFacets[a][s].data=_(u,t,this.hierarchicalFacets[a][s].data)}},this),l++}},this),d(e.facetsExcludes,function(e,t){var r=s[t];this.facets[r]={name:t,data:n.facets[t],exhaustive:n.exhaustiveFacetsCount},d(e,function(e){this.facets[r]=this.facets[r]||{name:t},this.facets[r].data=this.facets[r].data||{},this.facets[r].data[e]=0},this)},this),this.hierarchicalFacets=y(this.hierarchicalFacets,E(e)),this.facets=f(this.facets),this.disjunctiveFacets=f(this.disjunctiveFacets),this._state=e}function s(e,t){var n={name:t};if(e._state.isConjunctiveFacet(t)){var r=v(e.facets,n);
263return r?y(r.data,function(n,r){return{name:r,count:n,isRefined:e._state.isFacetRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=v(e.disjunctiveFacets,n);return i?y(i.data,function(n,r){return{name:r,count:n,isRefined:e._state.isDisjunctiveFacetRefined(t,r)}}):[]}return e._state.isHierarchicalFacet(t)?v(e.hierarchicalFacets,n):void 0}function u(e,t){if(!t.data||0===t.data.length)return t;var n=e(y(t.data,k(u,e)));return x({},t,{data:n})}function l(e,t){return t.sort(e)}function c(e,t){var n=v(e,{name:t});return n&&n.stats}var d=n(15),f=n(174),h=n(124),p=n(175),m=n(177),v=n(131),g=n(184),y=n(55),b=n(185),_=n(136),x=n(80),w=n(34),C=n(26),k=n(190),S=n(192),j=n(193),E=n(194);a.prototype.getFacetByName=function(e){var t={name:e};return v(this.facets,t)||v(this.disjunctiveFacets,t)||v(this.hierarchicalFacets,t)},a.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],a.prototype.getFacetValues=function(e,t){var n=s(this,e);if(!n)throw new Error(e+" is not a retrieved facet.");var r=_({},t,{sortBy:a.DEFAULT_SORT});if(w(r.sortBy)){var i=j(r.sortBy);return w(n)?b(n,i[0],i[1]):u(S(b,i[0],i[1]),n)}if(C(r.sortBy))return w(n)?n.sort(r.sortBy):u(k(l,r.sortBy),n);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},a.prototype.getFacetStats=function(e){if(this._state.isConjunctiveFacet(e))return c(this.facets,e);if(this._state.isDisjunctiveFacet(e))return c(this.disjunctiveFacets,e);throw new Error(e+" is not present in `facets` or `disjunctiveFacets`")},e.exports=a},function(e){function t(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i}e.exports=t},function(e,t,n){var r=n(176)();e.exports=r},function(e,t,n){function r(e){return function(t,n,r){return t&&t.length?(n=i(n,r,3),o(t,n,e)):-1}}var i=n(57),o=n(134);e.exports=r},function(e,t,n){e.exports=n(178)},function(e,t,n){function r(e,t,n){return n&&u(e,t,n)&&(t=void 0),1==(t=o(t,n,3)).length?i(s(e)?e:l(e),t):a(e,t)}var i=n(179),o=n(57),a=n(180),s=n(34),u=n(54),l=n(181);e.exports=r},function(e){function t(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}e.exports=t},function(e,t,n){function r(e,t){var n=0;return i(e,function(e,r,i){n+=+t(e,r,i)||0}),n}var i=n(17);e.exports=r},function(e,t,n){function r(e){return null==e?[]:i(e)?o(e)?e:Object(e):a(e)}var i=n(28),o=n(22),a=n(182);e.exports=r},function(e,t,n){function r(e){return i(e,o(e))}var i=n(183),o=n(23);e.exports=r},function(e){function t(e,t){for(var n=-1,r=t.length,i=Array(r);++n<r;)i[n]=e[t[n]];return i}e.exports=t},function(e,t,n){function r(e,t,n,r){var f=e?o(e):0;return u(f)||(f=(e=c(e)).length),n="number"!=typeof n||r&&s(t,n,r)?0:0>n?d(f+n,0):n||0,"string"==typeof e||!a(e)&&l(e)?f>=n&&e.indexOf(t,n)>-1:!!f&&i(e,t,n)>-1}var i=n(103),o=n(29),a=n(34),s=n(54),u=n(31),l=n(128),c=n(182),d=Math.max;e.exports=r},function(e,t,n){function r(e,t,n,r){return null==e?[]:(r&&a(t,n,r)&&(n=void 0),o(t)||(t=null==t?[]:[t]),o(n)||(n=null==n?[]:[n]),i(e,t,n))}var i=n(186),o=n(34),a=n(54);e.exports=r},function(e,t,n){function r(e,t,n){var r=-1;t=i(t,function(e){return o(e)});var l=a(e,function(e){return{criteria:i(t,function(t){return t(e)}),index:++r,value:e}});return s(l,function(e,t){return u(e,t,n)})}var i=n(56),o=n(57),a=n(79),s=n(187),u=n(188);e.exports=r},function(e){function t(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}e.exports=t},function(e,t,n){function r(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++r<s;){var l=i(o[r],a[r]);if(l){if(r>=u)return l;var c=n[r];return l*("asc"===c||!0===c?1:-1)}}return e.index-t.index}var i=n(189);e.exports=r},function(e){function t(e,t){if(e!==t){var n=null===e,r=void 0===e,i=e==e,o=null===t,a=void 0===t,s=t==t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}e.exports=t},function(e,t,n){var r=n(191)(32);r.placeholder={},e.exports=r},function(e,t,n){function r(e){var t=a(function(n,r){var a=o(r,t.placeholder);return i(n,e,void 0,r,a)});return t}var i=n(144),o=n(164),a=n(87);e.exports=r},function(e,t,n){var r=n(191)(64);r.placeholder={},e.exports=r},function(e,t,n){"use strict";var r=n(114);e.exports=function(e){return r(e,function(e,t){var n=t.split(":");return e[0].push(n[0]),e[1].push(n[1]),e},[[],[]])}},function(e,t,n){"use strict";function r(e){return function(t,n){var r=e.hierarchicalFacets[n],o=e.hierarchicalFacetsRefinements[r.name]&&e.hierarchicalFacetsRefinements[r.name][0]||"",a=e._getHierarchicalFacetSeparator(r),s=e._getHierarchicalRootPath(r),u=e._getHierarchicalShowParentLevel(r),c=i(p(e._getHierarchicalFacetSortBy(r)),a,s,u,o),d=t;return s&&(d=t.slice(s.split(a).length)),l(d,c,{name:e.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,data:null})}}function i(e,t,n,r,i){return function(s,l,d){var p=s;if(d>0){var m=0;for(p=s;d>m;)p=p&&f(p.data,{isRefined:!0}),m++}if(p){var v=o(p.path||n,i,t,n,r);p.data=c(u(h(l.data,v),a(t,i)),e[0],e[1])}return s}}function o(e,t,n,r,i){return function(o,a){return(!r||0===a.indexOf(r)&&r!==a)&&(!r&&-1===a.indexOf(n)||r&&a.split(n).length-r.split(n).length==1||-1===a.indexOf(n)&&-1===t.indexOf(n)||0===t.indexOf(a)||0===a.indexOf(e+n)&&(i||0===a.indexOf(t)))}}function a(e,t){return function(n,r){return{name:d(s(r.split(e))),path:r,count:n,isRef
263ined:t===r||0===t.indexOf(r+e),data:null}}}e.exports=r;var s=n(74),u=n(55),l=n(114),c=n(185),d=n(195),f=n(131),h=n(201),p=n(193)},function(e,t,n){function r(e,t,n){var r=e;return(e=i(e))?(n?s(r,t,n):null==t)?e.slice(u(e),l(e)+1):(t+="",e.slice(o(e,t),a(e,t)+1)):e}var i=n(76),o=n(196),a=n(197),s=n(54),u=n(198),l=n(200);e.exports=r},function(e){function t(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}e.exports=t},function(e){function t(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}e.exports=t},function(e,t,n){function r(e){for(var t=-1,n=e.length;++t<n&&i(e.charCodeAt(t)););return t}var i=n(199);e.exports=r},function(e){function t(e){return 160>=e&&e>=9&&13>=e||32==e||160==e||5760==e||6158==e||e>=8192&&(8202>=e||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}e.exports=t},function(e,t,n){function r(e){for(var t=e.length;t--&&i(e.charCodeAt(t)););return t}var i=n(199);e.exports=r},function(e,t,n){var r=n(120),i=n(39),o=n(122),a=n(123),s=n(87)(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,i(t[0],t[1],3)):o(e,r(t))});e.exports=s},function(e,t,n){"use strict";var r=n(15),i=n(55),o=n(114),a=n(80),s=n(34),u={_getQueries:function(e,t){var n=[];return n.push({indexName:e,params:this._getHitsSearchParams(t)}),r(t.getRefinedDisjunctiveFacets(),function(r){n.push({indexName:e,params:this._getDisjunctiveFacetSearchParams(t,r)}
263)},this),r(t.getRefinedHierarchicalFacets(),function(r){var i=t.getHierarchicalFacetByName(r),o=t.getHierarchicalRefinement(r);o.length>0&&o[0].split(t._getHierarchicalFacetSeparator(i)).length>1&&n.push({indexName:e,params:this._getDisjunctiveFacetSearchParams(t,r,!0)})},this),n},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(this._getHitsHierarchicalFacetsAttributes(e)),n=this._getFacetFilters(e),r=this._getNumericFilters(e),i={facets:t,tagFilters:this._getTagFilters(e)};return n.length>0&&(i.facetFilters=n),r.length>0&&(i.numericFilters=r),a(e.getQueryParams(),i)},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=this._getFacetFilters(e,t,n),i=this._getNumericFilters(e,t),o={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:this._getTagFilters(e)},s=e.getHierarchicalFacetByName(t);return o.facets=s?this._getDisjunctiveHierarchicalFacetAttribute(e,s,n):t,i.length>0&&(o.numericFilters=i),r.length>0&&(o.facetFilters=r),a(e.getQueryParams(),o)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return r(e.numericRefinements,function(e,o){r(e,function(e,a){t!==o&&r(e,function(e){if(s(e)){var t=i(e,function(e){return o+a+e});n.push(t)}else n.push(o+a+e)})})}),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var i=[];return r(e.facetsRefinements,function(e,t){r(e,function(e){i.push(t+":"+e)})}),r(e.facetsExcludes,function(e,t){r(e,function(e){i.push(t+":-"+e)})}),r(e.disjunctiveFacetsRefinements,function(e,n){if(n!==t&&e&&0!==e.length){var o=[];r(e,function(e){o.push(n+":"+e)}),i.push(o)}}),r(e.hierarchicalFacetsRefinements,function(r,o){var a=r[0];if(void 0!==a){var s,u,l=e.getHierarchicalFacetByName(o),c=e._getHierarchicalFacetSeparator(l),d=e._getHierarchicalRootPath(l);if(t===o){if(-1===a.indexOf(c)||!d&&!0===n||d&&d.split(c).length===a.split(c).length)return;d?(u=d.split(c).length-1,a=d):(u=a.split(c).length-2,a=a.slice(0,a.lastIndexOf(c))),s=l.attributes[u]}else u=a.split(c).length-1,s=l.attributes[u];s&&i.push([s+":"+a])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return o(e.hierarchicalFacets,function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=r.split(e._getHierarchicalFacetSeparator(n)).length,o=n.attributes.slice(0,i+1);return t.concat(o)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(r).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,a+1)}};e.exports=u},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"\x1b["+i.colors[n][0]+"m"+e+"\x1b["+i.colors[n][1]+"m":e}function a(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&j(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=u(e,i,r)),i}var o=l(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(j(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(k(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return c(n)}var g,y="",_=!1,x=["{","}"];(p(n)&&(_=!0,x=["[","]"]),j(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(y=" "+RegExp.prototype.toString.call(n)),k(n)&&(y=" "+Date.prototype.toUTCString.call(n)),S(n)&&(y=" "+c(n)),0!==a.length||_&&0!=n.length?0>r?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),g=_?d(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,_)}),e.seen.pop(),h(g,y,x)):x[0]+y+x[1]}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i){for(var o=[],a=0,s=t.length;s>a;++a)N(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");
263return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))}),o}function f(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),N(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=v(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){return e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function g(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return C(e)&&"[object RegExp]"===T(e)}function C(e){return"object"==typeof e&&null!==e}function k(e){return C(e)&&"[object Date]"===T(e)}function S(e){return C(e)&&("[object Error]"===T(e)||e instanceof Error)}function j(e){return"function"==typeof e}function E(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function T(e){return Object.prototype.toString.call(e)}function P(e){return 10>e?"0"+e.toString(10):e.toString(10)}function $(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(R,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];o>n;s=r[++n])a+=v(s)||!C(s)?" "+s:" "+i(s);return a},t.deprecate=function(n,i){function o(){if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),a=!0}return n.apply(this,arguments)}if(x(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var a=!1;return o};var M,D={};t.debuglog=function(e){if(x(M)&&(M={NODE_ENV:"production"}.NODE_DEBUG||""),e=e.toUpperCase(),!D[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var n=r.pid;D[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else D[e]=function(){};return D[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=g,t.isNumber=y,t.isString=b,t.isSymbol=_,t.isUndefined=x,t.isRegExp=w,t.isObject=C,t.isDate=k,t.isError=S,t.isFunction=j,t.isPrimitive=E,t.isBuffer=n(204);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",$(),t.format.apply(t,arguments))},t.inherits=n(205),t._extend=function(e,t){if(!t||!C(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,function(){return this}(),n(9))},function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";function r(e){return m(e)?h(e,r):v(e)?d(e,r):p(e)?y(e):e}function i(e,t,n,r){if(null!==e&&(n=n.replace(e,""),r=r.replace(e,"")),n=t[n]||n,r=t[r]||r,-1!==_.indexOf(n)||-1!==_.indexOf(r)){if("q"===n)return-1;if("q"===r)return 1;var i=-1!==b.indexOf(n),o=-1!==b.indexOf(r);if(i&&!o)return 1;if(o&&!i)return-1}return n.localeCompare(r)}var o=n(207),a=n(101),s=n(209),u=n(143),l=n(15),c=n(201),d=n(55),f=n(213),h=n(215),p=n(128),m=n(83),v=n(34),g=n(208),y=n(211).encode,b=["dFR","fR","nR","hFR","tR"],_=o.ENCODED_PARAMETERS;t.getStateFromQueryString=function(e,t){var n=t&&t.prefix||"",r=t&&t.mapping||{},i=g(r),u=s.parse(e),l=new RegExp("^"+n),d=f(u,function(e,t){var r=n&&l.test(t)?t.replace(l,""):t;return o.decode(i[r]||r)||r}),h=a._parseNumbers(d);return c(h,a.PARAMETERS)},t.getUnrecognizedParametersInQueryString=function(e,t){var n=t&&t.prefix,r
263=t&&t.mapping||{},i=g(r),a={},u=s.parse(e);if(n){var c=new RegExp("^"+n);l(u,function(e,t){c.test(t)||(a[t]=e)})}else l(u,function(e,t){o.decode(i[t]||t)||(a[t]=e)});return a},t.getQueryStringFromState=function(e,t){var n=t&&t.moreAttributes,a=t&&t.prefix||"",l=t&&t.mapping||{},c=g(l),d=r(e),h=f(d,function(e,t){var n=o.encode(t);return a+(l[n]||n)}),p=""===a?null:new RegExp("^"+a),m=u(i,null,p,c);if(n){var v=s.stringify(h,{encode:!1,sort:m}),y=s.stringify(n,{encode:!1});return v?v+"&"+y:y}return s.stringify(h,{encode:!1,sort:m})}},function(e,t,n){"use strict";var r=n(208),i=n(23),o={advancedSyntax:"aS",allowTyposOnNumericTokens:"aTONT",analyticsTags:"aT",analytics:"a",aroundLatLngViaIP:"aLLVIP",aroundLatLng:"aLL",aroundPrecision:"aP",aroundRadius:"aR",attributesToHighlight:"aTH",attributesToRetrieve:"aTR",attributesToSnippet:"aTS",disjunctiveFacetsRefinements:"dFR",disjunctiveFacets:"dF",distinct:"d",facetsExcludes:"fE",facetsRefinements:"fR",facets:"f",getRankingInfo:"gRI",hierarchicalFacetsRefinements:"hFR",hierarchicalFacets:"hF",highlightPostTag:"hPoT",highlightPreTag:"hPrT",hitsPerPage:"hPP",ignorePlurals:"iP",index:"idx",insideBoundingBox:"iBB",insidePolygon:"iPg",length:"l",maxValuesPerFacet:"mVPF",minimumAroundRadius:"mAR",minProximity:"mP",minWordSizefor1Typo:"mWS1T",minWordSizefor2Typos:"mWS2T",numericFilters:"nF",numericRefinements:"nR",offset:"o",optionalWords:"oW",page:"p",queryType:"qT",query:"q",removeWordsIfNoResults:"rWINR",replaceSynonymsInHighlight:"rSIH",restrictSearchableAttributes:"rSA",synonyms:"s",tagFilters:"tF",tagRefinements:"tR",typoTolerance:"tT",optionalTagFilters:"oTF",optionalFacetFilters:"oFF",snippetEllipsisText:"sET",disableExactOnAttributes:"dEOA",enableExactOnSingleWordQuery:"eEOSWQ"},a=r(o);e.exports={ENCODED_PARAMETERS:i(a),decode:function(e){return a[e]},encode:function(e){return o[e]}}},function(e,t,n){function r(e,t,n){n&&i(e,t,n)&&(t=void 0);for(var r=-1,s=o(e),u=s.length,l={};++r<u;){var c=s[r],d=e[c];t?a.call(l,d)?l[d].push(c):l[d]=[c]:l[d]=c}return l}var i=n(54),o=n(23),a=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(210),i=n(212);e.exports={stringify:r,parse:i}},function(e,t,n){var r=n(211),i={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},strictNullHandling:!1,skipNulls:!1,encode:!0,stringify:function(e,t,n,o,a,s,u,l){if("function"==typeof u)e=u(t,e);else if(r.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(o)return s?r.encode(t):t;e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return s?[r.encode(t)+"="+r.encode(e)]:[t+"="+e];var c,d=[];if(void 0===e)return d;if(Array.isArray(u))c=u;else{var f=Object.keys(e);c=l?f.sort(l):f}for(var h=0,p=c.length;p>h;++h){var m=c[h];a&&null===e[m]||(d=Array.isArray(e)?d.concat(i.stringify(e[m],n(t,m),n,o,a,s,u)):d.concat(i.stringify(e[m],t+"["+m+"]",n,o,a,s,u)))}return d}};e.exports=function(e,t){var n,r,o="undefined"==typeof(t=t||{}).delimiter?i.delimiter:t.delimiter,a="boolean"==typeof t.strictNullHandling?t.strictNullHandling:i.strictNullHandling,s="boolean"==typeof t.skipNulls?t.skipNulls:i.skipNulls,u="boolean"==typeof t.encode?t.encode:i.encode,l="function"==typeof t.sort?t.sort:null;"function"==typeof t.filter?e=(r=t.filter)("",e):Array.isArray(t.filter)&&(n=r=t.filter);var c,d=[];if("object"!=typeof e||null===e)return"";c=t.arrayFormat in i.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var f=i.arrayPrefixGenerators[c];n||(n=Object.keys(e)),l&&n.sort(l);for(var h=0,p=n.length;p>h;++h){var m=n[h];s&&null===e[m]||(d=d.concat(i.stringify(e[m],m,f,a,s,u,r,l)))}return d.join(o)}},function(e,t){var n={};n.hexTable=new Array(256);for(var r=0;256>r;++r)n.hexTable[r]="%"+((16>r?"0":"")+r.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},r=0,i=e.length;i>r;++r)"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,r){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,r));for(var i=Object.keys(n),o=0,a=i.length;a>o;++o){var s=i[o],u=n[s];Object.prototype.hasOwnProperty.call(e,s)?e[s]=t.merge(e[s],u,r):e[s]=u}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",r=0,i=e.length;i>r;++r){var o=e.charCodeAt(r);45===o||46===o||95===o||126===o||o>=48&&57>=o||o>=65&&90>=o||o>=97&&122>=o?t+=e[r]:128>o?t+=n.hexTable[o]:2048>o?t+=n.hexTable[192|o>>6]+n.hexTable[128|63&o]:55296>o||o>=57344?t+=n.hexTable[224|o>>12]+n.hexTable[128|o>>6&63]+n.hexTable[128|63&o]:(++r,o=65536+((1023&o)<<10|1023&e.charCodeAt(r)),t+=n.hexTable[240|o>>18]+n.hexTable[128|o>>12&63]+n.hexTable[128|o>>6&63]+n.hexTable[128|63&o])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;var r=(n=n||[]).indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var i=[],o=0,a=e.length;a>o;++o)"undefined"!=typeof e[o]&&i.push(e[o]);return i}var s=Object.keys(e);for(o=0,a=s.length;a>o;++o){var u=s[o];e[u]=t.compact(e[u],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){var r=n(211),i={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1,parseValues:function(e,t){for(var n={},i=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),o=0,a=i.length;a>o;++o){var s=i[o],u=-1===s.indexOf("]=")?s.indexOf("="):s.indexOf("]=")+1;if(-1===u)n[r.decode(s)]="",t.strictNullHandling&&(n[r.decode(s)]=null);else{var l=r.decode(s.slice(0,u)),c=r.decode(s.slice(u+1));Object.prototype.hasOwnProperty.call(n,l)?n[l]=[].concat(n[l]).concat(c):n[l]=c}}return n},parseObject:function(e,t,n){if(!e.length)return t;var r,o=e.shift();if("[]"===o)r=(r=[]).concat(i.parseObject(e,t,n));else{r=n.plainObjects?Object.create(null):{};var a="["===o[0]&&"]"===o[o.length-1]?o.slice(1,o.length-1):o,s=parseInt(a,10),u=""+s;!isNaN(s)&&o!==a&&u===a&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(r=[])[s]=i.parseObject(e,t,n):r[a]=i.parseObject(e,t,n)}return r},parseKeys:function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var r=/(\[[^\[\]]*\])/g,o=/^([^\[\]]*)/.exec(e),a=[];
263if(o[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(o[1])&&!n.allowPrototypes)return;a.push(o[1])}for(var s=0;null!==(o=r.exec(e))&&s<n.depth;)++s,(n.plainObjects||!Object.prototype.hasOwnProperty(o[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&a.push(o[1]);return o&&a.push("["+e.slice(o.index)+"]"),i.parseObject(a,t,n)}}};e.exports=function(e,t){if((t=t||{}).delimiter="string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:i.delimiter,t.depth="number"==typeof t.depth?t.depth:i.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:i.arrayLimit,t.parseArrays=!1!==t.parseArrays,t.allowDots="boolean"==typeof t.allowDots?t.allowDots:i.allowDots,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:i.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:i.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:i.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:i.strictNullHandling,""===e||null==e)return t.plainObjects?Object.create(null):{} 264;for(var n="string"==typeof e?i.parseValues(e,t):e,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),s=0,u=a.length;u>s;++s){var l=a[s],c=i.parseKeys(l,n[l],t);o=r.merge(o,c,t)}return r.compact(o)}},function(e,t,n){var r=n(214)(!0);e.exports=r},function(e,t,n){function r(e){return function(t,n,r){var a={};return n=i(n,r,3),o(t,function(t,r,i){var o=n(t,r,i);t=e?t:o,a[r=e?o:r]=t}),a}}var i=n(57),o=n(18);e.exports=r},function(e,t,n){var r=n(214)();e.exports=r},function(e){"use strict";e.exports="2.9.1"},function(e,t,n){var r=n(120),i=n(218),o=n(87)(function(e){return i(r(e,!1,!0))});e.exports=o},function(e,t,n){function r(e,t){var n=-1,r=i,u=e.length,l=!0,c=l&&u>=s,d=c?a():null,f=[];d?(r=o,l=!1):(c=!1,d=t?[]:f);e:for(;++n<u;){var h=e[n],p=t?t(h,n,e):h;if(l&&h==h){for(var m=d.length;m--;)if(d[m]===p)continue e;t&&d.push(p),f.push(h)}else r(d,p,0)<0&&((t||c)&&d.push(p),f.push(h))}return f}var i=n(103),o=n(105),a=n(106),s=200;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=e;return function(){var e=Date.now(),n=e-t;return t=e,n}}function a(e){return s()+window.location.pathname+e}function s(){return window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function u(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.useHash||!1;return new b(t?g:y,e)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(99)),d=r(n(220)),f=r(n(206)),h=r(n(129)),p=r(n(80)),m=c["default"].AlgoliaSearchHelper,v=d["default"].split(".")[0],g={character:"#",onpopstate:function(e){window.addEventListener("hashchange",e)},pushState:function(e){window.location.assign(a(this.createURL(e)))},replaceState:function(e){window.location.replace(a(this.createURL(e)))},createURL:function(e){return window.location.search+this.character+e},readUrl:function(){return window.location.hash.slice(1)}},y={character:"?",onpopstate:function(e){window.addEventListener("popstate",e)},pushState:function(e){window.history.pushState(null,"",a(this.createURL(e)))},replaceState:function(e){window.history.replaceState(null,"",a(this.createURL(e)))},createURL:function(e){return this.character+e+document.location.hash},readUrl:function(){return window.location.search.slice(1)}},b=function(){function e(t,n){i(this,e),this.urlUtils=t,this.originalConfig=null,this.timer=o(Date.now()),this.mapping=n.mapping||{},this.threshold=n.threshold||700,this.trackedParameters=n.trackedParameters||["query","attribute:*","index","page","hitsPerPage"]}return l(e,[{key:"getConfiguration",value:function(e){this.originalConfig=e;var t=this.urlUtils.readUrl();return m.getConfigurationFromQueryString(t,{mapping:this.mapping})}},{key:"init",value:function(e){var t=this,n=e.helper;n.on("change",function(e){t.renderURLFromState(e)}),this.onHistoryChange(this.onPopState.bind(this,n))}},{key:"onPopState",value:function(e,t){var n=e.getState(this.trackedParameters),r=(0,p["default"])({},this.originalConfig,n);(0,h["default"])(r,t)||e.overrideStateWithoutTriggeringChangeEvent(t).search()}},{key:"renderURLFromState",value:function(e){var t=this.urlUtils.readUrl(),n=m.getForeignConfigurationInQueryString(t,{mapping:this.mapping});n.is_v=v;var r=f["default"].getQueryStringFromState(e.filter(this.trackedParameters),{moreAttributes:n,mapping:this.mapping});this.timer()<this.threshold?this.urlUtils.replaceState(r):this.urlUtils.pushState(r)}},{key:"createURL",value:function(e){var t=this.urlUtils.readUrl(),n=e.filter(this.trackedParameters);return c["default"].url.getUnrecognizedParametersInQueryString(t,{mapping:this.mapping}).is_v=v,this.urlUtils.createURL(c["default"].url.getQueryStringFromState(n,{mapping:this.mapping}))}},{key:"onHistoryChange",value:function(e){var t=this;this.urlUtils.onpopstate(function(){var n=t.urlUtils.readUrl(),r=m.getConfigurationFromQueryString(n,{mapping:t.mapping}),i=(0,p["default"])({},t.originalConfig,r);e(i)})}}]),e}();t["default"]=u},function(e,t){"use strict";
264Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="1.4.2"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.numberLocale;return{formatNumber:function(e,n){return Number(n(e)).toLocaleString(t)}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.templates,r=void 0===n?d["default"]:n,i=e.cssClasses,m=void 0===i?{}:i,v=e.collapsible,g=void 0!==v&&v,y=e.autoHideContainer,b=void 0===y||y;if(!t)throw new Error(p);var _=(0,s.getContainerNode)(t),x=(0,c["default"])(f["default"]);!0===b&&(x=(0,l["default"])(x));var w={root:(0,u["default"])(h(null),m.root),header:(0,u["default"])(h("header"),m.header),body:(0,u["default"])(h("body"),m.body),footer:(0,u["default"])(h("footer"),m.footer),link:(0,u["default"])(h("link"),m.link)};return{init:function(e){var t=e.helper,n=e.templatesConfig;this._clearRefinementsAndSearch=s.clearRefinementsAndSearch.bind(null,t),this._templateProps=(0,s.prepareTemplateProps)({defaultTemplates:d["default"],templatesConfig:n,templates:r})},render:function(e){var t=e.results,n=e.state,r=e.createURL,i=0!==(0,s.getRefinements)(t,n).length,u=r((0,s.clearRefinementsFromState)(n));a["default"].render(o(x,{clearAll:this._clearRefinementsAndSearch,collapsible:g,cssClasses:w,hasRefinements:i,shouldAutoHideContainer:!i,templateProps:this._templateProps,url:u}),_)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(382)),l=r(n(383)),c=r(n(384)),d=r(n(391)),f=r(n(392)),h=(0,s.bemHelper)("ais-clear-all"),p="Usage:\nclearAll({\n container,\n [ cssClasses.{root,header,body,footer,link}={} ],\n [ templates.{header,link,footer}={header: '', link: 'Clear all', footer: ''} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t,n){(function(t){e.exports=t.React=n(224)}).call(t,function(){return this}())},function(e,t,n){"use strict";e.exports=n(225)},function(e,t,n){"use strict";var r=n(226),i=n(366),o=n(370),a=n(261),s=n(375),u={};a(u,o),a(u,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),u.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,u.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i,e.exports=u},function(e,t,n){"use strict";var r=n(227),i=n(228),o=n(293),a=n(267),s=n(250),u=n(240),l=n(272),c=n(276),d=n(364),f=n(313),h=n(365);n(247),o.inject();var p={findDOMNode:f,render:u.measure("React","render",s.render),unmountComponentAtNode:s.unmountComponentAtNode,version:d,unstable_batchedUpdates:c.batchedUpdates,unstable_renderSubtreeIntoContainer:h};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:a,Mount:s,Reconciler:l,TextComponent:i}),e.exports=p},function(e){"use strict";var t={current:null};e.exports=t},function(e,t,n){"use strict";var r=n(229),i=n(244),o=n(248),a=n(250),s=n(261),u=n(243),l=n(242),c=(n(292),function(){});s(c.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){if(this._rootNodeID=e,t.useCreateElement){var r=n[a.ownerDocumentContextKey].createElement("span");return i.setAttributeForID(r,e),a.getID(r),l(r,this._stringText),r}var o=u(this._stringText);return t.renderToStaticMarkup?o:"<span "+i.createMarkupForID(e)+">"+o+"</span>"},receiveComponent:function(e){if(e!==this._currentElement){this._currentElement=e;var t=""+e;if(t!==this._stringText){this._stringText=t;var n=a.getNode(this._rootNodeID);r.updateTextContent(n,t)}}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var i=n(230),o=n(238),a=n(240),s=n(241),u=n(242),l=n(235),c={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:u,processUpdates:function(e,t){for(var n,a=null,c=null,d=0;d<e.length;d++)if((n=e[d]).type===o.MOVE_EXISTING||n.type===o.REMOVE_NODE){var f=n.fromIndex,h=n.parentNode.childNodes[f],p=n.parentID;h||l(!1),(a=a||{})[p]=a[p]||[],a[p][f]=h,(c=c||[]).push(h)}var m;if(m=t.length&&"string"==typeof t[0]?i.dangerouslyRenderMarkup(t):t,c)for(var v=0;v<c.length;v++)c[v].parentNode.removeChild(c[v]);for(var g=0;g<e.length;g++)switch(n=e[g],n.type){case o.INSERT_MARKUP:r(n.parentNode,m[n.markupIndex],n.toIndex);break;case o.MOVE_EXISTING:r(n.parentNode,a[n.parentID][n.fromIndex],n.toIndex);break;case o.SET_MARKUP:s(n.parentNode,n.content);break;case o.TEXT_CONTENT:u(n.parentNode,n.content);break;case o.REMOVE_NODE:}}};a.measureMethods(c,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),e.exports=c},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var i=n(231),o=n(232),a=n(237),s=n(236),u=n(235),l=/^(<[^ \/>]+)/,c="data-danger-index",d={dangerouslyRenderMarkup:function(e){i.canUseDOM||u(!1);for(var t,n={},d=0;d<e.length;d++)e[d]||u(!1),t=r(e[d]),n[t=s(t)?t:"*"]=n[t]||[],n[t][d]=e[d];var f=[],h=0;for(t in n)if(n.hasOwnProperty(t)){var p,m=n[t];for(p in m)if(m.hasOwnProperty(p)){var v=m[p];m[p]=v.replace(l,"$1 "+c+'="'+p+'" ')}for(var g=o(m.join(""),a),y=0;y<g.length;++y){var b=g[y];b.hasAttribute&&b.hasAttribute(c)&&(p=+b.getAttribute(c),b.removeAttribute(c),f.hasOwnProperty(p)&&u(!1),f[p]=b,h+=1)}}return h!==f.length&&u(!1),f.length!==e.length&&u(!1),f},dangerouslyReplaceNodeWithMarkup:function(e,t){var n;i.canUseDOM||u(!1),t||u(!1),"html"===e.tagName.toLowerCase()&&u(!1),n="string"==typeof t?o(t,a)[0]:t,e.parentNode.replaceChild(n,e)}};e.exports=d},function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseVie
264wport:t&&!!window.screen,isInWorker:!t};e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function i(e,t){var n=l;l||u(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var c=o[0];c--;)n=n.lastChild}else n.innerHTML=e;var d=n.getElementsByTagName("script");d.length&&(t||u(!1),a(d).forEach(t));for(var f=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var o=n(231),a=n(233),s=n(236),u=n(235),l=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=i},function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return r(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=n(234);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&i(!1),"number"!=typeof t&&i(!1),0===t||t-1 in e||i(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;t>o;o++)r[o]=e[o];return r}var i=n(235);e.exports=r},function(e){"use strict";
264function t(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;(u=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=t},function(e,t,n){"use strict";function r(e){return a||o(!1),f.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||(a.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(231),o=n(235),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],d=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(e){f[e]=d,s[e]=!0}),e.exports=r},function(e){"use strict";function t(e){return function(){return e}}function n(){}n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,n){"use strict";var r=n(239)({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=r},function(e,t,n){"use strict";var r=n(235),i=function(e){var t,n={};for(t in e instanceof Object&&!Array.isArray(e)||r(!1),e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e){"use strict";function t(e,t,n){return n}var n={enableMeasure:!1,storedMeasure:t,measureMethods:function(){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){n.storedMeasure=e}}};e.exports=n},function(e,t,n){"use strict";var r=n(231),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){"use strict";var r=n(231),i=n(243),o=n(241),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){o(e,i(t))})),e.exports=a},function(e){"use strict";function t(e){return r[e]}function n(e){return(""+e).replace(i,t)}var r={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=n},function(e,t,n){"use strict";function r(e){return!!c.hasOwnProperty(e)||!l.hasOwnProperty(e)&&(u.test(e)?(c[e]=!0,!0):(l[e]=!0,!1))}function i(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||e.hasOverloadedBooleanValue&&!1===t}var o=n(245),a=n(240),s=n(246),u=(n(247),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},d={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(o.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&!0===t?r+'=""':r+"="+s(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else o.isCustomAttribute(t)&&d.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var i=n.propertyName,a=o.getDefaultValueForProperty(e.nodeName,i);n.hasSideEffects&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(d,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=d},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(235),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};for(var d in e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute),n){s.properties.hasOwnProperty(d)&&i(!1);var f=d.toLowerCase(),h=n[d],p={attributeName:f,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseAttribute:r(h,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(h,t.MUST_USE_PROPERTY),hasSideEffects:r(h,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(h,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(h,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(h,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(h,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(p.mustUseAttribute&&p.mustUseProperty&&i(!1),!p.mustUseProperty&&p.hasSideEffects&&i(!1),p.hasBooleanValue+p.hasNumericValue+p.hasOverloadedBooleanValue<=1||i(!1),u.hasOwnProperty(d)){var m=u[d];p.attributeName=m}a.hasOwnProperty(d)&&(p.attributeNamespace=a[d]),l.hasOwnProperty(d)&&(p.propertyName=l[d]),c.hasOwnProperty(d)&&(p.mutationMethod=c[d]),s.properties[d]=p}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){if((0,s._isCustomAttributeFunctions[t])(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=a[e];return r||(a[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:o};e.exports=s},function(e,t,n){"use strict";function r(e){return'"'+i(e)+'"'}var i=n(243);e.exports=r},function(e,t,n){"use strict";var r=n(237);e.exports=r},function(e,t,n){"use strict";var r=n(249),i=n(250),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){i.purgeID(e)}};e.exports=o},function(e,t,n){"use strict";var r=n(229),i=n(244),o=n(250),a=n(240),s=n(235),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var r=o.getNode(e);u.hasOwnProperty(t)&&s(!1),null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=o.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=o.getNode(e[n].parentID);r.processUpdates(e,t)}};a.measureMethods(l,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),e.exports=l},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===U?e.documentElement:e.firstChild:null}function o(e){var t=i(e);return t&&Y.getID(t)}function a(e){var t=s(e);if(t)if(H.hasOwnProperty(t)){var n=H[t];n!==e&&(d(n,t)&&I(!1),H[t]=e)}else H[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(L)||""}function u(e,t){var n=s(e);n!==t&&delete H[n],e.setAttribute(L,t),H[t]=e}function l(e){return H.hasOwnProperty(e)&&d(H[e],e)||(H[e]=Y.findReactNodeByID(e)),H[e]}function c(e){var t=j.get(e)._rootNodeID;return k.isNullComponentID(t)?null:(H.hasOwnProperty(t)&&d(H[t],t)||(H[t]=Y.findReactNodeByID(t)),H[t])}function d(e,t){if(e){s(e)!==t&&I(!1);var n=Y.findReactContainerForID(t);if(n&&D(n,e))return!0}return!1}function f(e){delete H[e]}function h(e){var t=H[e];return!(!t||!d(t,e))&&void(Q=t)}function p(e){Q=null,S.traverseAncestors(e,h);var t=Q;return Q=null,t}function m(e,t,n,r,i,o){w.useCreateElement&&(o=R({},o),n.nodeType===U?o[z]=n:o[z]=n.ownerDocument);var a=P.mountComponent(e,t,r,o);e._renderedComponent._topLevelWrapper=e,Y._mountImageIntoNode(a,n,i,r)}function v(e,t,n,r,i){var o=N.ReactReconcileTransaction.getPooled(r);o.perform(m,null,e,t,n,o,r,i),N.ReactReconcileTransaction.release(o)}function g(e,t){for(P.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=o(e);return!!t&&t!==S.getReactRootIDFromNodeID(t)}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=S.getReactRootIDFromNodeID(t),i=e;do{if(n=s(i),null==(i=i.parentNode))return null}while(n!==r);if(i===V[r])return e}}return null}var _=n(245),x=n(251),w=(n(227),n(263)),C=n(264),k=n(266),S=n(267),j=n(269),E=n(270),T=n(240),P=n(272),$=n(275),N=n(276),R=n(261),M=n(280),D=n(281),A=n(284),I=n(235),O=n(241),F=n(289),L=(n(292),n(247),_.ID_ATTRIBUTE_NAME),H={},B=1,U=9,q=11,z="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),W={},V={},K=[],Q=null,G=function(){};G.prototype.isReactComponent={},G.prototype.render=function(){return this.props};var Y={TopLevelWrapper:G,_instancesByReactRootID:W,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Y.scrollMonitor(n,function(){$.enqueueElementInternal(e,t),r&&$.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){(!t||t.nodeType!==B&&t.nodeType!==U&&t.nodeType!==q)&&I(!1),x.ensureScrollValueMonitoring();var n=Y.registerContainer(t);return W[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var i=A(e,null),o=Y._registerComponent(i,t);return N.batchedUpdates(v,i,o,t,n,r),i},renderSubtreeIntoContainer:function(e,t,n,r){return(null==e||null==e._reactInternalInstance)&&I(!1),Y._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){C.isValidElement(t)||I(!1);var a=new C(G,null,null,null,null,null,t),u=W[o(n)];if(u){var l=u._currentElement.props;if(F(l,t)){var c=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(c)};return Y._updateRootComponent(u,a,n,d),c}Y.unmountComponentAtNode(n)}var f=i(n),h=f&&!!s(f),p=y(n),m=h&&!u&&!p,v=Y._renderNewRootComponent(a,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):M)._renderedComponent.getPublicInstance();return r&&r.call(v),v},render:function(e,t,n){return Y._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=o(e);return t&&(t=S.getReactRootIDFromNodeID(t)),t||(t=S.createReactRootID()),V[t]=e,t},unmountComponentAtNode:function(e){(!e||e.nodeType!==B&&e.nodeType!==U&&e.nodeType!==q)&&I(!1);var t=o(e),n=W[t];if(!n){var r=(y(e),s(e));return r&&S.getReactRootIDFromNodeID(r),!1}return N.batchedUpdates(g,n,e),delete W[t],delete V[t],!0},findReactContainerForID:function(e){var t=S.getReactRootIDFromNodeID(e);return V[t]},findReactNodeByID:function(e){var t=Y.findReactContainerForID(e);return Y.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=K,r=0,i=p(t)||e;for(n[0]=i.firstChild,n.length=1;r<n.length;){for(var o,a=n[r++];a;){var s=Y.getID(a);s?t===s?o=a:S.isAncestorIDOf(s,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(o)return n.length=0,o}n.length=0,I(!1)},_mountImageIntoNode:function(e,t,n,o){if((!t||t.nodeType!==B&&t.nodeType!==U&&t.nodeType!==q)&&I(!1),n){var a=i(t);if(E.canReuseMarkup(e,a))return;var s=a.getAttribute(E.CHECKSUM_ATTR_NAME);a.removeAttribute(E.CHECKSUM_ATTR_NAME);var u=a.outerHTML;a.setAttribute(E.CHECKSUM_ATTR_NAME,s);var l=e,c=r(l,u);l.substring(c-20,c+20),u.substring(c-20,c+20),t.nodeType===U&&I(!1)}if(t.nodeType===U&&I(!1),o.useCreateElement){for(;
264t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else O(t,e)},ownerDocumentContextKey:z,getReactRootID:o,getID:a,setID:u,getNode:l,getNodeFromInstance:c,isValid:d,purgeID:f};T.measureMethods(Y,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=Y},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=p++,f[e[v]]={}),f[e[v]]}var i=n(252),o=n(253),a=n(254),s=n(259),u=n(240),l=n(260),c=n(261),d=n(262),f={},h=!1,p=0,m={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),g=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),s=a.registrationNameDependencies[e],u=i.topLevelTypes,l=0;l<s.length;l++){var c=s[l];o.hasOwnProperty(c)&&o[c]||(c===u.topWheel?d("wheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):d("mousewheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):c===u.topScroll?d("scroll",!0)?g.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===u.topFocus||c===u.topBlur?(d("focus",!0)?(g.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):d("focusin")&&(g.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),o[u.topBlur]=!0,o[u.topFocus]=!0):m.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,m[c],n),o[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!h){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),h=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});u.measureMethods(g,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),e.exports=g},function(e,t,n){"use strict";var r=n(239),i=r({bubbled:null,captured:null}),o={topLevelTypes:r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),PropagationPhases:i};e.exports=o},function(e,t,n){"use strict";var r=n(254),i=n(255),o=n(256),a=n(257),s=n(258),u=n(235),l=(n(247),{}),c=null,d=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent
264()||e.constructor.release(e))},f=function(e){return d(e,!0)},h=function(e){return d(e,!1)},p=null,m={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n&&u(!1),(l[t]||(l[t]={}))[e]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=l[t];i&&delete i[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,i,o){for(var s,u=r.plugins,l=0;l<u.length;l++){var c=u[l];if(c){var d=c.extractEvents(e,t,n,i,o);d&&(s=a(s,d))}}return s},enqueueEvents:function(e){e&&(c=a(c,e))},processEventQueue:function(e){var t=c;c=null,s(t,e?f:h),c&&u(!1),o.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};e.exports=m},function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1||a(!1),!l.plugins[n]){t.extractEvents||a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)||a(!1)}}}function i(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)&&a(!1),l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){o(r[i],t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){l.registrationNameModules[e]&&a(!1),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(235),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s&&a(!1), 265s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]&&a(!1),u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;
265for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){for(var e in s=null,u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function i(e){return e===v.topMouseMove||e===v.topTouchMove}function o(e){return e===v.topMouseDown||e===v.topTouchStart}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=m.Mount.getNode(r),t?h.invokeGuardedCallbackWithCatch(i,n,e,r):h.invokeGuardedCallback(i,n,e,r),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)a(e,t,n[i],r[i]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;Array.isArray(t)&&p(!1);var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function d(e){return!!e._dispatchListeners}var f=n(252),h=n(256),p=n(235),m=(n(247),{Mount:null,injectMount:function(e){m.Mount=e}}),v=f.topLevelTypes,g={isEndish:r,isMoveish:i,isStartish:o,executeDirectDispatch:c,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:l,hasDispatches:d,getNode:function(e){return m.Mount.getNode(e)},getID:function(e){return m.Mount.getID(e)},injection:m};e.exports=g},function(e){"use strict";function t(e,t,i,o){try{return t(i,o)}catch(r){return void(null===n&&(n=r))}}var n=null,r={invokeGuardedCallback:t,invokeGuardedCallbackWithCatch:t,rethrowCaughtError:function(){if(n){var e=n;throw n=null,e}}};e.exports=r},function(e,t,n){"use strict";function r(e,t){if(null==t&&i(!1),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(235);e.exports=r},function(e){"use strict";var t=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=t},function(e,t,n){"use strict";function r(e){i.enqueueEvents(e),i.processEventQueue(!1)}var i=n(253),o={handleTopLevel:function(e,t,n,o,a){r(i.extractEvents(e,t,n,o,a))}};e.exports=o},function(e){"use strict";var t={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){t.currentScrollLeft=e.x,t.currentScrollTop=e.y}};e.exports=t},function(e){"use strict";function t(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i){var o=Object(i);for(var a in o)n.call(o,a)&&(t[a]=o[a])}}return t}e.exports=t},function(e,t,n){"use strict";function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(231);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=r},function(e){"use strict";var t={useCreateElement:!1};e.exports=t},function(e,t,n){"use strict";var r=n(227),i=n(261),o=(n(265),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},s=function(e,t,n,r,i,a,s){return{$$typeof:o,type:e,key:t,ref:n,props:s,_owner:a}};s.createElement=function(e,t,n){var i,o={},u=null,l=null,c=null,d=null;if(null!=t)for(i in l=void 0===t.ref?null:t.ref,u=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,d=void 0===t.__source?null:t.__source,t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(o[i]=t[i]);var f=arguments.length-2;if(1===f)o.children=n;else if(f>1){for(var h=Array(f),p=0;f>p;p++)h[p]=arguments[p+2];o.children=h}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)"undefined"==typeof o[i]&&(o[i]=m[i])}return s(e,u,l,c,d,r.current,o)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){return s(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},s.cloneAndReplaceProps=function(e,t){return s(e.type,e.key,e.ref,e._self,e._source,e._owner,t)},s.cloneElement=function(e,t,n){var o,u=i({},e.props),l=e.key,c=e.ref,d=e._self,f=e._source,h=e._owner;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref,h=r.current),void 0!==t.key&&(l=""+t.key),t)t.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(u[o]=t[o]);var p=arguments.length-2;if(1===p)u.children=n;else if(p>1){for(var m=Array(p),v=0;p>v;v++)m[v]=arguments[v+2];u.children=m}return s(e.type,l,c,d,f,h,u)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},e.exports=s},function(e){"use strict";var t=!1;e.exports=t},function(e){"use strict";function t(e){return!!i[e]}function n(e){i[e]=!0}function r(e){delete i[e]}var i={},o={isNullComponentID:t,registerNullComponentID:n,deregisterNullComponentID:r};e.exports=o},function(e,t,n){"use strict";function r(e){return h+e.toString(36)}function i(e,t){return e.charAt(t)===h||t===e.length}function o(e){return""===e||e.charAt(0)===h&&e.charAt(e.length-1)!==h}function a(e,t){return 0===t.indexOf(e)&&i(t,e.length)}function s(e){return e?e.substr(0,e.lastIndexOf(h)):""}function u(e,t){if(o(e)&&o(t)||f(!1),a(e,t)||f(!1),e===t)return e;var n;for(n=e.length+p;n<t.length&&!i(t,n);n++);return t.substr(0,n)}function l(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,a=0;n>=a;a++)if(i(e,a)&&i(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return o(s)||f(!1),s}function c(e,t,n,r,i,o){(e=e||"")===(t=t||"")&&f(!1);var l=a(t,e);l||a(e,t)||f(!1);for(var c=0,d=l?s:u,h=e;;h=d(h,t)){var p;if(i&&h===e||o&&h===t||(p=n(h,l,r)),!1===p||h===t)break;c++<m||f(!1)}}var d=n(268),f=n(235),h=".",p=h.length,m=1e4,v={createReactRootID:function(){return r(d.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===h&&e.length>1){var t=e.indexOf(h,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var o=l(e,t);o!==e&&c(e,o,n,r,!1,!0),o!==t&&c(o,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:h};e.exports=v},function(e){"use strict";var t={createReactRootIndex:null,injection:{injectCreateReactRootIndex:function(e){t.createReactRootIndex=e}}};e.exports=t},function(e){"use strict";var t={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=t},function(e,t,n){"use strict";var r=n(271),i=/\/?>/,o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(i," "+o.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=o},function(e){"use strict";function t(e){for(var t=1,r=0,i=0,o=e.length,a=-4&o;a>
265i;){for(;i<Math.min(i+4096,a);i+=4)r+=(t+=e.charCodeAt(i))+(t+=e.charCodeAt(i+1))+(t+=e.charCodeAt(i+2))+(t+=e.charCodeAt(i+3));t%=n,r%=n}for(;o>i;i++)r+=t+=e.charCodeAt(i);return(t%=n)|(r%=n)<<16}var n=65521;e.exports=t},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(273),o={mountComponent:function(e,t,n,i){var o=e.mountComponent(t,n,i);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),o},unmountComponent:function(e){i.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):o.addComponentAsRefTo(t,e,n)}function i(e,t,n){"function"==typeof e?e(null):o.removeComponentAsRefFrom(t,e,n)}var o=n(274),a={attachRefs:function(e,t){if(null!==t&&!1!==t){var n=t.ref;null!=n&&r(n,e,t._owner)}},shouldUpdateRefs:function(e,t){return null===e||!1===e||(null===t||!1===t)||t._owner!==e._owner||t.ref!==e.ref},detachRefs:function(e,t){if(null!==t&&!1!==t){var n=t.ref;null!=n&&i(n,e,t._owner)}}};e.exports=a},function(e,t,n){"use strict";var r=n(235),i={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){i.isValidOwner(n)||r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){i.isValidOwner(n)||r(!1),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=i},function(e,t,n){"use strict";function r(e){s.enqueueUpdate(e)}function i(e){var t=a.get(e);return t||null}var o=(n(227),n(264)),a=n(269),s=n(276),u=n(261),l=n(235),c=(n(247),{isMounted:function(e){var t=a.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t){"function"!=typeof t&&l(!1);var n=i(e);return n?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t&&l(!1),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");n&&((n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n))},enqueueSetProps:function(e,t){var n=i(e,"setProps");n&&c.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var n=e._topLevelWrapper;n||l(!1);var i=n._pendingElement||n._currentElement,a=i.props,s=u({},a.props,t);n._pendingElement=o.cloneAndReplaceProps(i,o.cloneAndReplaceProps(a,s)),r(n)},enqueueReplaceProps:function(e,t){var n=i(e,"replaceProps");n&&c.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var n=e._topLevelWrapper;n||l(!1);var i=n._pendingElement||n._currentElement,a=i.props;n._pendingElement=o.cloneAndReplaceProps(i,o.cloneAndReplaceProps(a,t)),r(n)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});e.exports=c},function(e,t,n){"use strict";function r(){C.ReactReconcileTransaction&&_||v(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=C.ReactReconcileTransaction.getPooled(!1)}function o(e,t,n,i,o,a){r(),_.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length&&v(!1),g.sort(a);for(var n=0;t>n;n++){var r=g[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,h.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var o=0;o<i.length;o++)e.callbackQueue.enqueue(i[o],r.getPublicInstance())}}function u(e){return r(),_.isBatchingUpdates?void g.push(e):void _.batchedUpdates(u,e)}function l(e,t){_.isBatchingUpdates||v(!1),y.enqueue(e,t),b=!0}var c=n(277),d=n(278),f=n(240),h=n(272),p=n(279),m=n(261),v=n(235),g=[],y=c.getPooled(),b=!1,_=null,x=[{initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),w()):g.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];m(i.prototype,p.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,C.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return p.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),d.addPoolingTo(i);var w=function(){for(;g.length||b;){if(g.length){var e=i.getPooled();e.perform(s,null,e),i.release(e)}if(b){b=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}},C={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:u,flushBatchedUp
265dates:w=f.measure("ReactUpdates","flushBatchedUpdates",w),injection:{injectReconcileTransaction:function(e){e||v(!1),C.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||v(!1),"function"!=typeof e.batchedUpdates&&v(!1),"boolean"!=typeof e.isBatchingUpdates&&v(!1),_=e}},asap:l};e.exports=C},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var i=n(278),o=n(261),a=n(235);o(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length&&a(!1),this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(235),i=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e){var t=this;e instanceof t||r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},a=10,s=i,u={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||s,n.poolSize||(n.poolSize=a),n.release=o,n},oneArgumentPooler:i,twoArgumentPooler:function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},threeArgumentPooler:function(e,t,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n),i}return new r(e,t,n)},fourArgumentPooler:function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},fiveArgumentPooler:function(e,t,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r,i),a}return new o(e,t,n,r,i)}};e.exports=u},function(e,t,n){"use strict";var r=n(235),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,i,o,a,s,u){var l,c;this.isInTransaction()&&r(!1);try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,i,o,a,s,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(e){this.isInTransaction()||r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,a=t[n],s=this.wrapperInitData[n];try{i=!0,s!==o.OBSERVED_ERROR&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(u){}}}this.wrapperInitData.length=0}},o={Mixin:i,OBSERVED_ERROR:{}};e.exports=o},function(e){"use strict";var t={};e.exports=t},function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,o=t;if(n=!1,r&&o){if(r===o)return!0;if(i(r))return!1;if(i(o)){e=r,t=o.parentNode,n=!0;continue e}return r.contains?r.contains(o):!!r.compareDocumentPosition&&!!(16&r.compareDocumentPosition(o))}return!1}}var i=n(282);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(283);e.exports=r},function(e){"use strict";function t(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=t},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||!1===e)t=new a(i);else if("object"==typeof e){var n=e;(!n||"function"!=typeof n.type&&"string"!=typeof n.type)&&l(!1),t="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var o=n(285),a=n(290),s=n(291),u=n(261),l=n(235),c=(n(247),function(){});u(c.prototype,o.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(){}var o=n(286),a=n(227),s=n(264),u=n(269),l=n(240),c=n(287),d=(n(288),n(272)),f=n(275),h=n(261),p=n(280),m=n(235),v=n(289);n(247),i.prototype.render=function(){return(0,u.get(this)._currentElement.type)(this.props,this.context,this.updater)};var g=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=g++,this._rootNodeID=e;var r,o,a=this._processProps(this._currentElement.props),l=this._processContext(n),c=this._currentElement.type,h="prototype"in c;h&&(r=new c(a,l,f)),h&&null!==r&&!1!==r&&!s.isValidElement(r)||(o=r,r=new i(c)),r.props=a,r.context=l,r.refs=p,r.updater=f,this._instance=r,u.set(r,this);var v=r.state;void 0===v&&(r.state=v=null),("object"!=typeof v||Array.isArray(v))&&m(!1),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===o&&(o=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(o);var y=d.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),d.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,u.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type.contextTypes;if(!n)return p;for(var r in t={},n)t[r]=e[r];return t},_processContext:function(e){return this._maskContext(e)},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){for(var i in"object"!=typeof t.childContextTypes&&m(!1),r)i in t.childContextTypes||m(!1);return h({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var i=this.getName();for(var o in e)if(e.hasOwnProperty(o)){var a;try{"function"!=typeof e[o]&&m(!1),a=e[o](t,o,i,n)}catch(s){a=s}a instanceof Error&&(r(this),c.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,r,e,i,n)}
265,performUpdateIfNecessary:function(e){null!=this._pendingElement&&d.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,i){var o,a=this._instance,s=this._context===i?a.context:this._processContext(i);t===n?o=n.props:(o=this._processProps(n.props),a.componentWillReceiveProps&&a.componentWillReceiveProps(o,s));var u=this._processPendingState(o,s);this._pendingForceUpdate||!a.shouldComponentUpdate||a.shouldComponentUpdate(o,u,s)?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,o,u,s,e,i)):(this._currentElement=n,this._context=i,a.props=o,a.state=u,a.context=s)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=h({},i?r[0]:n.state),a=i?1:0;a<r.length;a++){var s=r[a];h(o,"function"==typeof s?s.call(n,o,e,t):s)}return o},_performComponentUpdate:function(e,t,n,r,i,o){var a,s,u,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(a=l.props,s=l.state,u=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=o,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(i,o),c&&i.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,a,s,u),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,i=this._renderValidatedComponent();if(v(r,i))d.receiveComponent(n,i,e,this._processChildContext(t));else{var o=this._rootNodeID,a=n._rootNodeID;d.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i);var s=d.mountComponent(this._renderedComponent,o,e,this._processChildContext(t));this._replaceNodeWithMarkupByID(a,s)}},_replaceNodeWithMarkupByID:function(e,t){o.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){return this._instance.render()},_renderValidatedComponent:function(){var e;a.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{a.current=null}return null===e||!1===e||s.isValidElement(e)||m(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n&&m(!1);var r=t.getPublicInstance();(n.refs===p?n.refs={}:n.refs)[e]=r},detachRef:function(e){delete this.getPublicInstance().refs[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof i?null:e},_instantiateReactComponent:null};l.measureMethods(y,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var b={Mixin:y};e.exports=b},function(e,t,n){"use strict";var r=n(235),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i&&r(!1),o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";var r=n(239)({prop:null,context:null,childContext:null});e.exports=r},function(e){"use strict";var t={};e.exports=t},function(e){"use strict";function t(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=t},function(e,t,n){"use strict";var r,i=n(264),o=n(266),a=n(272),s={injectEmptyComponent:function(e){r=i.createElement(e)}},u=function(e){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=e(r)};n(261)(u.prototype,{construct:function(){},mountComponent:function(e,t,n){return o.registerNullComponentID(e),this._rootNodeID=e,a.mountComponent(this._renderedComponent,e,t,n)},receiveComponent:function(){},unmountComponent:function(){a.unmountComponent(this._renderedComponent),o.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),u.injection=s,e.exports=u},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=d[t];return null==n&&(d[t]=n=l(t)),n}function i(e){return c||u(!1),new c(e.type,e.props)}function o(e){return new f(e)}function a(e){return e instanceof f}var s=n(261),u=n(235),l=null,c=null,d={},f=null,h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:{injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){s(d,e)}}};e.exports=h},function(e,t,n){"use strict";var r=(n(261),n(237)),i=(n(247),r);e.exports=i},function(e,t,n){"use strict";function r(){S||(S=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(b),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:u,ChangeEventPlugin:o,SelectEventPlugin:x,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(p),g.NativeComponent.injectTextComponentClass(m),g.Class.injectMixin(d),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(k),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(h),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:w.createReactRootIndex),g.Component.injectEnvironment(f))}var i=n(294),o=n(302),a=n(305),s=n(306),u=n(307),l=n(231),c=n(311),d=n(312),f=n(248),h=n(314),p=n(315),m=n(228),v=n(340),g=n(343),y=n(267),b=n(250),_=n(347),x=n(352),w=n(353),C=n(354),k=n(363),S=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){var e=window.opera;
265return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function i(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case T.topCompositionStart:return P.compositionStart;case T.topCompositionEnd:return P.compositionEnd;case T.topCompositionUpdate:return P.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===x}function s(e,t){switch(e){case T.topKeyUp:return-1!==_.indexOf(t.keyCode);case T.topKeyDown:return t.keyCode!==x;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r,i){var l,c;if(w?l=o(e):N?s(e,r)&&(l=P.compositionEnd):a(e,r)&&(l=P.compositionStart),!l)return null;S&&(N||l!==P.compositionStart?l===P.compositionEnd&&N&&(c=N.getData()):N=v.getPooled(t));var d=g.getPooled(l,n,r,i);if(c)d.data=c;else{var f=u(r);null!==f&&(d.data=f)}return p.accumulateTwoPhaseDispatches(d),d}function c(e,t){switch(e){case T.topCompositionEnd:return u(t);case T.topKeyPress:return t.which!==j?null:($=!0,E);case T.topTextInput:var n=t.data;return n===E&&$?null:n;default:return null}}function d(e,t){if(N){if(e===T.topCompositionEnd||s(e,t)){var n=N.getData();return v.release(N),N=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!i(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return S?null:t.data;default:return null}}function f(e,t,n,r,i){var o;if(!(o=k?c(e,r):d(e,r)))return null;var a=y.getPooled(P.beforeInput,n,r,i);return a.data=o,p.accumulateTwoPhaseDispatches(a),a}var h=n(252),p=n(295),m=n(231),v=n(296),g=n(298),y=n(300),b=n(301),_=[9,13,27,32],x=229,w=m.canUseDOM&&"CompositionEvent"in window,C=null;m.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var k=m.canUseDOM&&"TextEvent"in window&&!C&&!r(),S=m.canUseDOM&&(!w||C&&C>8&&11>=C),j=32,E=String.fromCharCode(j),T=h.topLevelTypes,P={beforeInput:{phasedReg
265istrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},$=!1,N=null,R={eventTypes:P,extractEvents:function(e,t,n,r,i){return[l(e,t,n,r,i),f(e,t,n,r,i)]}};e.exports=R},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function i(e,t,n){var i=r(e,n,t?g.bubbled:g.captured);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchIDs=m(n._dispatchIDs,e))}
265function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,i,e)}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,i,e)}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=y(e,r);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchIDs=m(n._dispatchIDs,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e.dispatchMarker,null,e)}function l(e){v(e,o)}function c(e){v(e,a)}function d(e,t,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,s,e,t)}function f(e){v(e,u)}var h=n(252),p=n(253),m=(n(247),n(257)),v=n(258),g=h.PropagationPhases,y=p.getListener,b={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:d};e.exports=b},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var i=n(278),o=n(261),a=n(297);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(e=0;r>e&&n[e]===i[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===i[o-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(231),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(299),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;this.isDefaultPrevented=u?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var i=n(278),o=n(261),a=n(237),s=(n(247),{type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent 266;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);o(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(299),o={data:null};i.augmentClass(r,o),e.exports=r},function(e){"use strict";var t=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=t},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=C.getPooled(P.change,N,e,k(e));_.accumulateTwoPhaseDispatches(t),w.batchedUpdates(o,t)}function o(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){N=t,($=e).attachEvent("onchange",i)}function s(){$&&($.detachEvent("onchange",i),$=null,N=null)}function u(e,t,n){return e===T.topChange?n:void 0}function l(e,t,n){e===T.topFocus?(s(),a(t,n)):e===T.topBlur&&s()}function c(e,t){$=e,N=t,R=e.value,M=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty($,"value",I),$.attachEvent("onpropertychange",f)}function d(){$&&(delete $.value,$.detachEvent("onpropertychange",f),$=null,N=null,R=null,M=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,i(e))}}function h(e,t,n){return e===T.topInput?n:void 0}function p(e,t,n){e===T.topFocus?(d(),c(t,n)):e===T.topBlur&&d()}function m(e){return e!==T.topSelectionChange&&e!==T.topKeyUp&&e!==T.topKeyDown||!$||$.value===R?void 0:(R=$.value,N)}
266function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===T.topClick?n:void 0}var y=n(252),b=n(253),_=n(295),x=n(231),w=n(276),C=n(299),k=n(303),S=n(262),j=n(304),E=n(301),T=y.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:E({onChange:null}),captured:E({onChangeCapture:null})},dependencies:[T.topBlur,T.topChange,T.topClick,T.topFocus,T.topInput,T.topKeyDown,T.topKeyUp,T.topSelectionChange]}},$=null,N=null,R=null,M=null,D=!1;x.canUseDOM&&(D=S("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;x.canUseDOM&&(A=S("input")&&(!("documentMode"in document)||document.documentMode>9));var I={get:function(){return M.get.call(this)},set:function(e){R=""+e,M.set.call(this,e)}},O={eventTypes:P,extractEvents:function(e,t,n,i,o){var a,s;if(r(t)?D?a=u:s=l:j(t)?A?a=h:(a=m,s=p):v(t)&&(a=g),a){var c=a(e,t,n);if(c){var d=C.getPooled(P.change,c,i,o);return d.type="change",_.accumulateTwoPhaseDispatches(d),d}}s&&s(e,t,n)}};e.exports=O},function(e){"use strict";function t(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=t},function(e){"use strict";function t(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&n[e.type]||"textarea"===t)}var n={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=t},function(e){"use strict";var t=0,n={createReactRootIndex:function(){return t++}};e.exports=n},function(e,t,n){"use strict";var r=n(301),i=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=i},function(e,t,n){"use strict";var r=n(252),i=n(295),o=n(308),a=n(250),s=n(301),u=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},d=[null,null],f={eventTypes:c,extractEvents:function(e,t,n,r,s){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var f;if(t.window===t)f=t;else{var h=t.ownerDocument;f=h?h.defaultView||h.parentWindow:window}var p,m,v="",g="";if(e===u.topMouseOut?(p=t,v=n,(m=l(r.relatedTarget||r.toElement))?g=a.getID(m):m=f,m=m||f):(p=f,m=t,g=n),p===m)return null;var y=o.getPooled(c.mouseLeave,v,r,s);y.type="mouseleave",y.target=p,y.relatedTarget=m;var b=o.getPooled(c.mouseEnter,g,r,s);return b.type="mouseenter",b.target=m,b.relatedTarget=p,i.accumulateEnterLeaveDispatches(y,b,v,g),d[0]=y,d[1]=b,d}};e.exports=f},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(309),o=n(260),a={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:n(310),button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};i.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(299),o=n(303),a={view:function(e){if(e.view)return e.view;var t=o(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};i.augmentClass(r,a),e.exports=r},function(e){"use strict";function t(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}function n(){return t}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=n},function(e,t,n){"use strict";var r,i=n(245),o=n(231),a=i.injection.MUST_USE_ATTRIBUTE,s=i.injection.MUST_USE_PROPERTY,u=i.injection.HAS_BOOLEAN_VALUE,l=i.injection.HAS_SIDE_EFFECTS,c=i.injection.HAS_NUMERIC_VALUE,d=i.injection.HAS_POSITIVE_NUMERIC_VALUE,f=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
266if(o.canUseDOM){var h=document.implementation;r=h&&h.hasFeature&&h.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var p={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,capture:a|u,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|u,classID:a,className:r?a:s,cols:a|d,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,"default":u,defer:u,dir:null,disabled:a|u,download:f,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|u,muted:s|u,name:null,nonce:a,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,reversed:u,role:a,rows:a|d,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|d,sizes:a,span:d,spellCheck:null,src:null,
266srcDoc:s,srcLang:null,srcSet:a,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:a,autoCorrect:a,autoSave:null,color:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=p},function(e,t,n){"use strict";var r=(n(269),n(313)),i=(n(247),"_getDOMNodeDidWarn"),o={getDOMNode:function(){return this.constructor[i]=!0,r(this)}};e.exports=o},function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:i.has(e)?o.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render&&a(!1),void a(!1))}var i=(n(227),n(269)),o=n(250),a=n(235);n(247),e.exports=r},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(276),o=n(279),a=n(261),s=n(237),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l=[{initialize:s,close:i.flushBatchedUpdates.bind(i)},u];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var c=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,i,o):c.perform(e,null,t,n,r,i,o)}};e.exports=d},function(e,t,n){"use strict";function r(){return this}function i(){return!!this._reactInternalComponent}function o(){}function a(e,t){var n=this._reactInternalComponent;n&&(R.enqueueSetPropsInternal(n,e),t&&R.enqueueCallbackInternal(n,t))}function s(e,t){var n=this._reactInternalComponent;n&&(R.enqueueReplacePropsInternal(n,e),t&&R.enqueueCallbackInternal(n,t))}function u(e,t){t&&(null!=t.dangerouslySetInnerHTML&&(null!=t.children&&I(!1),"object"==typeof t.dangerouslySetInnerHTML&&V in t.dangerouslySetInnerHTML||I(!1)),null!=t.style&&"object"!=typeof t.style&&I(!1))}function l(e,t,n,r){var i=P.findReactContainerForID(e);if(i){var o=i.nodeType===K?i.ownerDocument:i;B(t,o)}r.getReactMountReady().enqueue(c,{id:e,registrationName:t,listener:n})}function c(){var e=this;w.putListener(e.id,e.registrationName,e.listener)}function d(){var e=this;e._rootNodeID||I(!1);var t=P.getNode(e._rootNodeID);switch(t||I(!1),e._tag){case"iframe":e._wrapperState.listeners=[w.trapBubbledEvent(x.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":for(var n in e._wrapperState.listeners=[],Q)Q.hasOwnProperty(n)&&e._wrapperState.listeners.push(w.trapBubbledEvent(x.topLevelTypes[n],Q[n],t));break;case"img":e._wrapperState.listeners=[w.trapBubbledEvent(x.topLevelTypes.topError,"error",t),w.trapBubbledEvent(x.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[w.trapBubbledEvent(x.topLevelTypes.topReset,"reset",t),w.trapBubbledEvent(x.topLevelTypes.topSubmit,"submit",t)]}}function f(){S.mountReadyWrapper(this)}function h(){E.postUpdateWrapper(this)}function p(e){Z.call(J,e)||(X.test(e)||I(!1),J[e]=!0)}function m(e,t){return e.indexOf("-")>=0||null!=t.is}function v(e){p(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=n(316),y=n(318),b=n(245),_=n(244),x=n(252),w=n(251),C=n(248),k=n(326),S=n(327),j=n(331),E=n(334),T=n(335),P=n(250),$=n(336),N=n(240),R=n(275),M=n(261),D=n(265),A=n(243),I=n(235),O=(n(262),n(301)),F=n(241),L=n(242),H=(n(339),n(292),n(247),w.deleteListener),B=w.listenTo,U=w.registrationNameModules,q={string:!0,number:!0},z=O({children:null}),W=O({style:null}),V=O({__html:null}),K=1,Q={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},X=(M({menuitem:!0},G),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),J={},Z={}.hasOwnProperty;v.displayName="ReactDOMComponent",v.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r,i=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(d,this);break;case"button":i=k.getNativeProps(this,i,n);break;case"input":S.mountWrapper(this,i,n),i=S.getNativeProps(this,i,n);break;case"option":j.mountWrapper(this,i,n),i=j.getNativeProps(this,i,n);break;case"select":E.mountWrapper(this,i,n),i=E.getNativeProps(this,i,n),n=E.processChildContext(this,i,n);break;case"textarea":T.mountWrapper(this,i,n),i=T.getNativeProps(this,i,n)}if(u(this,i),t.useCreateElement){var o=n[P.ownerDocumentContextKey].createElement(this._currentElement.type);_.setAttributeForID(o,this._rootNodeID),P.getID(o),this._updateDOMProperties({},i,t,o),this._createInitialChildren(t,i,n,o),r=o}else{var a=this._createOpenTagMarkupAndPutListeners(t,i),s=this._createContentMarkup(t,i,n);r=!s&&G[this._tag]?a+"/>":a+">"+s+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(f,this);case"button":case"select":case"textarea":i.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return r},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];
266if(null!=i)if(U.hasOwnProperty(r))i&&l(this._rootNodeID,r,i,e);else{r===W&&(i&&(i=this._previousStyleCopy=M({},t.style)),i=y.createMarkupForStyles(i));var o=null;null!=this._tag&&m(this._tag,t)?r!==z&&(o=_.createMarkupForCustomAttribute(r,i)):o=_.createMarkupForProperty(r,i),o&&(n+=" "+o)}}return e.renderToStaticMarkup?n:n+" "+_.createMarkupForID(this._rootNodeID)},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=q[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=A(o);else if(null!=a){r=this.mountChildren(a,e,n).join("")}}return Y[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&F(r,i.__html);else{var o=q[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)L(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u<s.length;u++)r.appendChild(s[u])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var i=t.props,o=this._currentElement.props;switch(this._tag){case"button":i=k.getNativeProps(this,i),o=k.getNativeProps(this,o);break;case"input":S.updateWrapper(this),i=S.getNativeProps(this,i),o=S.getNativeProps(this,o);break;case"option":i=j.getNativeProps(this,i),o=j.getNativeProps(this,o);break;case"select":i=E.getNativeProps(this,i),o=E.getNativeProps(this,o);break;case"textarea":T.updateWrapper(this),i=T.getNativeProps(this,i),o=T.getNativeProps(this,o)}u(this,o),this._updateDOMProperties(i,o,e,null),this._updateDOMChildren(i,o,e,r),!D&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=o),"select"===this._tag&&e.getReactMountReady().enqueue(h,this)},_updateDOMProperties:function(e,t,n,r){var i,o,a;for(i in e)if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i))if(i===W){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&((a=a||{})[o]="");this._previousStyleCopy=null}else U.hasOwnProperty(i)?e[i]&&H(this._rootNodeID,i):(b.properties[i]||b.isCustomAttribute(i))&&(r||(r=P.getNode(this._rootNodeID)),_.deleteValueForProperty(r,i));for(i in t){var u=t[i],c=i===W?this._previousStyleCopy:e[i];if(t.hasOwnProperty(i)&&u!==c)if(i===W)if(u?u=this._previousStyleCopy=M({},u):this._previousStyleCopy=null,c){for(o in c)!c.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||((a=a||{})[o]="");for(o in u)u.hasOwnProperty(o)&&c[o]!==u[o]&&((a=a||{})[o]=u[o])}else a=u;else U.hasOwnProperty(i)?u?l(this._rootNodeID,i,u,n):c&&H(this._rootNodeID,i):m(this._tag,t)?(r||(r=P.getNode(this._rootNodeID)),i===z&&(u=null),_.setValueForAttribute(r,i,u)):(b.properties[i]||b.isCustomAttribute(i))&&(r||(r=P.getNode(this._rootNodeID)),null!=u?_.setValueForProperty(r,i,u):_.deleteValueForProperty(r,i))}a&&(r||(r=P.getNode(this._rootNodeID)),y.setValueForStyles(r,a))},_updateDOMChildren:function(e,t,n,r){var i=q[typeof e.children]?e.children:null,o=q[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=null!=i?null:e.children,l=null!=o?null:t.children,c=null!=i||null!=a,d=null!=o||null!=s;null!=u&&null==l?this.updateChildren(null,n,r):c&&!d&&this.updateTextContent(""),null!=o?i!==o&&this.updateTextContent(""+o):null!=s?a!==s&&this.updateMarkup(""+s):null!=l&&this.updateChildren(l,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var e=this._wrapperState.listeners;if(e)for(var t=0;t<e.length;t++)e[t].remove();break;case"input":S.unmountWrapper(this);break;case"html":case"head":case"body":I(!1)}(this.unmountChildren(),w.deleteAllListeners(this._rootNodeID),C.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties)&&(this._nodeWithLegacyProperties._reactInternalComponent=null,this._nodeWithLegacyProperties=null)},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=P.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=r,e.isMounted=i,e.setState=o,e.replaceState=o,e.forceUpdate=o,e.setProps=a,e.replaceProps=s,e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},N.measureMethods(v,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),M(v.prototype,v.Mixin,$.Mixin),e.exports=v},function(e,t,n){"use strict";var r=n(250),i=n(313),o=n(317),a={Mixin:{componentDidMount:function(){this.props.autoFocus&&o(i(this))}},focusDOMComponent:function(){o(r.getNode(this._rootNodeID))}};e.exports=a},function(e){"use strict";function t(e){try{e.focus()}catch(t){}}e.exports=t},function(e,t,n){"use strict";var r=n(319),i=n(231),o=n(240),a=(n(320),n(322)),s=n(323),u=n(325),l=(n(247),u(function(e){return s(e)})),c=!1,d="cssFloat";if(i.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(p){c=!0}void 0===document.documentElement.style.cssFloat&&(d="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=a(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=a(i,t[i]);if("float"===i&&(i=d),o)n[i]=o;else{var s=c&&r.shorthandPropertyExpansions[i];if(s)for(var u in s)n[u]="";else n[i]=""}}}};o.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=h},function(e){"use strict";function t(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];
266Object.keys(n).forEach(function(e){r.forEach(function(r){n[t(r,e)]=n[e]})});var i={isUnitlessNumber:n,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}};e.exports=i},function(e,t,n){"use strict";function r(e){return i(e.replace(o,"ms-"))}var i=n(321),o=/^-ms-/;e.exports=r},function(e){"use strict";function t(e){return e.replace(n,function(e,t){return t.toUpperCase()})}var n=/-(.)/g;e.exports=t},function(e,t,n){"use strict";function r(e,t){return null==t||"boolean"==typeof t||""===t?"":isNaN(t)||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var i=n(319).isUnitlessNumber;e.exports=r},function(e,t,n){"use strict";function r(e){return i(e).replace(o,"-ms-")}var i=n(324),o=/^ms-/;e.exports=r},function(e){"use strict";function t(e){return e.replace(n,"-$1").toLowerCase()}var n=/([A-Z])/g;e.exports=t},function(e){"use strict";function t(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=t},function(e){"use strict";var t={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},n={getNativeProps:function(e,n){if(!n.disabled)return n;var r={};for(var i in n)n.hasOwnProperty(i)&&!t[i]&&(r[i]=n[i]);return r}};e.exports=n},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);u.asap(r,this);var i=t.name;if("radio"===t.type&&null!=i){for(var o=s.getNode(this._rootNodeID),l=o;l.parentNode;)l=l.parentNode;for(var f=l.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),h=0;h<f.length;h++){var p=f[h];if(p!==o&&p.form===o.form){var m=s.getID(p);m||c(!1);var v=d[m];v||c(!1),u.asap(r,v)}}}return n}var o=n(249),a=n(328),s=n(250),u=n(276),l=n(261),c=n(235),d={},f={getNativeProps:function(e,t){var n=a.getValue(t),r=a.getChecked(t);return l({},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,onChange:i.bind(e)}},mountReadyWrapper:function(e){d[e._rootNodeID]=e},unmountWrapper:function(e){delete d[e._rootNodeID]},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&o.updatePropertyByID(e._rootNodeID,"checked",n||!1);var r=a.getValue(t);null!=r&&o.updatePropertyByID(e._rootNodeID,"value",""+r)}};e.exports=f},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink&&l(!1)}function i(e){r(e),(null!=e.value||null!=e.onChange)&&l(!1)}function o(e){r(e),(null!=e.checked||null!=e.onChange)&&l(!1)}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(329),u=n(287),l=n(235),c=(n(247),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},f={},h={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var i=d[r](t,r,e,u.prop);i instanceof Error&&!(i.message in f)&&(f[i.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(o(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(o(e),e.checkedLink.requestChange(t.target.checked)):e.onCh
266ange?e.onChange.call(void 0,t):void 0}};e.exports=h},function(e,t,n){"use strict";function r(e){function t(t,n,r,i,o,a){if(i=i||w,a=a||r,null==n[r]){var s=b[o];return t?new Error("Required "+s+" `"+a+"` was not specified in `"+i+"`."):null}return e(n,r,i,o,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,i,o){var a=t[n];if(m(a)!==e){var s=b[i],u=v(a);return new Error("Invalid "+s+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected `"+e+"`.")}return null}return r(t)}function o(){return r(_.thatReturns(null))}function a(e){function t(t,n,r,i,o){var a=t[n];if(!Array.isArray(a)){var s=b[i],u=m(a);return new Error("Invalid "+s+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected an array.")}for(var l=0;l<a.length;l++){var c=e(a,l,r,i,o+"["+l+"]");if(c instanceof Error)return c}return null}return r(t)}function s(){function e(e,t,n,r,i){if(!y.isValidElement(e[t])){var o=b[r];return new Error("Invalid "+o+" `"+i+"` supplied to `"+n+"`, expected a single ReactElement.")}return null}return r(e)}function u(e){function t(t,n,r,i,o){if(!(t[n]instanceof e)){var a=b[i],s=e.name||w,u=g(t[n]);return new Error("Invalid "+a+" `"+o+"` of type `"+u+"` supplied to `"+r+"`, expected instance of `"+s+"`.")}return null}return r(t)}function l(e){function t(t,n,r,i,o){for(var a=t[n],s=0;s<e.length;s++)if(a===e[s])return null;var u=b[i],l=JSON.stringify(e);return new Error("Invalid "+u+" `"+o+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+l+".")}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if("object"!==s){var u=b[i];return new Error("Invalid "+u+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected an object.")}for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,i,o+"."+l);if(c instanceof Error)return c}return null}return r(t)}function d(e){function t(t,n,r,i,o){for(var a=0;a<e.length;a++){if(null==(0,e[a])(t,n,r,i,o))return null}var s=b[i];return new Error("Invalid "+s+" `"+o+"` supplied to `"+r+"`.")}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function f(){function e(e,t,n,r,i){if(!p(e[t])){var o=b[r];return new Error("Invalid "+o+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return null}return r(e)}function h(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if("object"!==s){var u=b[i];return new Error("Invalid "+u+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.")}for(var l in e){var c=e[l];if(c){var d=c(a,l,r,i,o+"."+l);if(d)return d}}return null}return r(t)}function p(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(p);if(null===e||y.isValidElement(e))return!0;var t=x(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!p(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!p(i[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function v(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var y=n(264),b=n(288),_=n(237),x=n(330),w="<<anonymous>>",C={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:u,node:f(),objectOf:c,oneOf:l,oneOfType:d,shape:h};e.exports=C},function(e){"use strict";function t(e){var t=e&&(n&&e[n]||e[r]);return"function"==typeof t?t:void 0}var n="function"==typeof Symbol&&Symbol.iterator,r="@@iterator";e.exports=t},function(e,t,n){"use strict";var r=n(332),i=n(334),o=n(261),a=(n(247),i.valueContextKey),s={mountWrapper:function(e,t,n){var r=n[a],i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var o=0;o<r.length;o++)if(""+r[o]==""+t.value){i=!0;break}}else i=""+r==""+t.value;e._wrapperState={selected:i}},getNativeProps:function(e,t){var n=o({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i="";return r.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(i+=e))}),i&&(n.children=i),n}};e.exports=s},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"//")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t){var n=e.func,r=e.context;n.call(r,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);g(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?l(u,i,n,v.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,o+(u!==t?r(u.key||"")+"/":"")+n)),i.push(u))}function l(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var l=s.getPooled(t,a,i,o);g(e,u,l),s.release(l)}
266function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function d(){return null}function f(e){return g(e,d,null)}function h(e){var t=[];return l(e,t,null,v.thatReturnsArgument),t}var p=n(278),m=n(264),v=n(237),g=n(333),y=p.twoArgumentPooler,b=p.fourArgumentPooler,_=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},p.addPoolingTo(i,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},p.addPoolingTo(s,b);var x={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:f,toArray:h};e.exports=x},function(e,t,n){"use strict";function r(e){return m[e]}function i(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function o(e){return(""+e).replace(v,r)}function a(e){return"$"+o(e)}function s(e,t,n,r){var o=typeof e;if("undefined"!==o&&"boolean"!==o||(e=null),null===e||"string"===o||"number"===o||l.isValidElement(e))return n(r,e,""===t?h+i(e,0):t),1;var u,c=0,m=""===t?h:t+p;if(Array.isArray(e))for(var v=0;v<e.length;v++)c+=s(u=e[v],m+i(u,v),n,r);else{var g=d(e);if(g){var y,b=g.call(e);if(g!==e.entries)for(var _=0;!(y=b.next()).done;)c+=s(u=y.value,m+i(u,_++),n,r);else for(;!(y=b.next()).done;){var x=y.value;x&&(c+=s(u=x[1],m+a(x[0])+p+i(u,0),n,r))}}else"object"===o&&(String(e),f(!1))}return c}function u(e,t,n){return null==e?0:s(e,"",t,n)}var l=(n(227),n(264)),c=n(267),d=n(330),f=n(235),h=(n(247),c.SEPARATOR),p=":",m={"=":"=0",".":"=1",":":"=2"},v=/[=.:]/g;e.exports=u},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=a.getValue(e);null!=t&&i(this,Boolean(e.multiple),t)}}function i(e,t,n){var r,i,o=s.getNode(e._rootNodeID).options;if(t){for(r={},i=0;i<n.length;i++)r[""+n[i]]=!0;for(i=0;i<o.length;i++){var a=r.hasOwnProperty(o[i].value);o[i].selected!==a&&(o[i].selected=a)}}else{for(r=""+n,i=0;i<o.length;i++)if(o[i].value===r)return void(o[i].selected=!0);o.length&&(o[0].selected=!0)}}function o(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);return this._wrapperState.pendingUpdate=!0,u.asap(r,this),n}var a=n(328),s=n(250),u=n(276),l=n(261),c=(n(247),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2)),d={valueContextKey:c,getNativeProps:function(e,t){return l({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=a.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,onChange:o.bind(e),wasMultiple:Boolean(t.multiple)}},processChildContext:function(e,t,n){var r=l({},n) 267;return r[c]=e._wrapperState.initialValue,r},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=a.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,i(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?i(e,Boolean(t.multiple),t.defaultValue):i(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=d},function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=o.executeOnChange(t,e);return s.asap(r,this),n}var o=n(328),a=n(249),s=n(276),u=n(261),l=n(235),c=(n(247),{getNativeProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&l(!1),u({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n&&l(!1),Array.isArray(r)&&(r.length<=1||l(!1),r=r[0]),n=""+r),null==n&&(n="");var a=o.getValue(t);e._wrapperState={initialValue:""+(null!=a?a:n),onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=o.getValue(t);null!=n&&a.updatePropertyByID(e._rootNodeID,"value",""+n)}});e.exports=c},function(e,t,n){"use strict";function r(e,t,n){v.push({parentID:e,parentNode:null,type:d.INSERT_MARKUP,markupIndex:g.push(t)-1,content:null,fromIndex:null,toIndex:n})}function i(e,t,n){v.push({parentID:e,parentNode:null,type:d.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:t,toIndex:n})}function o(e,t){v.push({parentID:e,parentNode:null,type:d.REMOVE_NODE,markupIndex:null,content:null,fromIndex:t,toIndex:null})}function a(e,t){v.push({parentID:e,parentNode:null,type:d.SET_MARKUP,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function s(e,t){v.push({parentID:e,parentNode:null,type:d.TEXT_CONTENT,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function u(){v.length&&(c.processChildrenUpdates(v,g),l())}function l(){v.length=0,g.length=0}var c=n(286),d=n(238),f=(n(227),n(272)),h=n(337),p=n(338),m=0,v=[],g=[],y={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n
267)},_reconcilerUpdateChildren:function(e,t,n,r){var i;return i=p(t),h.updateChildren(e,i,n,r)},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,l=f.mountComponent(s,u,t,n);s._mountIndex=o++,i.push(l)}return i},updateTextContent:function(e){m++;var t=!0;try{var n=this._renderedChildren;for(var r in h.unmountChildren(n),n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(e),t=!1}finally{--m||(t?l():u())}},updateMarkup:function(e){m++;var t=!0;try{var n=this._renderedChildren;for(var r in h.unmountChildren(n),n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(e),t=!1}finally{--m||(t?l():u())}},updateChildren:function(e,t,n){m++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{--m||(r?l():u())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,i=this._reconcilerUpdateChildren(r,e,t,n);if(this._renderedChildren=i,i||r){var o,a=0,s=0;for(o in i)if(i.hasOwnProperty(o)){var u=r&&r[o],l=i[o];u===l?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChild(u)),this._mountChildByNameAtIndex(l,o,s,t,n)),s++}for(o in r)!r.hasOwnProperty(o)||i&&i.hasOwnProperty(o)||this._unmountChild(r[o])}},unmountChildren:function(){var e=this._renderedChildren;h.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&i(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){o(this._rootNodeID,e._mountIndex)},setTextContent:function(e){s(this._rootNodeID,e)},setMarkup:function(e){a(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,i){var o=this._rootNodeID+t,a=f.mountComponent(e,o,r,i);e._mountIndex=n,this.createChild(e,a)},_unmountChild:function(e){this.removeChild(e),e._mountIndex=null}}};e.exports=y},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=o(t,null))}var i=n(272),o=n(284),a=n(289),s=n(333),u=(n(247),{instantiateChildren:function(e){if(null==e)return null;var t={};return s(e,r,t),t},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var s;for(s in t)if(t.hasOwnProperty(s)){var u=e&&e[s],l=u&&u._currentElement,c=t[s];if(null!=u&&a(l,c))i.receiveComponent(u,c,n,r),t[s]=u;else{u&&i.unmountComponent(u,s);var d=o(c,null);t[s]=d}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||i.unmountComponent(e[s]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];i.unmountComponent(n)}}});e.exports=u},function(e,t,n){"use strict";function r(e,t,n){var r=e;void 0===r[n]&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return o(e,r,t),t}var o=n(333);n(247),e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var o=n.bind(t),a=0;a<r.length;a++)if(!o(r[a])||e[r[a]]!==t[r[a]])return!1;return!0}var n=Object.prototype.hasOwnProperty;e.exports=t},function(e,t,n){"use strict";function r(e){var t=f.getID(e),n=d.getReactRootIDFromNodeID(t),r=f.findReactContainerForID(n);return f.getFirstReactDOM(r)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){a(e)}function a(e){for(var t=f.getFirstReactDOM(m(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var i=0;i<e.ancestors.length;i++){t=e.ancestors[i];var o=f.getID(t)||"";g._handleTopLevel(e.topLevelType,t,o,e.nativeEvent,m(e.nativeEvent))}}function s(e){e(v(window))}var u=n(341),l=n(231),c=n(278),d=n(267),f=n(250),h=n(276),p=n(261),m=n(303),v=n(342);p(i.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(i,c.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?u.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?u.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=s.bind(null,e);u.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=i.getPooled(e,t);try{h.batchedUpdates(o,n)}finally{i.release(n)}}}};e.exports=g},function(e,t,n){"use strict";var r=n(237),i={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=i},function(e){"use strict";function t(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=t},function(e,t,n){"use strict";var r=n(245),i=n(253),o=n(286),a=n(344),s=n(290),u=n(251),l=n(291),c=n(240),d=n(268),f=n(276),h={Component:o.injection,Class:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:i.injection,EventEmitter:u.injection,NativeComponent:l.injection,Perf:c.injection,RootIndex:d.injection,Updates:f.injection};e.exports=h},function(e,t,n){"use strict";function r(e,t){var n=w.hasOwnProperty(t)?w[t]:null;k.hasOwnProperty(t)&&n!==_.OVERRIDE_BASE&&v(!1),e.hasOwnProperty(t)&&n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED&&v(!1)}function i(e,t){if(t){"function"==typeof t&&v(!1),f.isValidElement(t)&&v(!1);var n=e.prototype;for(var i in t.hasOwnProperty(b)&&C.mixins(e,t.mixins),t)if(t.hasOwnProperty(i)&&i!==b){var o=t[i];if(r(n,i),C.hasOwnProperty(i))C[i](e,o);else{var a=w.hasOwnProperty(i),l=n.hasOwnProperty(i);if("function"==typeof o&&!a&&!l&&!1!==t.autobind)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=o,n[i]=o;else if(l){var c=w[i];(!a||c!==_.DEFINE_MANY_MERGED&&c!==_.DEFINE_MANY)&&v(!1),c===_.DEFINE_MANY_MERGED?n[i]=s(n[i],o):c===_.DEFINE_MANY&&(n[i]=u(n[i],o))}else n[i]=o}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n))n in C&&v(!1),n in e&&v(!1),e[n]=r}}function a(e,t){for(var n in e&&t&&"object"==typeof e&&"object"==typeof t||v(!1),t)t.hasOwnProperty(n)&&(void 0!==e[n]&&v(!1),e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){return t.bind(e)}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,n)}}var d=n(345),f=n(264),h=(n(287),n(288),n(346)),p=n(261),m=n(280),v=n(235),g=n(239),y=n(301),b=(n(247),y({mixins:null})),_=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}
267),x=[],w={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=p({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=p({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=p({},e.propTypes,t)},statics:function(e,t){o(e,t)},autobind:function(){}},k={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(e,t){this.updater.enqueueSetProps(this,e),t&&this.updater.enqueueCallback(this,t)},replaceProps:function(e,t){this.updater.enqueueReplaceProps(this,e),t&&this.updater.enqueueCallback(this,t)}},S=function(){};p(S.prototype,d.prototype,k);var j={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.refs=m,this.updater=n||h,this.state=null;var r=this.getInitialState?this.getInitialState():null;("object"!=typeof r||Array.isArray(r))&&v(!1),this.state=r};for(var n in t.prototype=new S,t.prototype.constructor=t,x.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render||v(!1),w)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){x.push(e)}}};e.exports=j},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||i}var i=n(346),o=(n(265),n(280)),a=n(235);n(247),r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&a(!1),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e)},e.exports=r},function(e,t,n){"use strict";function r(){}var i=(n(247),{isMounted:function(){return!1},enqueueCallback:function(){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e){r(e,"replaceState")},enqueueSetState:function(e){r(e,"setState")},enqueueSetProps:function(e){r(e,"setProps")},enqueueReplaceProps:function(e){r(e,"replaceProps")}});e.exports=i},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=!e&&s.useCreateElement}var i=n(277),o=n(278),a=n(251),s=n(263),u=n(348),l=n(279),c=n(261),d=[{initialize:u.getSelectionInformation,close:u.restoreSelection},{initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},{initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}}],f={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};c(r.prototype,l.Mixin,f),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return o(document.documentElement,e)}var i=n(349),o=n(281),a=n(317),s=n(351),u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,i=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,i),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=i.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var o=e.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",r-n),o.select()}else i.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function i(e){var t=document.selection.createRange(),n=t.text.length,r=t.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",t);var i=r.text.length;return{start:i,end:i+n}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(u){return null}var l=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)?0:s.toString().length,c=s.
267cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var d=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset)?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(n,i),h.setEnd(o,a);var p=h.collapsed;return{start:p?f:d,end:p?d:f}}function a(e,t){var n,r,i=document.selection.createRange().duplicate();"undefined"==typeof t.end?r=n=t.start:t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,i=Math.min(t.start,r),o="undefined"==typeof t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=l(e,i),u=l(e,o);if(s&&u){var d=document.createRange();d.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(d),n.extend(u.node,u.offset)):(d.setEnd(u.node,u.offset),n.addRange(d))}}}var u=n(231),l=n(350),c=n(297),d=u.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:d?i:o,setOffsets:d?a:s};e.exports=f},function(e){"use strict";function t(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function n(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,r){for(var i=t(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,r>=o&&a>=r)return{node:i,offset:r-o};o=a}i=t(n(i))}}e.exports=r},function(e){"use strict";function t(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=t},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(_||null==g||g!==c())return null;var n=r(g);if(!b||!h(b,n)){b=n;var i=l.getPooled(v.select,y,e,t);return i.type="select",i.target=g,a.accumulateTwoPhaseDispatches(i),i}return null}var o=n(252),a=n(295),s=n(231),u=n(348),l=n(299),c=n(351),d=n(304),f=n(301),h=n(339),p=o.topLevelTypes,m=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,v={select:{phasedRegistrationNames:{bubbled:f({onSelect:null}),captured:f({onSelectCapture:null})},dependencies:[p.topBlur,p.topContextMenu,p.topFocus,p.topKeyDown,p.topMouseDown,p.topMouseUp,p.topSelectionChange]}},g=null,y=null,b=null,_=!1,x=!1,w=f({onSelect:null}),C={eventTypes:v,extractEvents:function(e,t,n,r,o){if(!x)return null;switch(e){case p.topFocus:(d(t)||"true"===t.contentEditable)&&(g=t,y=n,b=null);break;case p.topBlur:g=null,y=null,b=null;break;case p.topMouseDown:_=!0;break;case p.topContextMenu:case p.topMouseUp:return _=!1,i(r,o);case p.topSelectionChange:if(m)break;case p.topKeyDown:case p.topKeyUp:return i(r,o)}return null},didPutListener:function(e,t){t===w&&(x=!0)}};e.exports=C},function(e){"use strict";var t=Math.pow(2,53),n={createReactRootIndex:function(){return Math.ceil(Math.random()*t)}};e.exports=n},function(e,t,n){"use strict";var r=n(252),i=n(341),o=n(295),a=n(250),s=n(355),u=n(299),l=n(356),c=n(357),d=n(308),f=n(360),h=n(361),p=n(309),m=n(362),v=n(237),g=n(358),y=n(235),b=n(301),_=r.topLevelTypes,x={abort:{phasedReg
267istrationNames:{bubbled:b({onAbort:!0}),captured:b({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:b({onBlur:!0}),captured:b({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:b({onCanPlay:!0}),captured:b({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:b({onCanPlayThrough:!0}),captured:b({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:b({onClick:!0}),captured:b({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:b({onContextMenu:!0}),captured:b({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:b({onCopy:!0}),captured:b({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:b({onCut:!0}),captured:b({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:b({onDoubleClick:!0}),captured:b({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:b({onDrag:!0}),captured:b({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:b({onDragEnd:!0}),captured:b({onDragEndCapture:!0})}}
267,dragEnter:{phasedRegistrationNames:{bubbled:b({onDragEnter:!0}),captured:b({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:b({onDragExit:!0}),captured:b({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:b({onDragLeave:!0}),captured:b({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:b({onDragOver:!0}),captured:b({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:b({onDragStart:!0}),captured:b({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:b({onDrop:!0}),captured:b({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:b({onDurationChange:!0}),captured:b({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:b({onEmptied:!0}),captured:b({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:b({onEncrypted:!0}),captured:b({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:b({onEnded:!0}),captured:b({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:b({onError:!0}),captured:b({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:b({onFocus:!0}),captured:b({onFocusCapture:!0})}}
267,input:{phasedRegistrationNames:{bubbled:b({onInput:!0}),captured:b({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:b({onKeyDown:!0}),captured:b({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:b({onKeyPress:!0}),captured:b({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:b({onKeyUp:!0}),captured:b({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:b({onLoad:!0}),captured:b({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:b({onLoadedData:!0}),captured:b({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:b({onLoadedMetadata:!0}),captured:b({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:b({onLoadStart:!0}),captured:b({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:b({onMouseDown:!0}),captured:b({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:b({onMouseMove:!0}),captured:b({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:b({onMouseOut:!0}),captured:b({onMouseOutCapture:!0})}}
267,mouseOver:{phasedRegistrationNames:{bubbled:b({onMouseOver:!0}),captured:b({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:b({onMouseUp:!0}),captured:b({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:b({onPaste:!0}),captured:b({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:b({onPause:!0}),captured:b({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:b({onPlay:!0}),captured:b({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:b({onPlaying:!0}),captured:b({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:b({onProgress:!0}),captured:b({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:b({onRateChange:!0}),captured:b({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:b({onReset:!0}),captured:b({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:b({onScroll:!0}),captured:b({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:b({onSeeked:!0}),captured:b({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:b({onSeeking:!0}),captured:b({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:b({onStalled:!0}),captured:b({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:b({onSubmit:!0}),captured:b({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:b({onSuspend:!0}),captured:b({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:b({onTimeUpdate:!0}),captured:b({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:b({onTouchCancel:!0}),captured:b({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:b({onTouchEnd:!0}),captured:b({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:b({onTouchMove:!0}),captured:b({onTouchMoveCapture:!0})}}
267,touchStart:{phasedRegistrationNames:{bubbled:b({onTouchStart:!0}),captured:b({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:b({onVolumeChange:!0}),captured:b({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:b({onWaiting:!0}),captured:b({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:b({onWheel:!0}),captured:b({onWheelCapture:!0})}}},w={topAbort:x.abort,topBlur:x.blur,topCanPlay:x.canPlay,topCanPlayThrough:x.canPlayThrough,topClick:x.click,topContextMenu:x.contextMenu,topCopy:x.copy,topCut:x.cut,topDoubleClick:x.doubleClick,topDrag:x.drag,topDragEnd:x.dragEnd,topDragEnter:x.dragEnter,topDragExit:x.dragExit,topDragLeave:x.dragLeave,topDragOver:x.dragOver,topDragStart:x.dragStart,topDrop:x.drop,topDurationChange:x.durationChange,topEmptied:x.emptied,topEncrypted:x.encrypted,topEnded:x.ended,topError:x.error,topFocus:x.focus,topInput:x.input,topKeyDown:x.keyDown,topKeyPress:x.keyPress,topKeyUp:x.keyUp,topLoad:x.load,topLoadedData:x.loadedData,topLoadedMetadata:x.loadedMetadata,topLoadStart:x.loadStart,topMouseDown:x.mouseDown,topMouseMove:x.mouseMove,topMouseOut:x.mouseOut,topMouseOver:x.mouseOver,topMouseUp:x.mouseUp,topPaste:x.paste,topPause:x.pause,topPlay:x.play,topPlaying:x.playing,topProgress:x.progress,topRateChange:x.rateChange,topReset:x.reset,topScroll:x.scroll,topSeeked:x.seeked,topSeeking:x.seeking,topStalled:x.stalled,topSubmit:x.submit,topSuspend:x.suspend,topTimeUpdate:x.timeUpdate,topTouchCancel:x.touchCancel,topTouchEnd:x.touchEnd,topTouchMove:x.touchMove,topTouchStart:x.touchStart,topVolumeChange:x.volumeChange,topWaiting:x.waiting,topWheel:x.wheel};for(var C in w)w[C].dependencies=[C];var k=b({onClick:null}),S={},j={eventTypes:x,extractEvents:function(e,t,n,r,i){var a,v=w[e];if(!v)return null;switch(e){case _.topAbort:case _.topCanPlay:case _.topCanPlayThrough:case _.topDurationChange:case _.topEmptied:case _.topEncrypted:case _.topEnded:case _.topError:case _.topInput:case _.topLoad:case _.topLoadedData:case _.topLoadedMetadata:case _.topLoadStart:case _.topPause:case _.topPlay:case _.topPlaying:case _.topProgress:case _.topRateChange:case _.topReset:case _.topSeeked:case _.topSeeking:case _.topStalled:case _.topSubmit:case _.topSuspend:case _.topTimeUpdate:case _.topVolumeChange:case _.topWaiting:a=u;break;case _.topKeyPress:if(0===g(r))return null;case _.topKeyDown:case _.topKeyUp:a=c;break;case _.topBlur:case _.topFocus:a=l;break;case _.topClick:if(2===r.button)return null;case _.topContextMenu:case _.topDoubleClick:case _.topMouseDown:case _.topMouseMove:case _.topMouseOut:case _.topMouseOver:case _.topMouseUp:a=d;break;case _.topDrag:case _.topDragEnd:case _.topDragEnter:case _.topDragExit:case _.topDragLeave:case _.topDragOver:case _.topDragStart:case _.topDrop:a=f;break;case _.topTouchCancel:case _.topTouchEnd:case _.topTouchMove:case _.topTouchStart:a=h;break;case _.topScroll:a=p;break;case _.topWheel:a=m;break;case _.topCopy:case _.topCut:case _.topPaste:a=s}a||y(!1);var b=a.getPooled(v,n,r,i);return o.accumulateTwoPhaseDispatches(b),b},didPutListener:function(e,t){if(t===k){var n=a.getNode(e);S[e]||(S[e]=i.listen(n,"click",v))}},willDeleteListener:function(e,t){t===k&&(S[e].remove(),delete S[e])}};e.exports=j},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(299),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(309),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(309),o=n(358),a={key:n(359),location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:n(310),charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(r,a),e.exports=r},function(e){"use strict";function t(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=t},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}
267return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(358),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(308),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(309),o={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:n(310)};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=n(308),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";var r=n(245).injection.MUST_USE_ATTRIBUTE,i={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={Properties:{clipPath:r,cx:r,cy:r,d:r,dx:r,dy:r,fill:r,fillOpacity:r,fontFamily:r,fontSize:r,fx:r,fy:r,gradientTransform:r,gradientUnits:r,markerEnd:r,markerMid:r,markerStart:r,offset:r,opacity:r,patternContentUnits:r,patternUnits:r,points:r,preserveAspectRatio:r,r:r,rx:r,ry:r,spreadMethod:r,stopColor:r,stopOpacity:r,stroke:r,strokeDasharray:r,strokeLinecap:r,strokeOpacity:r,strokeWidth:r,textAnchor:r,transform:r,version:r,viewBox:r,x1:r,x2:r,x:r,xlinkActuate:r,xlinkArcrole:r,xlinkHref:r,xlinkRole:r,xlinkShow:r,xlinkTitle:r,xlinkType:r,xmlBase:r,xmlLang:r,xmlSpace:r,y1:r,y2:r,y:r},DOMAttributeNamespaces:{xlinkActuate:i.xlink,xlinkArcrole:i.xlink,xlinkHref:i.xlink,xlinkRole:i.xlink,xlinkShow:i.xlink,xlinkTitle:i.xlink,xlinkType:i.xlink,xmlBase:i.xml,xmlLang:i.xml,xmlSpace:i.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};e.exports=o},function(e){"use strict";e.exports="0.14.7"},function(e,t,n){"use strict";var r=n(250);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";var r=n(293),i=n(367),o=n(364);r.inject();var a={renderToString:i.renderToString,renderToStaticMarkup:i.renderToStaticMarkup,version:o};e.exports=a},function(e,t,n){"use strict";function r(e){var t;a.isValidElement(e)||p(!1);try{d.injection.injectBatchingStrategy(l);var n=s.createReactRootID();return(t=c.getPooled(!1)).perform(function(){var r=h(e,null).mountComponent(n,t,f);return u.addChecksumToMarkup(r)},null)}finally{c.release(t),d.injection.injectBatchingStrategy(o)}}function i(e){var t;a.isValidElement(e)||p(!1);try{d.injection.injectBatchingStrategy(l);var n=s.createReactRootID();return(t=c.getPooled(!0)).perform(function(){return h(e,null).mountComponent(n,t,f)},null)}finally{c.release(t),d.injection.injectBatchingStrategy(o)}}var o=n(314),a=n(264),s=n(267),u=n(270),l=n(368),c=n(369),d=n(276),f=n(280),h=n(284),p=n(235);e.exports={renderToString:r,renderToStaticMarkup:i}},function(e){"use strict";var t={isBatchingUpdates:!1,batchedUpdates:function(){}};e.exports=t},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=o.getPooled(null),this.useCreateElement=!1}var i=n(278),o=n(277),a=n(279),s=n(261),u=[{initialize:function(){this.reactMountReady.reset()},close:n(237)}],l={ 268getTransactionWrappers:function(){return u},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};s(r.prototype,a.Mixin,l),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(332),i=n(345),o=n(344),a=n(371),s=n(264),u=(n(372),n(329)),l=n(364),c=n(261),d=n(374),f=s.createElement,h=s.createFactory,p=s.cloneElement,m={Children:{map:r.map,forEac
268h:r.forEach,count:r.count,toArray:r.toArray,only:d},Component:i,createElement:f,cloneElement:p,isValidElement:s.isValidElement,PropTypes:u,createClass:o.createClass,createFactory:h,createMixin:function(e){return e},DOM:a,version:l,__spread:c};e.exports=m},function(e,t,n){"use strict";function r(e){return i.createFactory(e)}var i=n(264),o=(n(372),n(373))({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);e.exports=o},function(e,t,n){"use strict";function r(){if(d.current){var e=d.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,o("uniqueKey",e,t))}function o(e,t,n){var i=r();if(!i){var o="string"==typeof n?n:n.displayName||n.name;o&&(i=" Check the top-level render call using <"+o+">.")}var a=p[e]||(p[e]={});if(a[i])return null;a[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==d.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];l.isValidElement(r)&&i(r,t)}else if(l.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var o=f(e);if(o&&o!==e.entries)for(var a,s=o.call(e);!(a=s.next()).done;)l.isValidElement(a.value)&&i(a.value,t)}}function s(e,t,n,i){for(var o in t)if(t.hasOwnProperty(o)){var a;try{"function"!=typeof t[o]&&h(!1),a=t[o](n,o,e,i)}catch(s){a=s}a instanceof Error&&!(a.message in m)&&(m[a.message]=!0,r())}}function u(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&s(n,t.propTypes,e.props,c.prop),t.getDefaultProps}}var l=n(264),c=n(287),d=(n(288),n(227)),f=(n(265),n(330)),h=n(235),p=(n(247),{}),m={},v={createElement:function(e){var t="string"==typeof e||"function"==typeof e,n=l.createElement.apply(this,arguments);if(null==n)return n;if(t)for(var r=2;r<arguments.length;r++)a(arguments[r],e);return u(n),n},createFactory:function(e){var t=v.createElement.bind(null,e);return t.type=e,t},cloneElement:function(){for(var e=l.cloneElement.apply(this,arguments),t=2;t<arguments.length;t++)a(arguments[t],e.type);return u(e),e}};e.exports=v},function(e){"use strict";function t(e,t,r){if(!e)return null;var i={};for(var o in e)n.call(e,o)&&(i[o]=t.call(r,e[o],o,e));return i}var n=Object.prototype.hasOwnProperty;e.exports=t},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)||o(!1),e}var i=n(264),o=n(235);e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){return i}n(261),n(247),e.exports=r},function(e,t,n){(function(t){e.exports=t.ReactDOM=n(377)}).call(t,function(){return this}())},function(e,t,n){"use strict";e.exports=n(226)},function(e,t,n){"use strict";
268function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){var t="string"==typeof e,n=void 0;if(!a(n=t?document.querySelector(e):e)){var r="Container must be `string` or `HTMLElement`.";throw t&&(r+=" Unable to find "+e),new Error(r)}return n}function a(e){return e instanceof HTMLElement||!!e&&e.nodeType>0}function s(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function u(e){return function(t,n){return t||n?t&&!n?e+"--"+t:t&&n?e+"--"+t+"__"+n:!t&&n?e+"__"+n:void 0:e}}function l(e){var t=e.transformData,n=e.defaultTemplates,r=e.templates,i=e.templatesConfig,o=c(n,r);return v({transformData:t,templatesConfig:i},o)}function c(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=(0,C["default"])([].concat(i((0,w["default"])(e)),i((0,w["default"])(t))));return(0,g["default"])(n,function(n,r){var i=e[r],o=t[r],a=void 0!==o&&o!==i;return n.templates[r]=a?o:i,n.useCustomCompileOptions[r]=a,n},{templates:{},useCustomCompileOptions:{}})}function d(e,t,n,r,i){var o={type:t,attributeName:n,name:r},a=(0,b["default"])(i,{name:n}),s=void 0;if("hierarchical"===t){var u=e.getHierarchicalFacetByName(n),l=r.split(u.separator);o.name=l[l.length-1];for(var c=0;void 0!==a&&c<l.length;++c)a=(0,b["default"])(a.data,{name:l[c]});s=(0,_["default"])(a,"count")}else s=(0,_["default"])(a,'data["'+o.name+'"]');var d=(0,_["default"])(a,"exhaustive");return void 0!==s&&(o.count=s),void 0!==d&&(o.exhaustive=d),o}function f(e,t){var n=[];return(0,y["default"])(t.facetsRefinements,function(r,i){(0,y["default"])(r,function(r){n.push(d(t,"facet",i,r,e.facets))})}),(0,y["default"])(t.facetsExcludes,function(e,t){(0,y["default"])(e,function(e){n.push({type:"exclude",attributeName:t,name:e,exclude:!0})})}),(0,y["default"])(t.disjunctiveFacetsRefinements,function(r,i){(0,y["default"])(r,function(r){n.push(d(t,"disjunctive",i,r,e.disjunctiveFacets))})}),(0,y["default"])(t.hierarchicalFacetsRefinements,function(r,i){(0,y["default"])(r,function(r){n.push(d(t,"hierarchical",i,r,e.hierarchicalFacets))})}),(0,y["default"])(t.numericRefinements,function(e,t){(0,y["default"])(e,function(e,r){(0,y["default"])(e,function(e){n.push({type:"numeric",attributeName:t,name:e+"",numericValue:e,operator:r})})})}),(0,y["default"])(t.tagRefinements,function(e){n.push({type:"tag",attributeName:"_tags",name:e})}),n}function h(e,t){return(0,x["default"])(t)?e=(e=e.clearTags()).clearRefinements():((0,y["default"])(t,function(t){e="_tags"===t?e.clearTags():e.clearRefinements(t)}),e)}function p(e,t){e.setState(h(e.state,t)).search()}function m(e,t){return t?(0,k["default"])(t,function(t,n){return e+n}):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.prefixKeys=t.clearRefinementsAndSearch=t.clearRefinementsFromState=t.getRefinements=t.isDomElement=t.isSpecialClick=t.prepareTemplateProps=t.bemHelper=t.getContainerNode=void 0;var v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=r(n(114)),y=r(n(15)),b=r(n(131)),_=r(n(379)),x=r(n(127)),w=r(n(23)),C=r(n(380)),k=r(n(213));t.getContainerNode=o,t.bemHelper=u,t.prepareTemplateProps=l,t.isSpecialClick=s,t.isDomElement=a,t.getRefinements=f,t.clearRefinementsFromState=h,t.clearRefinementsAndSearch=p,t.prefixKeys=m},function(e,t,n){function r(e,t,n){var r=null==e?void 0:i(e,o(t),t+"");return void 0===r?n:r}var i=n(71),o=n(75);e.exports=r},function(e,t,n){function r(e,t,n,r){return(e?e.length:0)?(null!=t&&"boolean"!=typeof t&&(n=a(e,t,r=n)?void 0:t,t=!1),n=null==n?n:i(n,r,3),t?s(e,n):o(e,n)):[]}var i=n(57),o=n(218),a=n(54),s=n(381);e.exports=r},function(e){function t(e,t){for(var n,r=-1,i=e.length,o=-1,a=[];++r<i;){var s=e[r],u=t?t(s,r,e):s;r&&n===u||(n=u,a[++o]=s)}return a}e.exports=t},function(e,t){var n,r;!function(){"use strict";function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n))e.push(i.apply(null,n));else if("object"===r)for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}var o={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=i:(n=[],void 0===(r=function(){return i}.apply(t,n))||(e.exports=r))}()},function(e,t,n){"use strict";
268function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=function(){function t(){return i(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,l["default"].Component),u(t,[{key:"componentDidMount",value:function(){this._hideOrShowContainer(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.props.shouldAutoHideContainer!==e.shouldAutoHideContainer&&this._hideOrShowContainer(e)}},{key:"shouldComponentUpdate",value:function(e){return!1===e.shouldAutoHideContainer}},{key:"_hideOrShowContainer",value:function(e){c["default"].findDOMNode(this).parentNode.style.display=!0===e.shouldAutoHideContainer?"none":""}},{key:"render",value:function(){return l["default"].createElement(e,this.props)}}]),t}();return t.displayName=e.name+"-AutoHide",t}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=r(n(376));t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=function(){function t(e){i(this,t);var n=o(this,Object.getPrototypeOf(t).call(this,e));return n.handleHeaderClick=n.handleHeaderClick.bind(n),n.state={collapsed:e.collapsible&&e.collapsible.collapsed},n._headerElement=n._getElement({type:"header",handleClick:e.collapsible?n.handleHeaderClick:null}),n._cssClasses={root:(0,f["default"])("ais-root",n.props.cssClasses.root),body:(0,f["default"])("ais-body",n.props.cssClasses.body)},n._footerElement=n._getElement({type:"footer"}),n}return a(t,d["default"].Component),c(t,[{key:"shouldComponentUpdate",value:function(e,t){return!1===t.collapsed||t!==this.state}},{key:"_getElement",value:function(e){var t=e.type,n=e.handleClick,r=void 0===n?null:n,i=this.props.templateProps.templates;if(!i||!i[t])return null;var o=(0,f["default"])(this.props.cssClasses[t],"ais-"+t);return d["default"].createElement(h["default"],l({},this.props.templateProps,{rootProps:{className:o,onClick:r},templateKey:t,transformData:null}))}},{key:"handleHeaderClick",value:function(){this.setState({collapsed:!this.state.collapsed})}}
268,{key:"render",value:function(){var t=[this._cssClasses.root];this.props.collapsible&&t.push("ais-root__collapsible"),this.state.collapsed&&t.push("ais-root__collapsed");var n=l({},this._cssClasses,{root:(0,f["default"])(t)});return u("div",{className:n.root},void 0,this._headerElement,u("div",{className:n.body},void 0,d["default"].createElement(e,this.props)),this._footerElement)}}]),t}();return t.defaultProps={cssClasses:{},collapsible:!1},t.displayName=e.name+"-HeaderFooter",t}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=r(n(223)),f=r(n(382)),h=r(n(385));t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t,n){if(!e)return n;var r=(0,m["default"])(n),i=void 0,o=void 0===e?"undefined":c(e);if("function"===o)i=e(r);else{if("object"!==o)throw new Error("transformData must be a function or an object, was "+o+" (key : "+t+")");i=e[t]?e[t](r):n}var a=void 0===i?"undefined":c(i),s=void 0===n?"undefined":c(n);if(a!==s)throw new Error("`transformData` must return a `"+s+"`, got `"+a+"`.");return i}function u(e){var t=e.templates,n=e.templateKey,r=e.compileOptions,i=e.helpers,o=e.data,a=t[n],s=void 0===a?"undefined":c(a),u="function"===s;if("string"===s||u){if(u)return a(o);var f=l(i,r,o),h=d({},o,{helpers:f});return g["default"].compile(a,r).render(h)}throw new Error("Template must be 'string' or 'function', was '"+s+"' (key: "+n+")")}function l(e,t,n){return(0,v["default"])(e,function(e){return(0,p["default"])(function(r){var i=this,o=function(e){return g["default"].compile(e,t).render(i)};return e.call(n,r,o)})})}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=r(n(223)),p=r(n(386)),m=r(n(96)),v=r(n(215)),g=r(n(388)),y=r(n(129)),b=function(){function e(t){return i(this,e),o(this,Object.getPrototypeOf(e).call(this,t))}return a(e,h["default"].Component),f(e,[{key:"shouldComponentUpdate",value:function(e){return!(0,y["default"])(this.props.data,e.data)||this.props.templateKey!==e.templateKey}},{key:"render",value:function(){var e=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},t=u({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:e,helpers:this.props.templatesConfig.helpers,data:s(this.props.transformData,this.props.templateKey,this.props.data)});return null===t?null:h["default"].isValidElement(t)?h["default"].createElement("div",this.props.rootProps,t):h["default"].createElement("div",d({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:t}}))}}]),e}();b.defaultProps={data:{},useCustomCompileOptions:{},templates:{},templatesConfig:{}},t["default"]=b},function(e,t,n){var r=n(387)(8);r.placeholder={},e.exports=r},function(e,t,n){function r(e){function t(n,r,a){a&&o(n,r,a)&&(r=void 0);var s=i(n,e,void 0,void 0,void 0,void 0,void 0,r);return s.placeholder=t.placeholder,s}return t}var i=n(144),o=n(54);e.exports=r},function(e,t,n){var r=n(389);r.Template=n(390).Template,r.template=r.Template,e.exports=r},function(e,t){!function(e){function t(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function n(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function r(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;i>r;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}function i(t,n,r,s){var u=[],l=null,c=null,d=null;for(c=r[r.length-1];t.length>0;){if(d=t.shift(),c&&"<"==c.tag&&!(d.tag in x))throw new Error("Illegal content in < super tag.");if(e.tags[d.tag]<=e.tags.$||o(d,s))r.push(d),d.nodes=i(t,d.tag,r,s);else{if("/"==d.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+d.n);if(l=r.pop(),d.n!=l.n&&!a(d.n,l.n,s))throw new Error("Nesting error: "+l.n+" vs. "+d.n);return l.end=d.i,u}"\n"==d.tag&&(d.last=0==t.length||"\n"==t[0].tag)}
vendor: 7,581 bytes, line 268
268u.push(d)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return u}function o(e,t){for(var n=0,r=t.length;r>n;n++)if(t[n].o==e.n)return e.tag="#",!0}function a(e,t,n){for(var r=0,i=n.length;i>r;r++)if(n[r].c==e&&n[r].o==t)return!0}function s(e){var t=[];for(var n in e)t.push('"'+l(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}function u(e){var t=[];for(var n in e.partials)t.push('"'+l(n)+'":{name:"'+l(e.partials[n].name)+'", '+u(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+s(e.subs)}function l(e){return e.replace(y,"\\\\").replace(m,'\\"').replace(v,"\\n").replace(g,"\\r").replace(b,"\\u2028").replace(_,"\\u2029")}function c(e){return~e.indexOf(".")?"d":"f"}function d(e,t){var n="<"+(t.prefix||"")+e.n+w++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+l(n)+'",c,p,"'+(e.indent||"")+'"));',n}function f(e,t){t.code+="t.b(t.t(t."+c(e.n)+'("'+l(e.n)+'",c,p,0)));'}function h(e){return"t.b("+e+");"}var p=/\S/,m=/\"/g,v=/\n/g,g=/\r/g,y=/\\/g,b=/\u2028/,_=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(i,o){function a(){y.length>0&&(b.push({tag:"_t",text:new String(y)}),y="")}function s(){for(var t=!0,n=w;n<b.length;n++)if(!(t=e.tags[b[n].tag]<e.tags._v||"_t"==b[n].tag&&null===b[n].text.match(p)))return!1;return t}function u(e,t){if(a(),e&&s())for(var n,r=w;r<b.length;r++)b[r].text&&((n=b[r+1])&&">"==n.tag&&(n.indent=b[r].text.toString()),b.splice(r,1));else t||b.push({tag:"\n"});_=!1,w=b.length}function l(e,t){var r="="+k,i=e.indexOf(r,t),o=n(e.substring(e.indexOf("=",t)+1,i)).split(" ");return C=o[0],k=o[o.length-1],i+r.length-1}var c=i.length,d=0,f=1,h=2,m=d,v=null,g=null,y="",b=[],_=!1,x=0,w=0,C="{{",k="}}";for(o&&(o=o.split(" "),C=o[0],k=o[1]),x=0;c>x;x++)m==d?r(C,i,x)?(--x,a(),m=f):"\n"==i.charAt(x)?u(_):y+=i.charAt(x):m==f?(x+=C.length-1,"="==(v=(g=e.tags[i.charAt(x+1)])?i.charAt(x+1):"_v")?(x=l(i,x),m=d):(g&&x++,m=h),_=x):r(k,i,x)?(b.push({tag:v,n:n(y),otag:C,ctag:k,i:"/"==v?_-C.length:x+k.length}),y="",x+=k.length-1,m=d,"{"==v&&("}}"==k?x++:t(b[b.length-1]))):y+=i.charAt(x);return u(_,!0),b};var x={_t:!0,"\n":!0,$:!0,"/":!0};e.stringify=function(t){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+u(t)+"}"};var w=0;e.generate=function(t,n,r){w=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),r.asString?this.stringify(i,n,r):this.makeTemplate(i,n,r)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+c(t.n)+'("'+l(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+c(t.n)+'("'+l(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":d,"<":function(t,n){var r={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,r);var i=n.partials[d(t,n)];i.subs=r.subs,i.partials=r.partials},$:function(t,n){var r={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,r),n.subs[t.n]=r.code,n.inPartial||(n.code+='t.sub("'+l(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=h('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+c(e.n)+'("'+l(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=h('"'+l(e.text)+'"')},"{":f,"&":f},e.walk=function(t,n){for(var r,i=0,o=t.length;o>i;i++)(r=e.codegen[t[i].tag])&&r(t[i],n);return n},e.parse=function(e,t,n){return i(e,"",[],(n=n||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var r=e.cacheKey(t,n),i=this.cache[r];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[r]=i}}(t)},function(e,t){!function(e){function t(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}function n(e,t,n,r,i,o){function a(){}function s(){}a.prototype=e,s.prototype=e.subs;var u,l=new a;for(u in l.subs=new s,l.subsText={},l.buf="",r=r||{},l.stackSubs=r,l.subsText=o,t)r[u]||(r[u]=t[u]);for(u in r)l.subs[u]=r[u];for(u in i=i||{},l.stackPartials=i,n)i[u]||(i[u]=n[u]);for(u in i)l.partials[u]=i[u];return l}function r(e){return String(null==e?"":e)}function i(e){return e=r(e),c.test(e)?e.replace(o,"&").replace(a,"<").replace(s,">").replace(u,"'").replace(l,"""):e}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(){return""},v:i,t:r,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var r=this.partials[e],i=t[r.name];if(r.instance&&r.base==i)return r.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,r.subs){for(key in t.stackText||(t.stackText={}),r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=n(i,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,r){var i=this.ep(e,n);return i?i.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(d(r))for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,r,i,o,a){var s;return(!d(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,i,o,a)),s=!!e,!r&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,n,r,i){var o,a=e.split("."),s=this.f(a[0],n,r,i),u=this.options.modelGet,l=null;if("."===e&&d(n[n.length-2]))s=n[n.length-1];else for(var c=1;c<a.length;c++)void 0!==(o=t(a[c],s,u))?(l=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(n.push(l),s=this.mv(s,n,r),n.pop()),s)},f:function(e,n,r,i){for(var o=!1,a=!1,s=this.options.modelGet,u=n.length-1;u>=0;u--)if(void 0!==(o=t(e,n[u],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,n,r)),o):!i&&""},ls:function(e,t,n,i,o){var a=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(r(e.call(t,i)),t,n)),this.options.delimiters=a,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,o,a){var s,u=t[t.length-1],l=e.call(u);return"function"==typeof l?!!r||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(l,u,n,s.substring(i,o),a)):l},mv:function(e,t,n){var i=t[t.length-1],o=e.call(i);return"function"==typeof o?this.ct(r(o.call(i)),i,n):o},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}};var o=/&/g,a=/</g,s=/>/g,u=/\'/g,l=/\"/g,c=/[&<>\"\']/,d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t){"use strict";
268Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",link:"Clear all",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(223)),d=r(n(385)),f=n(378),h=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,c["default"].Component),l(e,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.hasRefinements!==e.hasRefinements}},{key:"handleClick",value:function(e){(0,f.isSpecialClick)(e)||(e.preventDefault(),this.props.clearAll())}},{key:"render",value:function(){var e={hasRefinements:this.props.hasRefinements};return u("a",{className:this.props.cssClasses.link,href:this.props.url,onClick:this.handleClick},void 0,c["default"].createElement(d["default"],s({data:e,templateKey:"link"},this.props.templateProps)))}}]),e}();t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.container,n=e.attributes,r=void 0===n?[]:n,i=e.onlyListedAttributes,o=void 0!==i&&i,a=e.clearAll,_=void 0===a?"before":a,C=e.templates,$=void 0===C?j["default"]:C,N=e.collapsible,R=void 0!==N&&N,M=e.transformData,D=e.autoHideContainer,A=void 0===D||D,I=e.cssClasses,O=void 0===I?{}:I,F=(0,g["default"])(r)&&(0,w["default"])(r,function(e,t){return e&&(0,y["default"])(t)&&(0,v["default"])(t.name)&&((0,p["default"])(t.label)||(0,v["default"])(t.label))&&((0,p["default"])(t.template)||(0,v["default"])(t.template)||(0,b["default"])(t.template))&&((0,p["default"])(t.transformData)||(0,b["default"])(t.transformData))},!0),L=["header","item","clearAll","footer"],H=(0,y["default"])($)&&(0,w["default"])($,function(e,t,n){return e&&-1!==L.indexOf(n)&&((0,v["default"])(t)||(0,b["default"])(t))},!0),B=["root","header","body","clearAll","list","item","link","count","footer"],U=(0,y["default"])(O)&&(0,w["default"])(O,function(e,t,n){return e&&-1!==B.indexOf(n)&&(0,v["default"])(t)||(0,g["default"])(t)},!0);if(!(((0,v["default"])(t)||(0,f.isDomElement)(t))&&(0,g["default"])(r)&&F&&(0,m["default"])(o)&&-1!==[!1,"before","after"].indexOf(_)&&(0,y["default"])($)&&H&&((0,p["default"])(M)||(0,b["default"])(M))&&(0,m["default"])(A)&&U))throw new Error(P);var q=(0,f.getContainerNode)(t),z=(0,k["default"])(E["default"]);!0===A&&(z=(0,S["default"])(z));var W=(0,x["default"])(r,function(e){return e.name}),V=o?W:[],K=(0,w["default"])(r,function(e,t){return e[t.name]=t,e},{});return{init:function(e){var t=e.helper;this._clearRefinementsAndSearch=f.clearRefinementsAndSearch.bind(null,t,V)},render:function(e){var t=e.results,n=e.helper,r=e.state,i=e.templatesConfig,a=e.createURL,p={root:(0,h["default"])(T(null),O.root),header:(0,h["default"])(T("header"),O.header),body:(0,h["default"])(T("body"),O.body),clearAll:(0,h["default"])(T("clear-all"),O.clearAll),list:(0,h["default"])(T("list"),O.list),item:(0,h["default"])(T("item"),O.item),link:(0,h["default"])(T("link"),O.link),count:(0,h["default"])(T("count"),O.count),footer:(0,h["default"])(T("footer"),O.footer)},m=(0,f.prepareTemplateProps)({defaultTemplates:j["default"],templatesConfig:i,templates:$}),v=a((0,f.clearRefinementsFromState)(r,V)),g=s(t,r,W,o),y=g.map(function(e){return a(u(r,e))}),b=g.map(function(e){return l.bind(null,n,e)}),x=0===g.length;d["default"].render(c(z,{attributes:K,clearAllClick:this._clearRefinementsAndSearch,clearAllPosition:_,clearAllURL:v,clearRefinementClicks:b,clearRefinementURLs:y,collapsible:R,cssClasse
268s:p,refinements:g,shouldAutoHideContainer:x,templateProps:m}),q)}}}function o(e,t,n){var r=e.indexOf(n);return-1!==r?r:e.length+t.indexOf(n)}function a(e,t,n,r){var i=o(e,t,n.attributeName),a=o(e,t,r.attributeName);return i===a?n.name===r.name?0:n.name<r.name?-1:1:a>i?-1:1}function s(e,t,n,r){var i=(0,f.getRefinements)(e,t),o=(0,w["default"])(i,function(e,t){return-1===n.indexOf(t.attributeName)&&e.indexOf(-1===t.attributeName)&&e.push(t.attributeName),e},[]);return i=i.sort(a.bind(null,n,o)),r&&!(0,_["default"])(n)&&(i=(0,C["default"])(i,function(e){return-1!==n.indexOf(e.attributeName)})),i}function u(e,t){switch(t.type){case"facet":return e.removeFacetRefinement(t.attributeName,t.name);case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attributeName,t.name);case"hierarchical":return e.clearRefinements(t.attributeName);case"exclude":return e.removeExcludeRefinement(t.attributeName,t.name);case"numeric":return e.removeNumericRefinement(t.attributeName,t.operator,t.numericValue);case"tag":return e.removeTagRefinement(t.name);default:throw new Error("clearRefinement: type "+t.type+"isn't handled")}}function l(e,t){e.setState(u(e.state,t)).search()}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{}) 269;if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),d=r((r(n(223)),n(376))),f=n(378),h=r(n(382)),p=r(n(130)),m=r(n(394)),v=r(n(128)),g=r(n(34)),y=r(n(83)),b=r(n(26)),_=r(n(127)),x=r(n(55)),w=r(n(114)),C=r(n(111)),k=r(n(384)),S=r(n(383)),j=r(n(395)),E=r(n(396)),T=(0,f.bemHelper)("ais-current-refined-values"),P="Usage:\ncurrentRefinedValues({\n container,\n [ attributes: [{name[, label, template, transformData]}] ],\n [ onlyListedAttributes = false ],\n [ clearAll = 'before' ] // One of ['before', 'after', false]\n [ templates.{header = '', item, clearAll, footer = ''} ],\n [ transformData ],\n [ autoHideContainer = true ],\n [ cssClasses.{root, header, body, clearAll, list, item, link, count, footer} = {} ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t,n){function r(e){return!0===e||!1===e||i(e)&&a.call(e)==o}var i=n(27),o="[object Boolean]",a=Object.prototype.toString;e.exports=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'{{#label}}{{label}}{{^operator}}:{{/operator}} {{/label}}{{#operator}}{{{displayOperator}}} {{/operator}}{{#exclude}}-{{/exclude}}{{name}} <span class="{{cssClasses.count}}">{{count}}</span>',clearAll:"Clear all",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t={};return void 0!==e.template&&(t.templates={item:e.template}),void 0!==e.transformData&&(t.transformData=e.transformData),t}function u(e,t,n){var r=(0,g["default"])(t);return r.cssClasses=n,void 0!==e.label&&(r.label=e.label),void 0!==r.operator&&(r.displayOperator=r.operator,">="===r.operator&&(r.displayOperator="≥"),"<="===r.operator&&(r.displayOperator="≤")),r}function l(e){return function(t){(0,m.isSpecialClick)(t)||(t.preventDefault(),e())}}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=r(n(223)),p=r(n(385)),m=n(378),v=r(n(55)),g=r(n(96)),y=r(n(129)),b=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,h["default"].Component),f(e,[{key:"shouldComponentUpdate",value:function(e){return!(0,y["default"])(this.props.refinements,e.refinements)}},{key:"_clearAllElement",value:function(e,t){return t===e?d("a",{className:this.props.cssClasse
269s.clearAll,href:this.props.clearAllURL,onClick:l(this.props.clearAllClick)},void 0,h["default"].createElement(p["default"],c({templateKey:"clearAll"},this.props.templateProps))):void 0}},{key:"_refinementElement",value:function(e,t){var n=this.props.attributes[e.attributeName]||{},r=u(n,e,this.props.cssClasses),i=s(n),o=e.attributeName+(e.operator?e.operator:":")+(e.exclude?e.exclude:"")+e.name;return d("div",{className:this.props.cssClasses.item},o,d("a",{className:this.props.cssClasses.link,href:this.props.clearRefinementURLs[t],onClick:l(this.props.clearRefinementClicks[t])},void 0,h["default"].createElement(p["default"],c({data:r,templateKey:"item"},this.props.templateProps,i))))}},{key:"render",value:function(){return d("div",{},void 0,this._clearAllElement("before",this.props.clearAllPosition),d("div",{className:this.props.cssClasses.list},void 0,(0,v["default"])(this.props.refinements,this._refinementElement,this)),this._clearAllElement("after",this.props.clearAllPosition))}}]),e}();t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributes,r=e.separator,i=void 0===r?" > ":r,m=e.rootPath,v=void 0===m?null:m,g=e.showParentLevel,y=void 0===g||g,b=e.limit,_=void 0===b?10:b,x=e.sortBy,w=void 0===x?["name:asc"]:x,C=e.cssClasses,k=void 0===C?{}:C,S=e.autoHideContainer,j=void 0===S||S,E=e.templates,T=void 0===E?d["default"]:E,P=e.collapsible,$=void 0!==P&&P,N=e.transformData;if(!t||!n||!n.length)throw new Error(p);var R=(0,s.getContainerNode)(t),M=(0,c["default"])(f["default"]);!0===j&&(M=(0,l["default"])(M));var D=n[0],A={root:(0,u["default"])(h(null),k.root),header:(0,u["default"])(h("header"),k.header),body:(0,u["default"])(h("body"),k.body),footer:(0,u["default"])(h("footer"),k.footer),list:(0,u["default"])(h("list"),k.list),depth:h("list","lvl"),item:(0,u["default"])(h("item"),k.item),active:(0,u["default"])(h("item","active"),k.active),link:(0,u["default"])(h("link"),k.link),count:(0,u["default"])(h("count"),k.count)};return{getConfiguration:function(e){return{hierarchicalFacets:[{name:D,attributes:n,separator:i,rootPath:v,showParentLevel:y}],maxValuesPerFacet:void 0!==e.maxValuesPerFacet?Math.max(e.maxValuesPerFacet,_):_}},init:function(e){var t=e.helper,n=e.templatesConfig;this._toggleRefinement=function(e){return t.toggleRefinement(D,e).search()},this._templateProps=(0,s.prepareTemplateProps)({transformData:N,defaultTemplates:d["default"],templatesConfig:n,templates:T})},_prepareFacetValues:function(e,t){var n=this;return e.slice(0,_).map(function(e){return Array.isArray(e.data)&&(e.data=n._prepareFacetValues(e.data,t)),e})},render:function(e){function t(e){return i(r.toggleRefinement(D,e))}var n=e.results,r=e.state,i=e.createURL,s=n.getFacetValues(D,{sortBy:w}).data||[];s=this._prepareFacetValues(s,r),a["default"].render(o(M,{attributeNameKey:"path",collapsible:$,createURL:t,cssClasses:A,facetValues:s,shouldAutoHideContainer:0===s.length,templateProps:this._templateProps,toggleRefinement:this._toggleRefinement}),R)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(382)),l=r(n(383)),c=r(n(384)),d=r(n(398)),f=r(n(399)),h=(0,s.bemHelper)("ais-hierarchical-menu"),p="Usage:\nhierarchicalMenu({\n container,\n attributes,\n [ separator=' > ' ],\n [ rootPath ],\n [ showParentLevel=true ],\n [ limit=10 ],\n [ sortBy=['name:asc'] ],\n [ cssClasses.{root , header, body, footer, list, depth, item, active, link}={} ],\n [ templates.{header, item, footer} ],\n [ transformData ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t){"use strict";
269Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<a class="{{cssClasses.link}}" href="{{url}}">{{name}} <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=r(n(223)),f=r(n(382)),h=n(378),p=r(n(385)),m=r(n(400)),v=r(n(129)),g=function(){function e(t){o(this,e);var n=a(this,Object.getPrototypeOf(e).call(this,t));return n.state={isShowMoreOpen:!1},n.handleItemClick=n.handleItemClick.bind(n),n.handleClickShowMore=n.handleClickShowMore.bind(n),n}return s(e,d["default"].Component),c(e,[{key:"shouldComponentUpdate",value:function(e,t){return t!==this.state||!(0,v["default"])(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e,t){this.props.toggleRefinement(e,t)}},{key:"_generateFacetItem",value:function(t){var n=void 0;t.data&&t.data.length>0&&(n=d["default"].createElement(e,l({},this.props,{depth:this.props.depth+1,facetValues:t.data})));var r=this.props.createURL(t.name),o=l({},t,{url:r,cssClasses:this.props.cssClasses}),a=(0,f["default"])(this.props.cssClasses.item,i({},this.props.cssClasses.active,t.isRefined)),s=t[this.props.attributeNameKey];return void 0!==t.isRefined&&(s+="/"+t.isRefined),void 0!==t.count&&(s+="/"+t.count),u(m["default"],{facetValueToRefine:t[this.props.attributeNameKey],handleClick:this.handleItemClick,isRefined:t.isRefined,itemClassName:a,subItems:n,templateData:o,templateKey:"item",templateProps:this.props.templateProps},s)}},{key:"handleItemClick",value:function(e){var t=e.facetValueToRefine,n=e.originalEvent,r=e.isRefined;if(!(0,h.isSpecialClick)(n)){if("INPUT"===n.target.tagName)return void this.refine(t,r);for(var i=n.target;i!==n.currentTarget;){if("LABEL"===i.tagName&&(i.querySelector('input[type="checkbox"]')||i.querySelector('input[type="radio"]')))return;"A"===i.tagName&&i.href&&n.preventDefault(),i=i.parentNode}n.stopPropagation(),this.refine(t,r)}}},{key:"handleClickShowMore",value:function(){var e=!this.state.isShowMoreOpen;this.setState({isShowMoreOpen:e})}},{key:"render",value:function(){var e=[this.props.cssClasses.list];this.props.cssClasses.depth&&e.push(""+this.props.cssClasses.depth+this.props.depth);var t=this.state.isShowMoreOpen?this.props.limitMax:this.props.limitMin,n=this.props.facetValues.slice(0,t),r=this.props.showMore?d["default"].createElement(p["default"],l({rootProps:{onClick:this.handleClickShowMore},templateKey:"show-more-"+(this.state.isShowMoreOpen?"active":"inactive")},this.props.templateProps)):void 0;return u("div",{className:(0,f["default"])(e)},void 0,n.map(this._generateFacetItem,this),r)}}]),e}();
269g.defaultProps={cssClasses:{},depth:0,attributeNameKey:"name"},t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(223)),d=r(n(385)),f=r(n(129)),h=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,c["default"].Component),l(e,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,f["default"])(this.props,e)}},{key:"handleClick",value:function(e){this.props.handleClick({facetValueToRefine:this.props.facetValueToRefine,isRefined:this.props.isRefined,originalEvent:e})}},{key:"render",value:function(){return u("div",{className:this.props.itemClassName,onClick:this.handleClick},void 0,c["default"].createElement(d["default"],s({data:this.props.templateData,templateKey:this.props.templateKey},this.props.templateProps)),this.props.subItems)}}]),e}();t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.templates,h=void 0===i?c["default"]:i,p=e.transformData,m=e.hitsPerPage,v=void 0===m?20:m;
269if(!t)throw new Error("Must provide a container."+f);if(h.item&&h.allItems)throw new Error("Must contain only allItems OR item template."+f);var g=(0,s.getContainerNode)(t),y={root:(0,u["default"])(d(null),r.root),item:(0,u["default"])(d("item"),r.item),empty:(0,u["default"])(d(null,"empty"),r.empty)};return{getConfiguration:function(){return{hitsPerPage:v}},init:function(e){var t=e.templatesConfig;this._templateProps=(0,s.prepareTemplateProps)({transformData:p,defaultTemplates:c["default"],templatesConfig:t,templates:h})},render:function(e){var t=e.results;a["default"].render(o(l["default"],{cssClasses:y,hits:t.hits,results:t,templateProps:this._templateProps}),g)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(382)),l=r(n(402)),c=r(n(403)),d=(0,s.bemHelper)("ais-hits"),f="\nUsage:\nhits({\n container,\n [ cssClasses.{root,empty,item}={} ],\n [ templates.{empty,item} | templates.{empty, allItems} ],\n [ transformData.{empty=identity,item=identity} | transformData.{empty, allItems} ],\n [ hitsPerPage=20 ]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(223)),d=r(n(55)),f=r(n(385)),h=r(n(129)),p=r(n(382)),m=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,c["default"].Component),l(e,[{key:"shouldComponentUpdate",value:function(e){return 0===this.props.results.hits.length||this.props.results.hits.length!==e.results.hits.length||!(0,h["default"])(this.props.results.hits,e.results.hits)}},{key:"renderWithResults",value:function(){var e=this,t=(0,d["default"])(this.props.results.hits,function(t){return c["default"].createElement(f["default"],u({data:t,key:t.objectID,rootProps:{className:e.props.cssClasses.item},templateKey:"item"},e.props.templateProps))});return s("div",{className:this.props.cssClasses.root},void 0,t)}},{key:"renderAllResults",value:function(){return c["default"].createElement(f["default"],u({data:this.props.results,rootProps:{className:this.props.cssClasses.allItems},templateKey:"allItems"},this.props.templateProps))}},{key:"renderNoResults",value:function(){return c["default"].createElement(f["default"],u({data:this.props.results,rootProps:{className:(0,p["default"])(this.props.cssClasse
269s.root,this.props.cssClasses.empty)},templateKey:"empty"},this.props.templateProps))}},{key:"render",value:function(){return this.props.results.hits.length>0?this.props.templateProps&&this.props.templateProps.templates&&this.props.templateProps.templates.allItems?this.renderAllResults():this.renderWithResults():this.renderNoResults()}}]),e}();m.defaultProps={results:{hits:[]}},t["default"]=m},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={empty:"No results",item:function(e){return JSON.stringify(e,null,2)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.options,r=e.cssClasses,i=void 0===r?{}:r,p=e.autoHideContainer,m=void 0!==p&&p;if(!t||!n)throw new Error(h);var v=(0,s.getContainerNode)(t),g=d["default"];!0===m&&(g=(0,c["default"])(g));var y={root:(0,l["default"])(f(null),i.root),item:(0,l["default"])(f("item"),i.item)};return{init:function(e){var t=e.helper,r=e.state;(0,u["default"])(n,function(e){return+r.hitsPerPage==+e.value})||(void 0===r.hitsPerPage?window.console&&window.console.log("[Warning][hitsPerPageSelector] hitsPerPage not defined. You should probably used a `hits` widget or set the value `hitsPerPage` using the searchParameters attribute of the instantsearch constructor."):window.console&&window.console.log("[Warning][hitsPerPageSelector] No option in `options` with `value: hitsPerPage` (hitsPerPage: "+r.hitsPerPage+")"),n=[{value:void 0,label:""}].concat(n)),this.setHitsPerPage=function(e){return t.setQueryParameter("hitsPerPage",+e).search()}},render:function(e){var t=e.state,r=e.results,i=t.hitsPerPage,s=0===r.nbHits;a["default"].render(o(g,{cssClasses:y,currentValue:i,options:n,setValue:this.setHitsPerPage,shouldAutoHideContainer:s}),v)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(405)),l=r(n(382)),c=r(n(383)),d=r(n(408)),f=(0,s.bemHelper)("ais-hits-per-page-selector"),h="Usage:\nhitsPerPageSelector({\n container,\n options,\n [ cssClasses.{root,item}={} ],\n [ autoHideContainer=false ]\n})";t["default"]=i},function(e,t,n){e.exports=n(406)},function(e,t,n){function r(e,t,n){var r=s(e)?i:a;return n&&u(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=o(t,n,3)),r(e,t)}var i=n(63),o=n(57),a=n(407),s=n(34),u=n(54);e.exports=r},function(e,t,n){function r(e,t){var n;return i(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}var i=n(17);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}
269return a(e,l["default"].Component),u(e,[{key:"componentWillMount",value:function(){this.handleChange=this.handleChange.bind(this)}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"handleChange",value:function(e){this.props.setValue(e.target.value)}},{key:"render",value:function(){var e=this,t=this.props,n=t.currentValue,r=t.options;return s("select",{className:this.props.cssClasses.root,defaultValue:n,onChange:this.handleChange},void 0,r.map(function(t){return s("option",{className:e.props.cssClasses.item,value:t.value},t.value,t.label)}))}}]),e}();t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributeName,r=e.sortBy,i=void 0===r?["count:desc","name:asc"]:r,g=e.limit,y=void 0===g?10:g,b=e.cssClasses,_=void 0===b?{}:b,x=e.templates,w=void 0===x?h["default"]:x,C=e.collapsible,k=void 0!==C&&C,S=e.transformData,j=e.autoHideContainer,E=void 0===j||j,T=e.showMore,P=void 0!==T&&T,$=(0,f["default"])(P);if($&&$.limit<y)throw new Error("showMore.limit configuration should be > than the limit in the main configuration");var N=$&&$.limit||y;if(!t||!n)throw new Error(v);var R=(0,u.getContainerNode)(t),M=(0,d["default"])(p["default"]);!0===E&&(M=(0,c["default"])(M));var D=n,A=$&&(0,u.prefixKeys)("show-more-",$.templates),I=A?a({},w,A):w,O={root:(0,l["default"])(m(null),_.root),header:(0,l["default"])(m("header"),_.header),body:(0,l["default"])(m("body"),_.body),footer:(0,l["default"])(m("footer"),_.footer),list:(0,l["default"])(m("list"),_.list),item:(0,l["default"])(m("item"),_.item),active:(0,l["default"])(m("item","active"),_.active),link:(0,l["default"])(m("link"),_.link),count:(0,l["default"])(m("count"),_.count)};return{getConfiguration:function(e){var t={hierarchicalFacets:[{name:D,attributes:[n]}]},r=e.maxValuesPerFacet||0;return t.maxValuesPerFacet=Math.max(r,N),t},init:function(e){var t=e.templatesConfig,n=e.helper,r=e.createURL;this._templateProps=(0,u.prepareTemplateProps)({transformData:S,defaultTemplates:h["default"],templatesConfig:t,templates:I}),this._createURL=function(e,t){return r(e.toggleRefinement(D,t))},this._toggleRefinement=function(e){return n.toggleRefinement(D,e).search()}},_prepareFacetValues:function(e,t){var n=this;return e.map(function(e){return e.url=n._createURL(t,e),e})},render:function(e){function t(e){return u(a.toggleRefinement(n,e))}var r=e.results,a=e.state,u=e.createURL,l=r.getFacetValues(D,{sortBy:i}).data||[];l=this._prepareFacetValues(l,a),s["default"].render(o(M,{collapsible:k,createURL:t,cssClasses:O,facetValues:l,limitMax:N,limitMin:y,shouldAutoHideContainer:0===l.length,showMore:null!==$,templateProps:this._templateProps,toggleRefinement:this._toggleRefinement}),R)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=r((r(n(223)),n(376))),u=n(378),l=r(n(382)),c=r(n(383)),d=r(n(384)),f=r(n(410)),h=r(n(412)),p=r(n(399)),m=(0,u.bemHelper)("ais-menu"),v="Usage:\nmenu({\n container,\n attributeName,\n [ sortBy=['count:desc', 'name:asc'] ],\n [ limit=10 ],\n [ cssClasses.{root,list,item} ],\n [ templates.{header,item,footer} ],\n [ transformData ],\n [ autoHideContainer ],\n [ showMore.{templates: {active, inactive}, limit} ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(!e)return null;if(!0===e)return a;var t=o({},e);return e.templates||(t.templates=a.templates),e.limit||(t.limit=a.limit),t}
269Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=i;var a={templates:r(n(411))["default"],limit:100}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={active:'<a class="ais-show-more ais-show-more__active">Show less</a>',inactive:'<a class="ais-show-more ais-show-more__inactive">Show more</a>'}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<a class="{{cssClasses.link}}" href="{{url}}">{{name}} <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.container,n=e.attributeName,r=e.operator,o=void 0===r?"or":r,y=e.sortBy,b=void 0===y?["count:desc","name:asc"]:y,_=e.limit,x=void 0===_?10:_,w=e.cssClasses,C=void 0===w?{}:w,k=e.templates,S=void 0===k?p["default"]:k,j=e.collapsible,E=void 0!==j&&j,T=e.transformData,P=e.autoHideContainer,$=void 0===P||P,N=e.showMore,R=void 0!==N&&N,M=(0,h["default"])(R);if(M&&M.limit<x)throw new Error("showMore.limit configuration should be > than the limit in the main configuration");var D=M&&M.limit||x,A=m["default"];if(!t||!n)throw new Error(g);A=(0,f["default"])(A),!0===$&&(A=(0,d["default"])(A));var I=(0,l.getContainerNode)(t);if(o&&("and"!==(o=o.toLowerCase())&&"or"!==o))throw new Error(g);var O=M&&(0,l.prefixKeys)("show-more-",M.templates),F=O?s({},S,O):S,L={root:(0,c["default"])(v(null),C.root),header:(0,c["default"])(v("header"),C.header),body:(0,c["default"])(v("body"),C.body),footer:(0,c["default"])(v("footer"),C.footer),list:(0,c["default"])(v("list"),C.list),item:(0,c["default"])(v("item"),C.item),active:(0,c["default"])(v("item","active"),C.active),label:(0,c["default"])(v("label"),C.label),checkbox:(0,c["default"])(v("checkbox"),C.checkbox),count:(0,c["default"])(v("count"),C.count)};return{getConfiguration:function(e){var t=i({},"and"===o?"facets":"disjunctiveFacets",[n]),r=e.maxValuesPerFacet||0;return t.maxValuesPerFacet=Math.max(r,D),t},init:function(e){var t=e.templatesConfig,r=e.helper;this._templateProps=(0,l.prepareTemplateProps)({transformData:T,defaultTemplates:p["default"],templatesConfig:t,templates:F}),this.toggleRefinement=function(e){return r.toggleRefinement(n,e).search()}},render:function(e){function t(e){return o(i.toggleRefinement(n,e))}var r=e.results,i=e.state,o=e.createURL,s=r.getFacetValues(n,{sortBy:b});u["default"].render(a(A,{collapsible:E,createURL:t,cssClasses:L,facetValues:s,limitMax:D,limitMin:x,shouldAutoHideContainer:0===s.length,showMore:null!==M,templateProps:this._templateProps,toggleRefinement:this.toggleRefinement}),I)}}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=r((r(n(223)),n(376))),l=n(378),c=r(n(382)),d=r(n(383)),f=r(n(384)),h=r(n(410)),p=r(n(414)),m=r(n(399)),v=(0,l.bemHelper)("ais-refinement-list"),g="Usage:\nrefinementList({\n container,\n attributeName,\n [ operator='or' ],\n [ sortBy=['count:desc', 'name:asc'] ],\n [ limit=10 ],\n [ cssClasses.{root, header, body, footer, list, item, active, label, checkbox, count}],\n [ templates.{header,item,footer} ],\n [ transformData ],\n [ autoHideContainer=true ],\n [ collapsible=false ],\n [ showMore.{templates: {active, inactive}, limit} ],\n [ collapsible=false ]\n})";t["default"]=o},function(e,t){"use strict";
269Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="checkbox" class="{{cssClasses.checkbox}}" value="{{name}}" {{#isRefined}}checked{{/isRefined}} />{{name}}\n <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>\n</label>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){ 270var t=e.container,n=e.attributeName,r=e.options,i=e.cssClasses,s=void 0===i?{}:i,f=e.templates,h=void 0===f?v["default"]:f,_=e.collapsible,x=void 0!==_&&_,w=e.transformData,C=e.autoHideContainer,k=void 0===C||C;if(!t||!n||!r)throw new Error(b);var S=(0,c.getContainerNode)(t),j=(0,m["default"])(g["default"]);!0===k&&(j=(0,p["default"])(j));var E={root:(0,d["default"])(y(null),s.root),header:(0,d["default"])(y("header"),s.header),body:(0,d["default"])(y("body"),s.body),footer:(0,d["default"])(y("footer"),s.footer),list:(0,d["default"])(y("list"),s.list),item:(0,d["default"])(y("item"),s.item),label:(0,d["default"])(y("label"),s.label),radio:(0,d["default"])(y("radio"),s.radio),active:(0,d["default"])(y("item","active"),s.active)};return{init:function(e){var t=e.templatesConfig,i=e.helper;this._templateProps=(0,c.prepareTemplateProps)({transformData:w,defaultTemplates:v["default"],templatesConfig:t,templates:h}),this._toggleRefinement=function(e){return i.setState(a(i.state,n,r,e)).search()}},render:function(e){function t(e){return c(a(s,n,r,e))}var i=e.results,s=e.state,c=e.createURL,d=r.map(function(e){return e.isRefined=o(s,n,e),e.attributeName=n,e});l["default"].render(u(j,{collapsible:x,createURL:t,cssClasses:E,facetValues:d,shouldAutoHideContainer:0===i.nbHits,templateProps:this._templateProps,toggleRefinement:this._toggleRefinement}),S)}}}function o(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end&&n.start===n.end?s(r,"=",n.start):void 0!==n.start?s(r,">=",n.start):void 0!==n.end?s(r,"<=",n.end):void 0===n.start&&void 0===n.end?0===Object.keys(r).length:void 0}function a(e,t,n,r){var i=(0,f["default"])(n,{name:r}),a=e.getNumericRefinements(t);if(void 0===i.start&&void 0===i.end)return e.clearRefinements(t);if(o(e,t,i)||(e=e.clearRefinements(t)),void 0!==i.start&&void 0!==i.end){if(i.start>i.end)throw new Error("option.start should be > to option.end");if(i.start===i.end)return s(a,"=",i.start)?e.removeNumericRefinement(t,"=",i.start):e.addNumericRefinement(t,"=",i.start)}return void 0!==i.start&&(e=s(a,">=",i.start)?e.removeNumericRefinement(t,">=",i.start):e.addNumericRefinement(t,">=",i.start)),void 0!==i.end&&(e=s(a,"<=",i.end)?e.removeNumericRefinement(t,"<=",i.end):e.addNumericRefinement(t,"<=",i.end)),e}function s(e,t,n){var r=void 0!==e[t],i=(0,h["default"])(e[t],n);return r&&i}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=r((r(n(223)),n(376))),c=n(378),d=r(n(382)),f=r(n(131)),h=r(n(184)),p=r(n(383)),m=r(n(384)),v=r(n(416)),g=r(n(399)),y=(0,c.bemHelper)("ais-refinement-list"),b="Usage:\nnumericRefinementList({\n container,\n attributeName,\n options,\n [ cssClasses.{root,header,body,footer,list,item,active,label,checkbox,count} ],\n [ templates.{header,item,footer} ],\n [ transformData ],\n [ autoHideContainer ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="radio" class="{{cssClasses.checkbox}}" name="{{attributeName}}" {{#isRefined}}checked{{/isRefined}} />{{name}}\n</label>',footer:""}},function(e,t,n){"use strict";
270function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.container,n=e.operator,r=void 0===n?"=":n,i=e.attributeName,h=e.options,p=e.cssClasses,m=void 0===p?{}:p,v=e.autoHideContainer,g=void 0!==v&&v,y=(0,s.getContainerNode)(t),b="Usage: numericSelector({container, attributeName, options[, cssClasses.{root,item}, autoHideContainer]})",_=d["default"];if(!0===g&&(_=(0,c["default"])(_)),!t||!h||0===h.length||!i)throw new Error(b);var x={root:(0,u["default"])(f(null),m.root),item:(0,u["default"])(f("item"),m.item)};return{init:function(e){var t=e.helper,n=this._getRefinedValue(t)||h[0].value;void 0!==n&&t.addNumericRefinement(i,r,n),this._refine=function(e){t.clearRefinements(i),void 0!==e&&t.addNumericRefinement(i,r,e),t.search()}},render:function(e){var t=e.helper,n=e.results;a["default"].render(o(_,{cssClasses:x,currentValue:this._getRefinedValue(t),options:h,setValue:this._refine,shouldAutoHideContainer:0===n.nbHits}),y)},_getRefinedValue:function(e){var t=e.getRefinements(i),n=(0,l["default"])(t,{operator:r});return n&&void 0!==n.value&&void 0!==n.value[0]?n.value[0]:void 0}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(382)),l=r(n(131)),c=r(n(383)),d=r(n(408)),f=(0,s.bemHelper)("ais-numeric-selector");t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.labels,m=void 0===i?{}:i,v=e.maxPages,g=e.padding,y=void 0===g?3:g,b=e.showFirstLast,_=void 0===b||b,x=e.autoHideContainer,w=void 0===x||x,C=e.scrollTo,k=void 0===C?"body":C;if(!t)throw new Error(p);!0===k&&(k="body");var S=(0,l.getContainerNode)(t),j=!1!==k&&(0,l.getContainerNode)(k),E=d["default"];!0===w&&(E=(0,c["default"])(E));var T={root:(0,u["default"])(h(null),r.root),item:(0,u["default"])(h("item"),r.item),link:(0,u["default"])(h("link"),r.link),page:(0,u["default"])(h("item","page"),r.page),previous:(0,u["default"])(h("item","previous"),r.previous),next:(0,u["default"])(h("item","next"),r.next),first:(0,u["default"])(h("item","first"),r.first),last:(0,u["default"])(h("item","last"),r.last),active:(0,u["default"])(h("item","active"),r.active),disabled:(0,u["default"])(h("item","disabled"),r.disabled)};return m=(0,s["default"])(m,f),{init:function(e){var t=e.helper;this.setCurrentPage=function(e){t.setCurrentPage(e),!1!==j&&j.scrollIntoView(),t.search()}},getMaxPage:function(e){return void 0!==v?Math.min(v,e.nbPages):e.nbPages},render:function(e){var t=e.results,n=e.state,r=e.createURL;a["default"].render(o(E,{createURL:function(e){return r(n.setPage(e))},cssClasses:T,currentPage:t.page,labels:m,nbHits:t.nbHits,nbPages:this.getMaxPage(t),padding:y,setCurrentPage:this.setCurrentPage,shouldAutoHideContainer:0===t.nbHits,showFirstLast:_}),S)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=r(n(136)),u=r(n(382)),l=n(378),c=r(n(383)),d=r(n(419)),f={previous:"\u2039",next:"\u203a",first:"\xab",last:"\xbb"},h=(0,l.bemHelper)("ais-pagination"),p="Usage:\npagination({\n container,\n [ cssClasses.{root,item,page,previous,next,first,last,active,disabled}={} ],\n [ labels.{previous,next,first,last}
270 ],\n [ maxPages ],\n [ padding=3 ],\n [ showFirstLast=true ],\n [ autoHideContainer=true ],\n [ scrollTo='body' ]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=r(n(15)),d=r(n(420)),f=n(378),h=r(n(422)),p=r(n(424)),m=r(n(382)),v=function(){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,(0,d["default"])(t,e.defaultProps)));return n.handleClick=n.handleClick.bind(n),n}return a(e,l["default"].Component),u(e,[{key:"pageLink",value:function(e){var t=e.label,n=e.ariaLabel,r=e.pageNumber,i=e.additionalClassName,o=void 0===i?null:i,a=e.isDisabled,u=void 0!==a&&a,l=e.isActive,c=void 0!==l&&l,d=e.createURL,f={item:(0,m["default"])(this.props.cssClasses.item,o),link:(0,m["default"])(this.props.cssClasses.link)};u?f.item=(0,m["default"])(f.item,this.props.cssClasses.disabled):c&&(f.item=(0,m["default"])(f.item,this.props.cssClasses.active));var h=d&&!u?d(r):"#";return s(p["default"],{ariaLabel:n,cssClasses:f,handleClick:this.handleClick,label:t,pageNumber:r,url:h},t+r)}},{key:"previousPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Previous",additionalClassName:this.props.cssClasses.previous,isDisabled:e.isFirstPage(),label:this.props.labels.previous,pageNumber:e.currentPage-1,createURL:t})}},{key:"nextPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Next",additionalClassName:this.props.cssClasses.next,isDisabled:e.isLastPage(),label:this.props.labels.next,pageNumber:e.currentPage+1,createURL:t})}},{key:"firstPageLink",value:function(e,t){return this.pageLink({ariaLabel:"First",additionalClassName:this.props.cssClasses.first,
270isDisabled:e.isFirstPage(),label:this.props.labels.first,pageNumber:0,createURL:t})}},{key:"lastPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Last",additionalClassName:this.props.cssClasses.last,isDisabled:e.isLastPage(),label:this.props.labels.last,pageNumber:e.total-1,createURL:t})}},{key:"pages",value:function(e,t){var n=this,r=[];return(0,c["default"])(e.pages(),function(i){var o=i===e.currentPage;r.push(n.pageLink({ariaLabel:i+1,additionalClassName:n.props.cssClasses.page,isActive:o,label:i+1,pageNumber:i,createURL:t}))}),r}},{key:"handleClick",value:function(e,t){(0,f.isSpecialClick)(t)||(t.preventDefault(),this.props.setCurrentPage(e))}},{key:"render",value:function(){var e=new h["default"]({currentPage:this.props.currentPage,total:this.props.nbPages,padding:this.props.padding}),t=this.props.createURL;return s("ul",{className:this.props.cssClasses.root},void 0,this.props.showFirstLast?this.firstPageLink(e,t):null,this.previousPageLink(e,t),this.pages(e,t),this.nextPageLink(e,t),this.props.showFirstLast?this.lastPageLink(e,t):null)}}]),e}();v.defaultProps={nbHits:0,currentPage:0,nbPages:0},t["default"]=v},function(e,t,n){var r=n(140)(n(80),n(421));e.exports=r},function(e,t,n){function r(e,t){return void 0===e?t:i(e,t,r)}var i=n(80);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(423)),s=function(){function e(t){i(this,e),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return o(e,[{key:"pages",value:function(){var e=this.total,t=this.currentPage,n=this.padding,r=this.nbPagesDisplayed(n,e);if(r===e)return(0,a["default"])(0,e);var i=this.calculatePaddingLeft(t,n,e,r),o=t-i,s=t+(r-i);return(0,a["default"])(o,s)}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return t>=e?e:e>=n-t?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}]),e}();t["default"]=s},function(e,t,n){function r(e,t,n){n&&i(e,t,n)&&(t=n=void 0),e=+e||0,null==t?(t=e,e=0):t=+t||0;for(var r=-1,s=a(o((t-e)/((n=null==n?1:+n||0)||1)),0),u=Array(s);++r<s;)u[r]=e,e+=n;return u}var i=n(54),o=Math.ceil,a=Math.max;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=r(n(129)),d=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}
270return a(e,l["default"].Component),u(e,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,c["default"])(this.props,e)}},{key:"handleClick",value:function(e){this.props.handleClick(this.props.pageNumber,e)}},{key:"render",value:function(){var e=this.props,t=e.cssClasses,n=e.label,r=e.ariaLabel,i=e.url;return s("li",{className:t.item},void 0,s("a",{ariaLabel:r,className:t.link,dangerouslySetInnerHTML:{__html:n},href:i,onClick:this.handleClick}))}}]),e}();t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributeName,r=e.cssClasses,i=void 0===r?{}:r,g=e.templates,y=void 0===g?c["default"]:g,b=e.collapsible,_=void 0!==b&&b,x=e.labels,w=void 0===x?{}:x,C=e.currency,k=void 0===C?"$":C,S=e.autoHideContainer,j=void 0===S||S;if(!t||!n)throw new Error(v);var E=(0,u.getContainerNode)(t),T=(0,f["default"])(p["default"]);!0===j&&(T=(0,d["default"])(T));var P=a({button:"Go",separator:"to"},w),$={root:(0,h["default"])(m(null),i.root),header:(0,h["default"])(m("header"),i.header),body:(0,h["default"])(m("body"),i.body),list:(0,h["default"])(m("list"),i.list),link:(0,h["default"])(m("link"),i.link),item:(0,h["default"])(m("item"),i.item),active:(0,h["default"])(m("item","active"),i.active),form:(0,h["default"])(m("form"),i.form),label:(0,h["default"])(m("label"),i.label),input:(0,h["default"])(m("input"),i.input),currency:(0,h["default"])(m("currency"),i.currency),button:(0,h["default"])(m("button"),i.button),separator:(0,h["default"])(m("separator"),i.separator),footer:(0,h["default"])(m("footer"),i.footer)};return void 0!==w.currency&&w.currency!==k&&(k=w.currency),{getConfiguration:function(){return{facets:[n]}},_generateRanges:function(e){var t=e.getFacetStats(n);return(0,l["default"])(t)},_extractRefinedRange:function(e){var t=e.getRefinements(n),r=void 0,i=void 0;return 0===t.length?[]:(t.forEach(function(e){-1!==e.operator.indexOf(">")?r=Math.floor(e.value[0]):-1!==e.operator.indexOf("<")&&(i=Math.ceil(e.value[0]))}),[{from:r,to:i,isRefined:!0}])},_refine:function(e,t,r){var i=this._extractRefinedRange(e);e.clearRefinements(n),0!==i.length&&i[0].from===t&&i[0].to===r||(void 0!==t&&e.addNumericRefinement(n,">=",Math.floor(t)),void 0!==r&&e.addNumericRefinement(n,"<=",Math.ceil(r))),e.search()},init:function(e){var t=e.helper,n=e.templatesConfig;this._refine=this._refine.bind(this,t),this._templateProps=(0,u.prepareTemplateProps)({defaultTemplates:c["default"],templatesConfig:n,templates:y})},render:function(e){var t=e.results,r=e.helper,i=e.state,a=e.createURL,u=void 0;t.hits.length>0?0===(u=this._extractRefinedRange(r)).length&&(u=this._generateRanges(t)):u=[],u.map(function(e){var t=i.clearRefinements(n);return e.isRefined||(void 0!==e.from&&(t=t.addNumericRefinement(n,">=",Math.floor(e.from))),void 0!==e.to&&(t=t.addNumericRefinement(n,"<=",Math.ceil(e.to)))),e.url=a(t),e}),s["default"].render(o(T,{collapsible:_,cssClasses:$,currency:k,facetValues:u,labels:P,refine:this._refine,shouldAutoHideContainer:0===u.length,templateProps:this._templateProps}),E)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=r((r(n(223)),n(376))),u=n(378),l=r(n(426)),c=r(n(427)),d=r(n(383)),f=r(n(384)),h=r(n(382)),p=r(n(428)),m=(0,u.bemHelper)("ais-price-ranges"),v="Usage:\npriceRanges({\n container,\n attributeName,\n [ currency=$ ],\n [ cssClasse
270s.{root,header,body,list,item,active,link,form,label,input,currency,separator,button,footer} ],\n [ templates.{header,item,footer} ],\n [ labels.{currency,separator,button} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t){"use strict";function n(e,t){var n=Math.round(e/t)*t;return 1>n&&(n=1),n}function r(e){var t=void 0;t=e.avg<100?1:e.avg<1e3?10:100;for(var r=n(Math.round(e.avg),t),i=Math.ceil(e.min),o=n(Math.floor(e.max),t);o>e.max;)o-=t;var a=void 0,s=void 0,u=[];if(i!==o){for(a=i,u.push({to:a});r>a;)(s=u[u.length-1].to)>=(a=n(s+(r-i)/3,t))&&(a=s+1),u.push({from:s,to:a});for(;o>a;)(s=u[u.length-1].to)>=(a=n(s+(o-r)/3,t))&&(a=s+1),u.push({from:s,to:a});1===u.length&&a!==r&&(u.push({from:a,to:r}),a=r),1===u.length?(u[0].from=e.min,u[0].to=e.max):delete u[u.length-1].to}return u}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:"\n {{#from}}\n {{^to}}\n ≥\n {{/to}}\n {{currency}}{{from}}\n {{/from}}\n {{#to}}\n {{#from}}\n -\n {{/from}}\n {{^from}}\n ≤\n {{/from}}\n {{to}}\n {{/to}}\n ",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=r(n(223)),f=r(n(385)),h=r(n(429)),p=r(n(382)),m=r(n(129)),v=function(){function e(){return o(this,e),a(this,Object.getPrototypeOf(e).apply(this,arguments))}return s(e,d["default"].Component),c(e,[{key:"componentWillMount",value:function(){this.refine=this.refine.bind(this),this.form=this.getForm()}},{key:"shouldComponentUpdate",value:function(e){return!(0,m["default"])(this.props.facetValues,e.facetValues)}},{key:"getForm",value:function(){var e=l({currency:this.props.currency},this.props.labels);return u(h["default"],{cssClasses:this.props.cssClasses,labels:e,refine:this.refine})}},{key:"getItemFromFacetValue",value:function(e){var t=(0,p["default"])(this.props.cssClasses.item,i({},this.props.cssClasses.active,e.isRefined)),n=e.from+"_"+e.to,r=this.refine.bind(this,e.from,e.to),o=l({currency:this.props.currency},e);return u("div",{className:t},n,u("a",{className:this.props.cssClasses.link,href:e.url,onClick:r},void 0,d["default"].createElement(f["default"],l({data:o,templateKey:"item"},this.props.templateProps))))}},{key:"refine",value:function(e,t,n){n.preventDefault(),this.props.refine(e,t)}},{key:"render",value:function(){var e=this;return u("div",{}
270,void 0,u("div",{className:this.props.cssClasses.list},void 0,this.props.facetValues.map(function(t){return e.getItemFromFacetValue(t)})),this.form)}}]),e}();v.defaultProps={cssClasses:{}},t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,l["default"].Component),u(e,[{key:"componentWillMount",value:function(){this.handleSubmit=this.handleSubmit.bind(this)}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"getInput",value:function(e){return s("label",{className:this.props.cssClasses.label},void 0,s("span",{className:this.props.cssClasses.currency},void 0,this.props.labels.currency," "),l["default"].createElement("input",{className:this.props.cssClasses.input,ref:e,type:"number"}))}},{key:"handleSubmit",value:function(e){var t=+this.refs.from.value||void 0,n=+this.refs.to.value||void 0;this.props.refine(t,n,e)}},{key:"render",value:function(){var e=this.getInput("from"),t=this.getInput("to"),n=this.handleSubmit;return l["default"].createElement("form",{className:this.props.cssClasses.form,onSubmit:n,ref:"form"},e,s("span",{className:this.props.cssClasses.separator},void 0," ",this.props.labels.separator," "),t,s("button",{className:this.props.cssClasses.button,type:"submit"},void 0,this.props.labels.button))}}]),e}();c.defaultProps={cssClasses:{},labels:{}},t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.container,n=e.placeholder,r=void 0===n?"":n,i=e.cssClasses,a=void 0===i?{}:i,b=e.poweredBy,_=void 0!==b&&b,x=e.wrapInput,w=void 0===x||x,C=e.autofocus,k=void 0===C?"auto":C,S=e.searchOnEnterKeyPressOnly,j=void 0!==S&&S,E=e.queryHook,T=window.addEventListener?"input":"propertychange";if(!t)throw new Error(y);return t=(0,d.getContainerNode)(t),"boolean"!=typeof k&&(k="auto"),{getInput:function(){return"INPUT"===t.tagName?t:document.createElement("input")},wrapInput:function(e){var t=document.createElement("div"),n=(0,h["default"])(m(null),a.root).split(" ");return t.classList.add.apply(t.classList,n),t.appendChild(e),t},addDefaultAttributesToInput:function(e,t){var n={autocapitalize:"off",autocomplete:"off",autocorrect:"off",placeholder:r,role:"textbox",spellcheck:"false",type:"text",value:t};(0,f["default"])(n,function(t,n){e.hasAttribute(n)||e.setAttribute(n,t)});var i=(0,h["default"])(m("input"),a.input).split(" ");e.classList.add.apply(e.classList,i)},addPoweredBy:function(e){var t=document.createElement("div");e.parentNode.insertBefore(t,e.nextSibling);var n={root:(0,h["default"])(m("powered-by"),a.poweredBy),link:m("powered-by-link")},r="https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&utm_content="+location.hostname+"&utm_campaign=p
270oweredby";c["default"].render(l(p["default"],{cssClasses:n,link:r}),t)},init:function(e){function n(e){return E?void E(e,r):void r(e)}function r(e){a.setQuery(e),a.search()}var i=e.state,a=e.helper,l=e.onHistoryChange,c="INPUT"===t.tagName,d=this._input=this.getInput();if(this.addDefaultAttributesToInput(d,i.query),j?o(d,"keyup",s(v,u(n))):(o(d,T,u(n)),("propertychange"===T||window.attachEvent)&&o(d,"keyup",s(g,u(n)))),c){var f=document.createElement("div");d.parentNode.insertBefore(f,d);var h=d.parentNode,p=w?this.wrapInput(d):d;h.replaceChild(p,f)}else{var m=w?this.wrapInput(d):d;t.appendChild(m)}_&&this.addPoweredBy(d),l(function(e){d.value=e.query||""}),(!0===k||"auto"===k&&""===a.state.query)&&d.focus()},render:function(e){var t=e.helper;document.activeElement!==this._input&&t.state.query!==this._input.value&&(this._input.value=t.state.query)}}}function o(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}function a(e){return(e.currentTarget?e.currentTarget:e.srcElement).value}function s(e,t){return function(n){return n.keyCode===e&&t(n)}}function u(e){return function(t){return e(a(t))}}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),c=r((r(n(223)),n(376))),d=n(378),f=r(n(15)),h=r(n(382)),p=r(n(431)),m=(0,d.bemHelper)("ais-search-box"),v=13,g=8,y="Usage:\nsearchBox({\n container,\n [ placeholder ],\n [ cssClasses.{input,poweredBy} ],\n [ poweredBy ],\n [ wrapInput ],\n [ autofocus ],\n [ searchOnEnterKeyPressOnly ],\n [ queryHook ]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,l["default"].Component),u(e,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"render",value:function(){return s("div",{className:this.props.cssClasses.root},void 0,"Search by",s("a",{className:this.props.cssClasses.link,href:this.props.link,target:"_blank"},void 0,"Algolia"))}}]),e}();t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributeName,r=e.tooltips,o=void 0===r||r,g=e.templates,y=void 0===g?m:g,b=e.collapsible,_=void 0!==b&&b,x=e.cssClasse
270s,w=void 0===x?{}:x,C=e.step,k=void 0===C?1:C,S=e.pips,j=void 0===S||S,E=e.autoHideContainer,T=void 0===E||E,P=e.min,$=e.max;if(!t||!n)throw new Error(v);var N=(0,u.getContainerNode)(t),R=(0,d["default"])(h["default"]);!0===T&&(R=(0,c["default"])(R));var M={root:(0,f["default"])(p(null),w.root),header:(0,f["default"])(p("header"),w.header),body:(0,f["default"])(p("body"),w.body),footer:(0,f["default"])(p("footer"),w.footer)};return{getConfiguration:function(e){var t={disjunctiveFacets:[n]};return void 0===P&&void 0===$||e&&(!e.numericRefinements||void 0!==e.numericRefinements[n])||(t.numericRefinements=i({},n,{}),void 0!==P&&(t.numericRefinements[n][">="]=[P]),void 0!==$&&(t.numericRefinements[n]["<="]=[$])),t},_getCurrentRefinement:function(e){var t=e.state.getNumericRefinement(n,">="),r=e.state.getNumericRefinement(n,"<=");return{min:t=t&&t.length?t[0]:-1/0,max:r=r&&r.length?r[0]:1/0}},_refine:function(e,t,r){e.clearRefinements(n),r[0]>t.min&&e.addNumericRefinement(n,">=",Math.round(r[0])),r[1]<t.max&&e.addNumericRefinement(n,"<=",Math.round(r[1])
270),e.search()},init:function(e){var t=e.templatesConfig;this._templateProps=(0,u.prepareTemplateProps)({defaultTemplates:m,templatesConfig:t,templates:y})}, 271render:function(e){var t=e.results,r=e.helper,i=(0,l["default"])(t.disjunctiveFacets,{name:n}),u=void 0;void 0!==P||void 0!==$?(u={},void 0!==P&&(u.min=P),void 0!==$&&(u.max=$)):u=void 0!==i&&void 0!==i.stats?i.stats:{min:null,max:null};var c=this._getCurrentRefinement(r);void 0!==o.format&&(o=[{to:o.format},{to:o.format}]),s["default"].render(a(R,{collapsible:_,cssClasses:M,onChange:this._refine.bind(this,r,u),pips:j,range:{min:Math.floor(u.min),max:Math.ceil(u.max)},shouldAutoHideContainer:u.min===u.max,start:[c.min,c.max],step:k,templateProps:this._templateProps,tooltips:o}),N)}}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),s=r((r(n(223)),n(376))),u=n(378),l=r(n(131)),c=r(n(383)),d=r(n(384)),f=r(n(382)),h=r(n(433)),p=(0,u.bemHelper)("ais-range-slider"),m={header:"",footer:""},v="Usage:\nrangeSlider({\n container,\n attributeName,\n [ tooltips=true ],\n [ templates.{header, footer} ],\n [ cssClasses.{root, header, body, footer} ],\n [ step=1 ],\n [ pips=true ],\n [ autoHideContainer=true ],\n [ collapsible=false ],\n [ min ],\n [ max ]\n});\n";t["default"]=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=r(n(434)),d=r(n(129)),f="ais-range-slider--",h=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,l["default"].Component),u(e,[{key:"componentWillMount",value:function(){this.handleChange=this.handleChange.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,d["default"])(this.props.range,e.range)||!(0,d["default"])(this.props.start,e.start)}},{key:"handleChange",value:function(e,t,n){this.props.onChange(n)}},{key:"render",value:function(){if(this.props.range.min===this.props.range.max)return null;var e=void 0;return e=!1===this.props.pips?void 0:!0===this.props.pips||"undefined"==typeof this.props.pips?{mode:"positions",density:3,values:[0,50,100],stepped:!0,format:{to:function(e){return Number(e).toLocaleString()}}}:this.props.pips,l["default"].createElement(c["default"],s({},this.props,{animate:!1,behaviour:"snap",connect:!0,cssPrefix:f,onChange:this.handleChange,pips:e}))}}]),e}();t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function(e,t,n){for(var r=!0;r;){var i=e,o=t,a=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,o);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(a)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=o,n=a,r=!0,s=l=void 0}},l=r(n(223)),c=r(n(435)),d=function(){function e(){i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}
271return o(e,l["default"].Component),s(e,[{key:"componentDidMount",value:function(){this.props.disabled?this.sliderContainer.setAttribute("disabled",!0):this.sliderContainer.removeAttribute("disabled"),this.createSlider()}},{key:"componentDidUpdate",value:function(){this.props.disabled?this.sliderContainer.setAttribute("disabled",!0):this.sliderContainer.removeAttribute("disabled"),this.slider.destroy(),this.createSlider()}},{key:"componentWillUnmount",value:function(){this.slider.destroy()}},{key:"createSlider",value:function(){var e=this.slider=c["default"].create(this.sliderContainer,a({},this.props));this.props.onUpdate&&e.on("update",this.props.onUpdate),this.props.onChange&&e.on("change",this.props.onChange),this.props.onSlide&&e.on("slide",this.props.onSlide)}},{key:"render",value:function(){var e=this;return l["default"].createElement("div",{ref:function(t){e.sliderContainer=t}})}}]),e}();d.propTypes={animate:l["default"].PropTypes.bool,behaviour:l["default"].PropTypes.string,connect:l["default"].PropTypes.oneOfType([l["default"].PropTypes.oneOf(["lower","upper"]),l["default"].PropTypes.bool]),cssPrefix:l["default"].PropTypes.string,direction:l["default"].PropTypes.oneOf(["ltr","rtl"]),disabled:l["default"].PropTypes.bool,limit:l["default"].PropTypes.number,margin:l["default"].PropTypes.number,onChange:l["default"].PropTypes.func,onSlide:l["default"].PropTypes.func,onUpdate:l["default"].PropTypes.func,orientation:l["default"].PropTypes.oneOf(["horizontal","vertical"]),pips:l["default"].PropTypes.object,range:l["default"].PropTypes.object.isRequired,start:l["default"].PropTypes.arrayOf(l["default"].PropTypes.number).isRequired,step:l["default"].PropTypes.number,tooltips:l["default"].PropTypes.oneOfType([l["default"].PropTypes.bool,l["default"].PropTypes.arrayOf(l["default"].PropTypes.shape({to:l["default"].PropTypes.func}))])},e.exports=d},function(e,t){var n,r,i;!function(o){r=[],void 0===(i="function"==typeof(n=o)?n.apply(t,r):n)||(e.exports=i)}(function(){"use strict";function e(e){return e.filter(function(e){return!this[e]&&(this[e]=!0)},{})}function t(e,t){return Math.round(e/t)*t}function n(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.documentElement,r=f();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(r.x=0),{top:t.top+r.y-n.clientTop,left:t.left+r.x-n.clientLeft}}function r(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function i(e){var t=Math.pow(10,7);return Number((Math.round(e*t)/t).toFixed(7))}function o(e,t,n){l(e,t),setTimeout(function(){c(e,t)},n)}function a(e){return Math.max(Math.min(e,100),0)}function s(e){return Array.isArray(e)?e:[e]}function u(e){var t=e.split(".");return t.length>1?t[1].length:0}function l(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function d(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function f(){var e=void 0!==window.pageXOffset,t="CSS1Compat"===(document.compatMode||"");return{x:e?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft,y:e?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop}}function h(e){e.stopPropagation()}function p(e){return function(t){return e+t}}function m(){z||(z=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"})}function v(e,t){return 100/(t-e)}function g(e,t){return 100*t/(e[1]-e[0])}function y(e,t){return g(e,e[0]<0?t+Math.abs(e[0]):t-e[0])}function b(e,t){return t*(e[1]-e[0])/100+e[0]}function _(e,t){for(var n=1;e>=t[n];)n+=1;return n}function x(e,t,n){if(n>=e.slice(-1)[0])return 100;var r,i,o,a,s=_(n,e);return r=e[s-1],i=e[s],o=t[s-1],a=t[s],o+y([r,i],n)/v(o,a)}function w(e,t,n){if(n>=100)return e.slice(-1)[0];var r,i=_(n,t);return b([e[i-1],e[i]],(n-(r=t[i-1]))*v(r,t[i]))}function C(e,n,r,i){if(100===i)return i;var o,a,s=_(i,e);return r?i-(o=e[s-1])>((a=e[s])-o)/2?a:o:n[s-1]?e[s-1]+t(i-e[s-1],n[s-1]):i}
271function k(e,t,n){var i;if("number"==typeof t&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(t))throw new Error("noUiSlider: 'range' contains invalid value.");if(!r(i="min"===e?0:"max"===e?100:parseFloat(e))||!r(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");n.xPct.push(i),n.xVal.push(t[0]),i?n.xSteps.push(!isNaN(t[1])&&t[1]):isNaN(t[1])||(n.xSteps[0]=t[1])}function S(e,t,n){return!t||void(n.xSteps[e]=g([n.xVal[e],n.xVal[e+1]],t)/v(n.xPct[e],n.xPct[e+1]))}function j(e,t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t,this.direction=n;var i,o=[];for(i in e)e.hasOwnProperty(i)&&o.push([e[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(e,t){return e[0][0]-t[0][0]}):o.sort(function(e,t){return e[0]-t[0]}),i=0;i<o.length;i++)k(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)S(i,this.xNumSteps[i],this)}function E(e,t){if(!r(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function T(e,t){if("object"!=typeof t||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===t.min||void 0===t.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(t.min===t.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");e.spectrum=new j(t,e.snap,e.dir,e.singleStep)}function P(e,t){if(t=s(t),!Array.isArray(t)||!t.length||t.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function $(e,t){if(e.snap=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function N(e,t){if(e.animate=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function R(e,t){if("lower"===t&&1===e.handles)e.connect=1;else if("upper"===t&&1===e.handles)e.connect=2;else if(!0===t&&2===e.handles)e.connect=3;else{if(!1!==t)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");e.connect=0}}function M(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function D(e,t){if(!r(t))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==t&&(e.margin=e.spectrum.getMargin(t),!e.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function A(e,t){if(!r(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getMargin(t),!e.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function I(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1,e.connect=[0,2,1,3][e.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function O(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,i=t.indexOf("fixed")>=0,o=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0;if(r&&!e.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");e.events={tap:n||o,drag:r,fixed:i,snap:o,hover:a}}function F(e,t){var n;if(!1!==t)if(!0===t)for(e.tooltips=[],n=0;n<e.handles;n++)e.tooltips.push(!0);else{if(e.tooltips=s(t),e.tooltips.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");e.tooltips.forEach(function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function L(e,t){if(e.format=t,"function"==typeof t.to&&"function"==typeof t.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function H(e,t){if(void 0!==t&&"string"!=typeof t)throw new Error("noUiSlider: 'cssPrefix' must be a string.");e.cssPrefix=t}function B(e){var t,n={margin:0,limit:0,animate:!0,format:V};t={step:{r:!1,t:E},start:{r:!0,t:P},connect:{r:!0,t:R},direction:{r:!0,t:I},snap:{r:!1,t:$},animate:{r:!1,t:N},range:{r:!0,t:T},orientation:{r:!1,t:M},margin:{r:!1,t:D},limit:{r:!1,t:A},behaviour:{r:!0,t:O},format:{r:!1,t:L},tooltips:{r:!1,t:F},cssPrefix:{r:!1,t:H}};var r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(t).forEach(function(i){if(void 0===e[i]&&void 0===r[i]){if(t[i].r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}t[i].t(n,void 0===e[i]?r[i]:e[i])}),n.pips=e.pips,n.style=n.ort?"top":"left",n}function U(t,r){function i(e,t,n){var r=e+t[0],i=e+t[1];return n?(0>r&&(i+=Math.abs(r)),i>100&&(r-=i-100),[a(r),a(i)]):[r,i]}function v(e,t){e.preventDefault();
271var n,r,i=0===e.type.indexOf("touch"),o=0===e.type.indexOf("mouse"),a=0===e.type.indexOf("pointer"),s=e;return 0===e.type.indexOf("MSPointer")&&(a=!0),i&&(n=e.changedTouches[0].pageX,r=e.changedTouches[0].pageY),t=t||f(),(o||a)&&(n=e.clientX+t.x,r=e.clientY+t.y),s.pageOffset=t,s.points=[n,r],s.cursor=o||a,s}function g(e,t){var n=document.createElement("div"),r=document.createElement("div"),i=["-lower","-upper"];return e&&i.reverse(),l(r,ie[3]),l(r,ie[3]+i[t]),l(n,ie[2]),n.appendChild(r),n}function y(e,t,n){switch(e){case 1:l(t,ie[7]),l(n[0],ie[6]);break;case 3:l(n[1],ie[6]);case 2:l(n[0],ie[7]);case 0:l(t,ie[6])}}function b(e,t,n){var r,i=[];for(r=0;e>r;r+=1)i.push(n.appendChild(g(t,r)));return i}function _(e,t,n){l(n,ie[0]),l(n,ie[8+e]),l(n,ie[4+t]);var r=document.createElement("div");return l(r,ie[1]),n.appendChild(r),r}function x(e,t){if(!r.tooltips[t])return!1;var n=document.createElement("div");return n.className=ie[18],e.firstChild.appendChild(n)}function w(){r.dir&&r.tooltips.reverse();var e=X.map(x);r.dir&&(e.reverse(),r.tooltips.reverse()),K("update",function(t,n,i){e[n]&&(e[n].innerHTML=!0===r.tooltips[n]?t[n]:r.tooltips[n].to(i[n]))})}function C(e,t,n){if("range"===e||"steps"===e)return te.xVal;if("count"===e){var r,i=100/(t-1),o=0;for(t=[];(r=o++*i)<=100;)t.push(r);e="positions"}return"positions"===e?t.map(function(e){return te.fromStepping(n?te.getStep(e):e)}):"values"===e?n?t.map(function(e){return te.fromStepping(te.getStep(te.toStepping(e)))}):t:void 0}function k(t,n,r){function i(e,t){return(e+t).toFixed(7)/1}var o=te.direction,a={},s=te.xVal[0],u=te.xVal[te.xVal.length-1],l=!1,c=!1,d=0;return te.direction=0,(r=e(r.slice().sort(function(e,t){return e-t})))[0]!==s&&(r.unshift(s),l=!0),r[r.length-1]!==u&&(r.push(u),c=!0),r.forEach(function(e,o){var s,u,f,h,p,m,v,g,y,b=e,_=r[o+1];if("steps"===n&&(s=te.xNumSteps[o]),s||(s=_-b),!1!==b&&void 0!==_)for(u=b;_>=u;u=i(u,s)){for(v=(p=(h=te.toStepping(u))-d)/t,y=p/(g=Math.round(v)),f=1;g>=f;f+=1)a[(d+f*y).toFixed(5)]=["x",0];m=r.indexOf(u)>-1?1:"steps"===n?2:0,!o&&l&&(m=0),u===_&&c||(a[h.toFixed(5)]=[u,m]),d=h}}),te.direction=o,a}function S(e,t,n){function i(e){return["-normal","-large","-sub"][e]}function o(e,t,n){return'class="'+t+" "+t+"-"+s+" "+t+i(n[1])+'" style="'+r.style+": "+e+'%"'}function a(e,r){te.direction&&(e=100-e),r[1]=r[1]&&t?t(r[0],r[1]):r[1],c+="<div "+o(e,ie[21],r)+"></div>",r[1]&&(c+="<div "+o(e,ie[22],r)+">"+n.to(r[0])+"</div>")}var s=["horizontal","vertical"][r.ort],u=document.createElement("div"),c="";return l(u,ie[20]),l(u,ie[20]+"-"+s),Object.keys(e).forEach(function(t){a(t,e[t])}),u.innerHTML=c,u}function j(e){var t=e.mode,n=e.density||1,r=e.filter||!1,i=k(n,t,C(t,e.values||!1,e.stepped||!1)),o=e.format||{to:Math.round};return Z.appendChild(S(i,r,o))}function E(){var e=Y.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||Y[t]:e.height||Y[t]}function T(e,t,n){void 0!==t&&1!==r.handles&&(t=Math.abs(t-r.dir)),Object.keys(re).forEach(function(r){var i=r.split(".")[0];e===i&&re[r].forEach(function(e){e.call(J,s(U()),t,s(P(Array.prototype.slice.call(ne))),n||!1,ee)})})}function P(e){return 1===e.length?e[0]:r.dir?e.reverse():e}function $(e,t,n,i){var o=function(t){return!Z.hasAttribute("disabled")&&(!d(Z,ie[14])&&(t=v(t,i.pageOffset),!(e===z.start&&void 0!==t.buttons&&t.buttons>1)&&((!i.hover||!t.buttons)&&(t.calcPoint=t.points[r.ort],void n(t,i)))))},a=[];return e.split(" ").forEach(function(e){t.addEventListener(e,o,!1),a.push([e,o])}),a}function N(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return R(e,t);var n,r,o=t.handles||X,a=!1,s=100*(e.calcPoint-t.start)/t.baseSize,u=o[0]===X[0]?0:1;if(n=i(s,t.positions,o.length>1),a=F(o[0],n[u],1===o.length),o.length>1){if(a=F(o[1],n[u?0:1],!1)||a)for(r=0;r<t.handles.length;r++)T("slide",r)}else a&&T("slide",u)}function R(e,t){var n=Y.querySelector("."+ie[15]),r=t.handles[0]===X[0]?0:1;null!==n&&c(n,ie[15]),e.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var i=document.documentElement;
271i.noUiListeners.forEach(function(e){i.removeEventListener(e[0],e[1])}),c(Z,ie[12]),T("set",r),T("change",r),void 0!==t.handleNumber&&T("end",t.handleNumber)}function M(e,t){"mouseout"===e.type&&"HTML"===e.target.nodeName&&null===e.relatedTarget&&R(e,t)}function D(e,t){var n=document.documentElement;if(1===t.handles.length&&(l(t.handles[0].children[0],ie[15]),t.handles[0].hasAttribute("disabled")))return!1;e.preventDefault(),e.stopPropagation();var r=$(z.move,n,N,{start:e.calcPoint,baseSize:E(),pageOffset:e.pageOffset,handles:t.handles,handleNumber:t.handleNumber,buttonsProperty:e.buttons,positions:[ee[0],ee[X.length-1]]}),i=$(z.end,n,R,{handles:t.handles,handleNumber:t.handleNumber}),o=$("mouseout",n,M,{handles:t.handles,handleNumber:t.handleNumber});if(n.noUiListeners=r.concat(i,o),e.cursor){document.body.style.cursor=getComputedStyle(e.target).cursor,X.length>1&&l(Z,ie[12]);var a=function(){return!1};document.body.noUiListener=a,document.body.addEventListener("selectstart",a,!1)}void 0!==t.handleNumber&&T("start",t.handleNumber)}function A(e){var t,i,a=e.calcPoint,s=0;return e.stopPropagation(),X.forEach(function(e){s+=n(e)[r.style]}),t=s/2>a||1===X.length?0:1,X[t].hasAttribute("disabled")&&(t=t?0:1),i=100*(a-=n(Y)[r.style])/E(),r.events.snap||o(Z,ie[14],300),!X[t].hasAttribute("disabled")&&(F(X[t],i),T("slide",t,!0),T("set",t,!0),T("change",t,!0),void(r.events.snap&&D(e,{handles:[X[t]]})))}function I(e){var t=e.calcPoint-n(Y)[r.style],i=te.getStep(100*t/E()),o=te.fromStepping(i);Object.keys(re).forEach(function(e){"hover"===e.split(".")[0]&&re[e].forEach(function(e){e.call(J,o)})})}function O(e){var t,n;if(!e.fixed)for(t=0;t<X.length;t+=1)$(z.start,X[t].children[0],D,{handles:[X[t]],handleNumber:t});if(e.tap&&$(z.start,Y,A,{handles:X}),e.hover)for($(z.move,Y,I,{hover:!0}),t=0;t<X.length;t+=1)["mousemove MSPointerMove pointermove"].forEach(function(e){X[t].children[0].addEventListener(e,h,!1)});e.drag&&(l((n=[Y.querySelector("."+ie[7])])[0],ie[10]),e.fixed&&n.push(X[n[0]===X[0]?1:0].children[0]),n.forEach(function(e){$(z.start,e,D,{handles:X})}))}function F(e,t,n){var i=e!==X[0]?1:0,o=ee[0]+r.margin,s=ee[1]-r.margin,u=ee[0]+r.limit,d=ee[1]-r.limit;return X.length>1&&(t=i?Math.max(t,o):Math.min(t,s)),!1!==n&&r.limit&&X.length>1&&(t=i?Math.min(t,u):Math.max(t,d)),t=te.getStep(t),(t=a(parseFloat(t.toFixed(7))))!==ee[i]&&(window.requestAnimationFrame?window.requestAnimationFrame(function(){e.style[r.style]=t+"%"}):e.style[r.style]=t+"%",e.previousSibling||(c(e,ie[17]),t>50&&l(e,ie[17])),ee[i]=t,ne[i]=te.fromStepping(t),T("update",i),!0)}function L(e,t){var n,i,o;for(r.limit&&(e+=1),n=0;e>n;n+=1)null!==(o=t[i=n%2])&&!1!==o&&("number"==typeof o&&(o=String(o)),(!1===(o=r.format.from(o))||isNaN(o)||!1===F(X[i],te.toStepping(o),n===3-r.dir))&&T("update",i))}function H(e){var t,n,i=s(e);for(r.dir&&r.handles>1&&i.reverse(),r.animate&&-1!==ee[0]&&o(Z,ie[14],300),t=X.length>1?3:1,1===i.length&&(t=1),L(t,i),n=0;n<X.length;n++)null!==i[n]&&T("set",n)}function U(){var e,t=[];for(e=0;e<r.handles;e+=1)t[e]=r.format.to(ne[e]);return P(t)}function q(){for(ie.forEach(function(e){e&&c(Z,e)});Z.firstChild;)Z.removeChild(Z.firstChild);delete Z.noUiSlider}function V(){return P(ee.map(function(e,t){var n=te.getApplicableStep(e),r=u(String(n[2])),i=ne[t],o=100===e?null:n[2],a=Number((i-n[2]).toFixed(r));return[0===e?null:a>=n[1]?n[2]:n[0]||!1,o]}))}function K(e,t){re[e]=re[e]||[],re[e].push(t),"update"===e.split(".")[0]&&X.forEach(function(e,t){T("update",t)})}function Q(e){var t=e.split(".")[0],n=e.substring(t.length);Object.keys(re).forEach(function(e){var r=e.split(".")[0],i=e.substring(r.length);t&&t!==r||n&&n!==i||delete re[e]})}function G(e){var t,n=U(),i=B({start:[0,0],margin:e.margin,limit:e.limit,step:e.step,range:e.range,animate:e.animate,snap:void 0===e.snap?r.snap:e.snap});for(["margin","limit","step","range","animate"].forEach(function(t){void 0!==e[t]&&(r[t]=e[t])}),i.spectrum.direction=te.direction,te=i.spectrum,ee=[-1,-1],H(n),t=0;t<X.length;t++)T("update",t)}m();var Y,X,J,Z=t,ee=[-1,-1],te=r.spectrum,ne=[],re={},ie=["target","base","origin","handle","horizontal","vertical","background","connect","ltr","rtl","draggable","","state-drag","","state-tap","active","","stacking","tooltip","","pips","marker","value"].map(p(r.cssPrefix||W));if(Z.noUiSlider)throw new Error("Slider was already initialized.");return Y=_(r.dir,r.ort,Z),X=b(r.handles,r.dir,Y),y(r.connect,Z,X),r.pips&&j(r.pips),r.tooltips&&w(),J={destroy:q,steps:V,on:K,off:Q,get:U,set:H,updateOptions:G,options:r,target:Z,pips:j},O(r.events),J}function q(e,t){if(!e.nodeName)throw new Error("noUiSlider.create requires a single element.");var n=B(t,e),r=U(e,n);return r.set(n.start),e.noUiSlider=r,r}var z,W="noUi-";j.prototype.getMargin=function(e){return 2===this.xPct.length&&g(this.xVal,e)},j.prototype.toStepping=function(e){return e=x(this.xVal,this.xPct,e),this.direction&&(e=100-e),e},j.prototype.fromStepping=function(e){return this.direction&&(e=100-e),i(w(this.xVal,this.xPct,e))},j.prototype.getStep=function(e){return this.direction&&(e=100-e),e=C(this.xPct,this.xSteps,this.snap,e),this.direction&&(e=100-e),e},j.prototype.getApplicableStep=function(e){var t=_(e,this.xPct),n=100===e?2:1;return[this.xNumSteps[t-2],this.xVal[t-n],this.xNumSteps[t-n]]}
271,j.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var V={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number};return{create:q}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.indices,r=e.cssClasses,i=void 0===r?{}:r,m=e.autoHideContainer,v=void 0!==m&&m;if(!t||!n)throw new Error(p);var g=(0,l.getContainerNode)(t),y=f["default"];!0===v&&(y=(0,d["default"])(y));var b=(0,u["default"])(n,function(e){return{label:e.label,value:e.name}}),_={root:(0,c["default"])(h(null),i.root),item:(0,c["default"])(h("item"),i.item)};return{init:function(e){var t=e.helper,r=t.getIndex();if(!(-1!==(0,s["default"])(n,{name:r})))throw new Error("[sortBySelector]: Index "+r+" not present in `indices`");this.setIndex=function(e){return t.setIndex(e).search()}},render:function(e){var t=e.helper,n=e.results;a["default"].render(o(y,{cssClasses:_,currentValue:t.getIndex(),options:b,setValue:this.setIndex,shouldAutoHideContainer:0===n.nbHits}),g)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=r(n(175)),u=r(n(55)),l=n(378),c=r(n(382)),d=r(n(383)),f=r(n(408)),h=(0,l.bemHelper)("ais-sort-by-selector"),p="Usage:\nsortBySelector({\n container,\n indices,\n [cssClasses.{root,item}={}],\n [autoHideContainer=false]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.container,n=e.attributeName,r=e.max,i=void 0===r?5:r,v=e.cssClasses,g=void 0===v?{}:v,y=e.labels,b=void 0===y?f["default"]:y,_=e.templates,x=void 0===_?d["default"]:_,w=e.collapsible,C=void 0!==w&&w,k=e.transformData,S=e.autoHideContainer,j=void 0===S||S,E=(0,s.getContainerNode)(t),T=(0,c["default"])(h["default"]);if(!0===j&&(T=(0,l["default"])(T)),!t||!n)throw new Error(m);var P={root:(0,u["default"])(p(null),g.root),header:(0,u["default"])(p("header"),g.header),body:(0,u["default"])(p("body"),g.body),footer:(0,u["default"])(p("footer"),g.footer),list:(0,u["default"])(p("list"),g.list),item:(0,u["default"])(p("item"),g.item),link:(0,u["default"])(p("link"),g.link),disabledLink:(0,u["default"])(p("link","disabled"),g.disabledLink),count:(0,u["default"])(p("count"),g.count),star:(0,u["default"])(p("star"),g.star),emptyStar:(0,u["default"])(p("star","empty"),g.emptyStar),active:(0,u["default"])(p("item","active"),g.active)};return{getConfiguration:function(){return{disjunctiveFacets:[n]}},init:function(e){var t=e.templatesConfig,n=e.helper;this._templateProps=(0,s.prepareTemplateProps)({transformData:k,defaultTemplates:d["default"],templatesConfig:t,templates:x}),this._toggleRefinement=this._toggleRefinement.bind(this,n)},render:function(e){function t(e){return l(u.toggleRefinement(n,e))}for(var r=e.helper,s=e.results,u=e.state,l=e.createURL,c=[],d={},f=i-1;f>=0;--f)d[f]=0;s.getFacetValues(n).forEach(function(e){var t=Math.round(e.name);if(t&&!(t>i-1))for(var n=t;n>=1;--n)d[n]+=e.count});for(var h=this._getRefinedStar(r),p=i-1;p>=1;--p){var m=d[p];if(!h||p===h||0!==m){for(var v=[],g=1;i>=g;++g)v.push(p>=g);c.push({stars:v,name:""+p,count:m,isRefined:h===p,labels:b})}}a["default"].render(o(T,{collapsible:C,createURL:t,cssClasses:P,facetValues:c,shouldAutoHideContainer:0===s.nbHits,templateProps:this._templateProps,toggleRefinement:this._toggleRefinement}),E)},_toggleRefinement:function(e,t){var r=this._getRefinedStar(e)===+t;if(e.clearRefinements(n),!r)for(var o=+t;i>=o;++o)e.addDisjunctiveFacetRefinement(n,o);e.search()},_getRefinedStar:function(e){var t=void 0;return e.getRefinements(n).forEach(function(e){(!t||+e.value<t)&&(t=+e.value)}),t}}}
271Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(382)),l=r(n(383)),c=r(n(384)),d=r(n(438)),f=r(n(439)),h=r(n(399)),p=(0,s.bemHelper)("ais-star-rating"),m="Usage:\nstarRating({\n container,\n attributeName,\n [ max=5 ],\n [ cssClasses.{root,header,body,footer,list,item,active,link,disabledLink,star,emptyStar,count} ],\n [ templates.{header,item,footer} ],\n [ labels.{andUp} ],\n [ transformData ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<a class="{{cssClasses.link}}{{^count}} {{cssClasses.disabledLink}}{{/count}}" {{#count}}href="{{href}}"{{/count}}>\n {{#stars}}<span class="{{#.}}{{cssClasses.star}}{{/.}}{{^.}}{{cssClasses.emptyStar}}{{/.}}"></span>{{/stars}}\n {{labels.andUp}}\n {{#count}}<span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>{{/count}}\n</a>',footer:""}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={andUp:"& Up"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.autoHideContainer,m=void 0===i||i,v=e.templates,g=void 0===v?f["default"]:v,y=e.collapsible,b=void 0!==y&&y,_=e.transformData;if(!t)throw new Error(p);var x=(0,s.getContainerNode)(t),w=(0,l["default"])(c["default"]);if(!0===m&&(w=(0,u["default"])(w)),!x)throw new Error(p);var C={body:(0,d["default"])(h("body"),r.body),footer:(0,d["default"])(h("footer"),r.footer),header:(0,d["default"])(h("header"),r.header),root:(0,d["default"])(h(null),r.root),time:(0,d["default"])(h("time"),r.time)};return{init:function(e){var t=e.templatesConfig;this._templateProps=(0,s.prepareTemplateProps)({transformData:_,defaultTemplates:f["default"],templatesConfig:t,templates:g})},render:function(e){var t=e.results;a["default"].render(o(w,{collapsible:b,cssClasses:C,hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,shouldAutoHideContainer:0===t.nbHits,templateProps:this._templateProps}),x)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r((r(n(223)),n(376))),s=n(378),u=r(n(383)),l=r(n(384)),c=r(n(441)),d=r(n(382)),f=r(n(442)),h=(0,s.bemHelper)("ais-stats"),p="Usage:\nstats({\n container,\n [ template ],\n [ transformData ],\n [ autoHideContainer]\n})";t["default"]=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
271Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(n(223)),c=r(n(385)),d=function(){function e(){return i(this,e),o(this,Object.getPrototypeOf(e).apply(this,arguments))}return a(e,l["default"].Component),u(e,[{key:"shouldComponentUpdate",value:function(e){return this.props.nbHits!==e.hits||this.props.processingTimeMS!==e.processingTimeMS}},{key:"render",value:function(){var e={hasManyResults:this.props.nbHits>1,hasNoResults:0===this.props.nbHits,hasOneResult:1===this.props.nbHits,hitsPerPage:this.props.hitsPerPage,nbHits:this.props.nbHits,nbPages:this.props.nbPages,page:this.props.page,processingTimeMS:this.props.processingTimeMS,query:this.props.query,cssClasse
271s:this.props.cssClasses};return l["default"].createElement(c["default"],s({ 272data:e,templateKey:"body"},this.props.templateProps))}}]),e}();t["default"]=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",body:'{{#hasNoResults}}No results{{/hasNoResults}}\n {{#hasOneResult}}1 result{{/hasOneResult}}\n {{#hasManyResults}}{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} results{{/hasManyResults}}\n <span class="{{cssClasses.time}}">found in {{processingTimeMS}}ms</span>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributeName,r=e.label,i=e.values,v=void 0===i?{on:!0,off:void 0}:i,g=e.templates,y=void 0===g?f["default"]:g,b=e.collapsible,_=void 0!==b&&b,x=e.cssClasses,w=void 0===x?{}:x,C=e.transformData,k=e.autoHideContainer,S=void 0===k||k,j=(0,u.getContainerNode)(t),E=(0,d["default"])(h["default"]);if(!0===S&&(E=(0,c["default"])(E)),!t||!n||!r)throw new Error(m);var T=void 0!==v.off,P={root:(0,l["default"])(p(null),w.root),header:(0,l["default"])(p("header"),w.header),body:(0,l["default"])(p("body"),w.body),footer:(0,l["default"])(p("footer"),w.footer),list:(0,l["default"])(p("list"),w.list),item:(0,l["default"])(p("item"),w.item),active:(0,l["default"])(p("item","active"),w.active),label:(0,l["default"])(p("label"),w.label),checkbox:(0,l["default"])(p("checkbox"),w.checkbox),count:(0,l["default"])(p("count"),w.count)};return{getConfiguration:function(){return{facets:[n]}},init:function(e){var t=e.state,r=e.helper,i=e.templatesConfig;(this._templateProps=(0,u.prepareTemplateProps)({transformData:C,defaultTemplates:f["default"],templatesConfig:i,templates:y}),this.toggleRefinement=this.toggleRefinement.bind(this,r),void 0!==v.off)&&(t.isFacetRefined(n,v.on)||r.addFacetRefinement(n,v.off))},toggleRefinement:function(e,t,r){var i=v.on,o=v.off;r?(e.removeFacetRefinement(n,i),T&&e.addFacetRefinement(n,o)):(T&&e.removeFacetRefinement(n,o),e.addFacetRefinement(n,i)),e.search()},render:function(e){function t(){return c(l.toggleRefinement(n,d))}var i=e.helper,u=e.results,l=e.state,c=e.createURL,d=i.state.isFacetRefined(n,v.on),f=(0,a["default"])(u.getFacetValues(n),{name:d.toString()}),h={name:r,isRefined:d,count:f&&f.count||null};s["default"].render(o(E,{collapsible:_,createURL:t,cssClasses:P,facetValues:[h],shouldAutoHideContainer:0===u.nbHits,templateProps:this._templateProps,toggleRefinement:this.toggleRefinement}),j)}}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,i){var o=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&o)for(var s in o)void 0===n[s]&&(n[s]=o[s]);else n||(n=o||{});if(1===a)n.children=i;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=r(n(131)),s=r((r(n(223)),n(376))),u=n(378),l=r(n(382)),c=r(n(383)),d=r(n(384)),f=r(n(444)),h=r(n(399)),p=(0,u.bemHelper)("ais-toggle"),m="Usage:\ntoggle({\n container,\n attributeName,\n label,\n [ userValues={on: true, off: undefined} ],\n [ cssClasses.{root,header,body,footer,list,item,active,label,checkbox,count} ],\n [ templates.{header,item,footer} ],\n [ transformData ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="checkbox" class="{{cssClasses.checkbox}}" value="{{name}}" {{#isRefined}}checked{{/isRefined}} />{{name}}\n <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>\n</label>',footer:""}}])}),function(global){function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var n;if(e)for(n=0;n<e.length&&(!e[n]||!t(e[n],n,e));n+=1);}function eachReverse(e,t){var n;if(e)for(n=e.length-1;n>-1&&(!e[n]||!t(e[n],n,e));n-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){!n&&hasProp(e,i)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[i]=t:(e[i]||(e[i]={}),mixin(e[i],t,n,r)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function t(e){var t,n,r=e.length;for(t=0;t<r;t++)if("."===(n=e[t]))e.splice(t,1),t-=1;else if(".."===n){if(1===t&&(".."===e[2]||".."===e[0]))break;t>0&&(e.splice(t-1,2),t-=2)}}function n(e,n,r){var i,o,a,s,u,l,c,d,f,h,p=n&&n.split("/"),m=p,v=C.map,g=v&&v["*"];if(e&&"."===e.charAt(0)&&(n?(m=p.slice(0,p.length-1),l=(e=e.split("/")).length-1,C.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),t(e=m.concat(e)),e=e.join("/")):0===e.indexOf("./")&&(e=e.substring(2))),r&&v&&(p||g)){e:for(a=(o=e.split("/")).length;a>0;a-=1){if(u=o.slice(0,a).join("/"),p)for(s=p.length;s>0;s-=1)if((i=getOwn(v,p.slice(0,s).join("/")))&&(i=getOwn(i,u))){c=i,d=a;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),h=a)}!c&&f&&(c=f,d=h),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(C.pkgs,e)||e}function r(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===_.contextName)return t.parentNode.removeChild(t),!0})}function i(e){var t=getOwn(C.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),_.require.undef(e),_.require([e]),!0}function o(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function a(e,t,r,i){var a,s,u,l,c=null,d=t?t.name:null,f=e,h=!0,p="";return e||(h=!1,e="_@r"+(N+=1)),c=(l=o(e))[0],e=l[1],c&&(c=n(c,d,i),s=getOwn(T,c)),e&&(c?p=s&&s.normalize?s.normalize(e,function(e){return n(e,d,i)}):n(e,d,i):(c=(l=o(p=n(e,d,i)))[0],p=l[1],r=!0,a=_.nameToUrl(p))),{prefix:c,name:p,parentMap:t,unnormalized:!!(u=!c||s||r?"":"_unnormalized"+(R+=1)),url:a,originalName:f,isDefine:h,id:(c?c+"!"+p:p)+u}}function s(e){var t=e.id,n=getOwn(k,t);return n||(n=k[t]=new _.Module(e)),n}function u(e,t,n){var r=e.id,i=getOwn(k,r);!hasProp(T,r)||i&&!i.defineEmitComplete?(i=s(e)).error&&"error"===t?n(i.error):i.on(t,n):"defined"===t&&n(T[r])}function l(e,t){var n=e.requireModules,r=!1;t?t(e):(each(n,function(t){var n=getOwn(k,t);n&&(n.error=e,n.events.error&&(r=!0,n.emit("error",e)))}),r||req.onError(e))}function c(){globalDefQueue.length&&(apsp.apply(E,[E.length,0].c
vendor: 10,957 bytes, line 272
272oncat(globalDefQueue)),globalDefQueue=[])}function d(e){delete k[e],delete S[e]}function f(e,t,n){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,function(r,i){var o=r.id,a=getOwn(k,o);!a||e.depMatched[i]||n[o]||(getOwn(t,o)?(e.defineDep(i,T[o]),e.check()):f(a,t,n))}),n[r]=!0)}function h(){var e,t,n=1e3*C.waitSeconds,o=n&&_.startTime+n<(new Date).getTime(),a=[],s=[],u=!1,c=!0;if(!y){if(y=!0,eachProp(S,function(e){var n=e.map,l=n.id;if(e.enabled&&(n.isDefine||s.push(e),!e.error))if(!e.inited&&o)i(l)?(t=!0,u=!0):(a.push(l),r(l));else if(!e.inited&&e.fetched&&n.isDefine&&(u=!0,!n.prefix))return c=!1}),o&&a.length)return(e=makeError("timeout","Load timeout for modules: "+a,null,a)).contextName=_.contextName,l(e);c&&each(s,function(e){f(e,{},{})}),o&&!t||!u||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,h()},50)),y=!1}}function p(e){hasProp(T,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function m(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function v(e){var t=e.currentTarget||e.srcElement;return m(t,_.onScriptLoad,"load","onreadystatechange"),m(t,_.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function g(){var e;for(c();E.length;){if(null===(e=E.shift())[0])return l(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));p(e)}}var y,b,_,x,w,C={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},k={},S={},j={},E=[],T={},P={},$={},N=1,R=1;return x={require:function(e){return e.require?e.require:e.require=_.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?T[e.map.id]=e.exports:e.exports=T[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(C.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(b=function(e){this.events=getOwn(j,e.id)||{},this.map=e,this.shim=getOwn(C.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,n,r){r=r||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,_.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();_.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;P[e]||(P[e]=!0,_.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,r=this.depExports,i=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{i=_.execCb(n,o,r,i)}catch(a){e=a}else i=_.execCb(n,o,r,i);if(this.map.isDefine&&i===undefined&&((t=this.module)?i=t.exports:this.usingExports&&(i=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",l(this.error=e)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(T[n]=i,req.onResourceLoad&&req.onResourceLoad(_,this.map,this.depMaps)),d(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=a(e.prefix);this.depMaps.push(r),u(r,"defined",bind(this,function(r){var i,o,c,f=getOwn($,this.map.id),h=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,m=_.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(h=r.normalize(h,function(e){return n(e,p,!0)})||""),u(o=a(e.prefix+"!"+h,this.map.parentMap),"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((c=getOwn(k,o.id))&&(this.depMaps.push(o),this.events.error&&c.on("error",bind(this,function(e){this.emit("error",e)})),c.enable()))):f?(this.map.url=_.nameToUrl(f),void this.load()):((i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(k,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&d(e.map.id)}),l(e)}),i.fromText=bind(this,function(n,r){var o=e.name,u=a(o),c=useInteractive;r&&(n=r),c&&(useInteractive=!1),s(u),hasProp(C.config,t)&&(C.config[o]=C.config[t]);try{req.exec(n)}catch(d){return l(makeError("fromtexteval","fromText eval for "+t+" failed: "+d,d,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),_.completeLoad(o),m([o],i)}),void r.load(e.name,m,i,C))})),_.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){S[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,r,i;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,i=getOwn(x,e.id))return void(this.depExports[t]=i(this));this.depCount+=1,u(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&u(e,"error",bind(this,this.errback))}n=e.id,r=k[n],hasProp(x,n)||!r||r.enabled||_.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(k,e.id);t&&!t.enabled&&_.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},(_={config:C,contextName:e,registry:k,defined:T,urlFetched:P,defQueue:E,Module:b,makeModuleMap:a,nextTick:req.nextTick,onError:l,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=C.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(C[t]||(C[t]={}),mixin(C[t],e,!0,!0)):C[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&($[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,n){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=_.makeShimExports(e)),t[n]=e}),C.shim=t),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(C.paths[t]=e.location),C.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(k,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t))}),(e.deps||e.callback)&&_.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,i){function o(n,r,u){var c,d;return i.enableBuildCallback&&r&&isFunction(r)&&(r.__requireJsBuild=!0),"string"==typeof n?isFunction(r)?l(makeError("requireargs","Invalid require call"),u):t&&hasProp(x,n)?x[n](k[t.id]):req.get?req.get(_,n,t,o):(c=a(n,t,!1,!0).id,hasProp(T,c)?T[c]:l(makeError("notloaded",'Module name "'+c+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(g(),_.nextTick(function(){g(),(d=s(a(null,t))).skipMap=i.skipMap,d.init(n,r,u,{enabled:!0}),h()}),o)}return i=i||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var r,i=e.lastIndexOf("."),o=e.split("/")[0];return-1!==i&&(!("."===o||".."===o)||i>1)&&(r=e.substring(i,e.length),e=e.substring(0,i)),_.nameToUrl(n(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(T,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(T,e)||hasProp(k,e)}}),t||(o.undef=function(e){c();var n=a(e,t,!0),i=getOwn(k,e);r(e),delete T[e],delete P[n.url],delete j[e],eachReverse(E,function(t,n){t[0]===e&&E.splice(n,1)}),i&&(i.events.defined&&(j[e]=i.events),d(e))}),o},enable:function(e){getOwn(k,e.id)&&s(e).enable()},completeLoad:function(e){var t,n,r,o=getOwn(C.shim,e)||{},a=o.exports;for(c();E.length;){if(null===(n=E.shift())[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);p(n)}if(r=getOwn(k,e),!t&&!hasProp(T,e)&&r&&!r.inited){if(!(!C.enforceDefine||a&&getGlobal(a)))return i(e)?void 0:l(makeError("nodefine","No define call for "+e,null,[e]));p([e,o.deps||[],o.exportsFn])}h()},nameToUrl:function(e,t,n){var r,i,o,a,s,u,l=getOwn(C.pkgs,e);if(l&&(e=l),u=getOwn($,e))return _.nameToUrl(u,t,n);if(req.jsExtRegExp.test(e))a=e+(t||"");else{for(r=C.paths,o=(i=e.split("/")).length;o>0;o-=1)if(s=getOwn(r,i.slice(0,o).join("/"))){isArray(s)&&(s=s[0]),i.splice(0,o,s);break}a=i.join("/"),a=("/"===(a+=t||(/^data\:|\?/.test(a)||n?"":".js")).charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":C.baseUrl)+a}return C.urlArgs?a+(-1===a.indexOf("?")?"?":"&")+C.urlArgs:a},load:function(e,t){req.load(_,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=v(e);_.completeLoad(t.id)}},onScriptError:function(e){var t=v(e);if(!i(t.id))return l(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}}).require=_.makeRequire(),_}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.11",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}void 0===require||isFunction(require)||(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(a=o.context),(i=getOwn(contexts,a))||(i=contexts[a]=req.s.newContext(a)),o&&i.configure(o),i.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()}
272,require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e){var t=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return t.type=e.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,t},req.load=function(e,t,n){var r,i=e&&e.config||{};if(isBrowser)return(r=req.createNode(i,t,n)).setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=n,currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{importScripts(n),e.completeLoad(t)}catch(o){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,o,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,n){var r,i;"string"!=typeof e&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")]),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),ns("Inkshares.Accolades",function(e){e.initialize=function(){$("[data-behavior=show-accolades]").on("click",function(e){e.preventDefault();var t=$("#accolades");$(t).modal("show"),$.ajax({url:$(this).attr("href"),context:t}).done(function(e){$(t).find(".modal-body").html(e)})})}}),ns("Inkshares.Addresses",function(e){e.initialize=function(t){function n(){var e=$("#submit-address-form");$("#address_name").val().length>0?e.removeClass("disabled"):e.addClass("disabled")}var r=this;1==t&&e.toggleAddressForm(),$("[data-behavior=change-address]").click(function(e){return e.preventDefault(),r.toggleAddressForm(),!1}),n(),$("[data-behavior=address-form-container]").on("keyup",function(){n()})},e.toggleAddressForm=function(){$("[data-behavior=address-form-container]").toggleClass("hidden"),$("[data-behavior=current-address]").toggleClass("hidden")}}),ns("Inkshares.Admin",function(e){e.Channel=function(){this.observeChannels()},e.Channel.prototype.observeChannels=function(){$("body").on("click","[data-behavior=channel]",function(e){e.preventDefault(),$.ajax({type:"get",url:"/admin/channels/channel_modal",data:{article_id:$(this).attr("data-id")},dataType:"html",success:function(e){$("[data-behavior=modal-container]").html(e),$("#channel-modal").modal()}})})}}),ns("Inkshares.Admin",function(e){e.Project=function(){this.observeUpdate(),this.observeSelect(),this.observeAssign(),this.observeNote(),this.observeListPrice(),Inkshares.Utility.tableSorter($("table[data-behavior=project-table]")),Inkshares.Utility.tableSorter($("table[data-behavior=schedule-table]"))},e.Project.prototype.observeUpdate=function(){$("[data-behavior=update-admin]").on("click",function(){var e=$
272("[data-behavior=project-form");e.attr("action","/admin/projects/"+$(this).attr("data-project-id")),$("<input>").attr({type:"hidden",name:$(this).attr("data-field"),value:$(this).attr("data-value")}).appendTo(e),e.submit()})},e.Project.prototype.observeSelect=function(){$("select").on("change",function(e){var t="?project_category="+$(e.currentTarget).val();document.location.href="/admin/projects/"+t})},e.Project.prototype.observeAssign=function(){$("body").on("click","[data-behavior=assign]",function(e){e.preventDefault(),$.ajax({type:"get",url:"/admin/project_admin_meta/modal",data:{id:$(this).attr("data-project-id")},dataType:"html",success:function(e){$("[data-behavior=modal-container]").html(e),$("#assign-modal").modal()}})})},e.Project.prototype.observeNote=function(){$("body").on("click","[data-behavior=note]",function(e){e.preventDefault(),$.ajax({type:"get",url:"/admin/project_admin_meta/note",data:{project_id:$(this).attr("data-project-id")},dataType:"html",success:function(e){$("[data-behavior=modal-container]").html(e),$("#notes-modal").modal()}})})},e.Project.prototype.observeListPrice=function(){$("body").on("click","[data-behavior=list-price]",function(e){e.preventDefault(),$.ajax({type:"get",url:"/admin/projects/list_price",data:{project_id:$(this).attr("data-project-id")},dataType:"html",success:function(e){$("[data-behavior=modal-container]").html(e),$("#list-price-modal").modal()}})})}}),ns("Inkshares.Task",function(e){e.Task=function(){this.observeUpdate()},e.Task.prototype.observeUpdate=function(){$("[data-behavior=update-task]").on("click",function(e){e.preventDefault(),$.ajax({method:"put",url:"/tasks/"+$(this),data:{state:$(this).val(),task_id:$(this).attr("data-id")},format:"json",success:function(){}})})}}),ns("Inkshares",function(e){e.Affix=function(e){this.affixElements(e)},e.Affix.prototype.affixElements=function(e){$(function(){$('[data-behavior="affix"]').each(function(){var t=this;if(e==undefined||0==e.fixedTopMenu)var n=$(t).offset().top;else n=$(t).offset().top-$("#main_nav").outerHeight(!0);$(this).affix({offset:{top:n}})})})}}),ns("Inkshares",function(e){e.Async=function(){this.observeLoad()},e.Async.prototype.observeLoad=function(){$("[data-behavior=asyncable]").on("shown.bs.modal",function(){var e=$
272(this).find("[data-behavior=async-content]"),t=$("<i>").addClass("fa fa-spinner fa-2x spin"),n=$("<div>").addClass("row loading center").append(t);0==e.children().length&&(e.append(n),$.ajax({accepts:"html",url:e.attr("data-load-path"),data:e.data(),success:function(t){e.find(n).remove(),e.append(t)}}))})}}),ns("Inkshares.BankAccounts",function(e){e.initialize=function(e,t){var n=this;this.currencyMap=t,Stripe.setPublishableKey(e),this.observeCountry(),$("[data-behavior=bank-account-form-submit]").click(function(e){e.preventDefault(),n.toggleAuthorizing(!0),n.createBankAccount()}),$("[data-behavior=change-bank-account]").click(function(e){return e.preventDefault(),n.toggleBankAccountForm(),!1})},e.observeCountry=function(){var e=["AT","BE","CH","DE","DK","ES","FI","FR","IE","IT","LU","NL","NO","SE"],t=["AU"],n=["GB"],r=["CA"],i=this;$("#bank_account_country").on("change",function(){var o=$("#bank_account_country").val(),a=$("[data-behavior=financial-number]");a.addClass("hidden"),e.indexOf(o)>-1?(i.changeAccountLabel("IBAN"),$(".account").removeClass("hidden")):r.indexOf(o)>-1?(i.changeRoutingLabel("Branch Number - Institution Number (XXXXX-YYY)"),a.removeClass("hidden")):t.indexOf(o)>-1?(i.changeAccountLabel("Account Number"),i.changeRoutingLabel("BSB"),a.removeClass("hidden")):n.indexOf(o)>-1?(i.changeAccountLabel("Account Number"),i.changeRoutingLabel("Sort Code"),a.removeClass("hidden")):(i.changeAccountLabel("Account Number"),i.changeRoutingLabel("Routing Number"),a.removeClass("hidden"))})},e.changeAccountLabel=function(e){$("label[for=bank_account_account_number]").text(e)},e.changeRoutingLabel=function(e){$("label[for=bank_account_routing_number]").text(e)},e.toggleBankAccountForm=function(){$("[data-behavior=bank-account-form-container]").toggleClass("hidden"),$("[data-behavior=current-bank-account]").toggleClass("hidden")},e.createBankAccount=function(){var e=this,t=$("[data-behavior=bank-account-form]"),n=t.find("#bank_account_country").val(),r=t.find("#bank_account_routing_number").val(),i={account_number:t.find("#bank_account_account_number").val(),country:n,currency:currencyMap[n.toUpperCase()]};r.length>0&&(i.routing_number=r),Inkshares.PaymentForm.clearValidationErrors(),this.validateInput(i)?Stripe.bankAccount.createToken(i,function(t,n){e.handleProviderResponse(t,n)}):Inkshares.BankAccounts.toggleAuthorizing(!1)},e.toggleAuthorizing=function(e){var t=$("[data-behavior=bank-account-form-submit]");e?(t.attr("value","Authorizing..."),t.attr("disabled",!0)):(t.attr("value","USE"),t.attr("disabled",!1))},e.handleProviderResponse=function(e,t){try{if(t.error)if("account_number"==t.error.param)Inkshares.PaymentForm.insertValidationError("bank_account_account_number","Please double check this number and try again.");else if("routing_number"==t.error.param)Inkshares.PaymentForm.insertValidationError("bank_account_routing_number","Double check the routing number.");else{Inkshares.PaymentForm.handleError(t);var n=$("[data-behavior=bank-account-form-submit]");n.removeAttr("disabled"),n.attr("value","USE")}else{var r=$("[data-behavior=bank-account-form]");Inkshares.PaymentForm.purgeForm(r,["#bank_account_routing_number","#bank_account_account_number"]),Inkshares.PaymentForm.addFormInput(r,"bank_account[bank_name]",t.bank_account.bank_name),Inkshares.PaymentForm.addFormInput(r,"bank_account[last_four]",t.bank_account.last4),Inkshares.PaymentForm.addFormInput(r,"bank_account[token]",t.id),r.submit()}}catch(i){Inkshares.BankAccounts.toggleAuthorizing(!1),Inkshares.PaymentForm.handleError(i)}},e.validateInput=function(e){var t=!1;return Stripe.bankAccount.validateRoutingNumber(e.routing_number,e.country)||(t=!0,Inkshares.PaymentForm.insertValidationError("bank_account_routing_number","Invalid Routing Number")),Stripe.bankAccount.validateAccountNumber(e.account_number,e.country)||(t=!0,Inkshares.PaymentForm.insertValidationError("bank_account_account_number","Invalid Account Number")),!t}}),ns("Inkshares.Bitcoins",function(e){e.initialize=function(e){Stripe.setPublishableKey(e),this.createBitCoinReciever(),this.countingDown=!1}
272,e.createBitCoinReciever=function(){var e=this,t=parseInt(100*$("#order-info").data("amount")),n=$("#order-info").data("email"),r=$("#order-info").data("orderDesc");Stripe.bitcoinReceiver.createReceiver({amount:t,currency:"usd",description:r,refund_mispayments:!0,email:n},e.populateBitcoinCheckout)},e.populateBitcoinCheckout=function(e,t){var n=Inkshares.Bitcoins,r=$("[data-behavior=payment-container]"),i=$("[data-behavior=error-container]"),o=$("[data-behavior=wait-message]");if(200===e){var a=t.bitcoin_amount/100;$("[data-behavior=bitcoin-due]").text(Inkshares.Utility.commaSeparateNumber(a)),$("[data-behavior=receiver-address]").text(t.inbound_address),$("a[data-behavior=launch-link]").attr("href",t.bitcoin_uri),n.setupPolling(t.id),r.show(),i.hide(),o.hide()}else i.html(JSON.stringify(t)),r.hide(),i.show(),o.hide()},e.startClock=function(e,t){if(!this.countingDown){this.countingDown=!0;var n,r,i=e;setInterval(function(){n=parseInt(i/60,10),r=parseInt(i%60,10),n=n<10?"0"+n:n,r=r<10?"0"+r:r,t.textContent=n+":"+r,--i<0&&(i=e)},1e3)}},e.setupPolling=function(e){var t=600,n=1e3*t,r=Inkshares.Bitcoins,i=$("[data-behavior=bitcoin-form]"),o=document.getElementById("countdown"),a=function(e,t){200===e&&!0===t.filled&&($("[data-behavior=payment-container]").fadeOut(500,function(){$(this).hide(),$("[data-behavior=successful]").show(),$("[data-behavior=next-step]").removeAttr("disabled")}),$("[data-behavior=error-container]").fadeOut(500,function(){$(this).hide()}))};Inkshares.PaymentForm.addFormInput(i,"bitcoin_receiver[receiver_id]",e),i.trigger("submit.rails"),setTimeout(function(){Stripe.bitcoinReceiver.cancelReceiverPoll(e),r.createBitCoinReciever()},n),this.startClock(t,o),Stripe.bitcoinReceiver.pollReceiver(e,a)}}),ns("Inkshares",function(e){e.BookSegment=function(e,t){this.reorderPath=e,this.projectSlug=t,$("[data-behavior=orderable]").sortable(),$("[data-behavior=orderable]").disableSelection(),this.observeSort(),this.observeNewChapter(),this.observeDeleteSegment(),this.observeUploadSegment()},e.BookSegment.prototype.observeSort=function(){var e=this;$("[data-behavior=orderable]").on("sortstop",function(){var t=[];$("[data-segment]").each(function(){t.push($(this).attr("data-segment"))}),$.ajax({type:"post",url:e.reorderPath,data:{order:JSON.stringify(t)}})})},e.BookSegment.prototype.observeNewChapter=function(){$("[data-behavior=new-chapter]").click(function(e){e.preventDefault(),$("form[data-behavior=new-segment]").submit()})},e.BookSegment.prototype.observeDeleteSegment=function(){var e=this;$("body").on("click","[data-behavior=delete-segment]",function(t){t.preventDefault();var n=$("[data-segment="+$(this).attr("data-slug")+"]");$.confirm({text:"Get rid of this chapter?",confirm:function(){$.ajax({type:"delete",url:"/books/"+e.projectSlug+"/book_segments/"+n.attr("data-segment"),success:function(){n.fadeOut(500,function(){n.remove()})}})},cancel:function(){},confirmButton:"Yeah, nuke it.",cancelButton:"Nah, let's keep it"})})},e.BookSegment.prototype.observeUploadSegment=function(){$("body").on("click","[data-behavior=upload-segment]",function(e){e.preventDefault(),$("input[data-behavior=book-segment-slug]").val($(this).attr("data-book-segment-slug")),$($(this).attr("data-target")).modal()})}}),ns("Inkshares",function(e){e.BrowseBar=function(){this.scrollListener()},e.BrowseBar.prototype.scrollListener=function(){var e=this,t=$("[data-behavior=browse-bar]");$(function(){e.barContainerPosition=$("[data-behavior=browse-bar-container]").offset().top}),$(window).on("scroll",function(){window.scrollY+window.innerHeight>e.barContainerPosition+t.height()?t.css("position","relative"):t.css("position","fixed")})}}),ns("Inkshares.Homepage",function(e){e.initialize=function(){$(".project").hover(function(){$(this).find(".proj_stats").animate({bottom:0},500)},function(){$(this).find(".proj_stats").animate({bottom:-150},700)})}}),ns("Inkshares",function(e){e.Buckets=function(){},e.Buckets.prototype.showProjectDetail=function(e,t){function n(){return window.location.pathname}function r(e){o.modal("show"),$.ajax({url:e,dataType:"json",method:"GET",context:[a,e],success:function(e){a.html(e.partial),window.history.pushState({ 273path:e.path},"",e.path)},error:function(e){console.log(e)}})}var i=$('[data-behavior=show-project-detail][href="'+e+'"]'),o=$("[data-behavior=project-bucket-modal]"),a=o.find(".modal
273-body");o.on("hidden.bs.modal",function(){a.html(""),window.history.pushState({path:n()},"",n())}),i.on("click",function(t){t.preventDefault(),r(e)}),t&&r(e)},e.Buckets.prototype.shareBucket=function(t,n){var r=$("#shareBucketModal[data-id="+t+"]");$("[data-behavior=share-bucket]").on("click",function(){if(r.modal("show"),n){var t=$("[data-behavior=bucket-share-search]");t.focus();var i=this;i.timer,i.loading=!1;var o=$("[data-behavior=bucket-user-list]");t.on("keyup",function(){var n=$(this);clearTimeout(i.timer),o.removeClass("hidden loading"),n.val().length<2&&o.addClass("hidden"),0==i.loading&&(i.timer=setTimeout(function(){i.loading=!0,o.html("").addClass("loading"),$.ajax({method:"GET",url:"/search/typeahead_users",data:{q:n.val()},dataType:"json",context:o,success:function(n){o.removeClass("loading"),$(n).each(function(){var n=$("<img>").attr({src:this.image}).addClass("img-circle"),r=$("<span>").html(this.name),i=$("<div>").append(n).append(r).attr("data-user-slug",this.slug).addClass("bucket-user-list-item").appendTo(o);e.Buckets.prototype.initToggleUserBtn(i),$(i).on("click",function(){o.addClass("hidden"),t.val("")})}),i.loading=!1}})},250))})}})},e.Buckets.prototype.initToggleUserFromSlug=function(t){var n=$("[data-behavior=toggle-user][data-user-slug="+t+"]");e.Buckets.prototype.initToggleUserBtn(n)},e.Buckets.prototype.initToggleUserBtn=function(e){var t=this;t.loading=!1,e.on("click",function(n){n.preventDefault(),0==t.loading&&(t.loading=!0,$.ajax({url:"/buckets/toggle_user",method:"POST",data:{user_slug:$(this).data().userSlug,bucket_slug:$(this).parents("#shareBucketModal").data().id},dataType:"json",context:e,success:function(n){if("added"==n.userState)$("[data-behavior=shared-list]").prepend(n.partial);else if("removed"==n.userState){e.addClass("removed"),e.parents(".bucket-user").fadeOut(250,function(){this.remove()}),t.loading=!1}}}))})},e.Buckets.prototype.initBucketMenu=function(){function e(e,r){if(t.addClass("loading"),r==undefined)r=e.attr("href");$.ajax({url:r,dataType:"json",type:"GET",cache:!1,contentType:"application/json",context:[t,e,n],success:function(r){Inkshares.Buckets.unbindElements(),n.removeClass("active"),e.addClass("active"),t.html(r.partial),window.history.pushState({path:r.path},"",r.path),t.removeClass("loading")},error:function(e){console.log(e)}})}var t=$("[data-behavior=bucket-detail-container]"),n=$("[data-behavior=bucket-menu-item]");n.on("click",function(t){var n=$(this);t.preventDefault(),e(n)});var r=window.location.pathname,i=$('[data-behavior=bucket-menu-item][href="'+r+'"]');i.length>0&&e(i,r+window.location.search)},e.Buckets.prototype.summonBucketModal=function(e){$(function(){var t=$("#bucketsModal"),n=t.find(".modal-body");$('[data-behavior=bucket-button][data-url="'+e+'"]').on("click",function(e){e.preventDefault(),n.css({opacity:0}),t.modal("show"),$("[data-spinner]").fadeIn(),$.ajax({url:$(this).data().url,context:[t,n],success:function(e){$(t).find("[data-spinner]").fadeOut(100,function(){n.html(e),n.css({opacity:1})})},error:function(e){console.log(e)}})}),t.on("hidden.bs.modal",function(){n.html("")})})},e.Buckets.prototype.newBucket=function(){$("[data-behavior=add-bucket]").on("click",function(){$(this).addClass("show-input"),$(this).find("input.add-bucket-field").focus(),$(this).find(".add-bucket-icon").removeClass("fa-plus-circle").addClass("fa-check-circle").one("click",function(){$("[data-behavior=new-bucket]").submit()})}),$("[data-behavior=new-bucket]").on("submit",function(e){e.preventDefault();var t=$(this);$.ajax({method:"POST",url:t.attr("action"),data:t.serialize(),success:function(e){$("[data-behavior=bucket-list]").prepend(e);var t=$("[data-behavior=add-bucket]");t.removeClass("show-input"),t.find(".add-bucket-icon").removeClass("fa-check-circle").addClass("fa-plus-circle").unbind("click"),t.find("input.add-bucket-field").val("").blur()},error:function(e){console.log(e)}})})},e.Buckets.prototype.initBucketButton=function(e){$("[data-behavior=toggle-bucket][data-slug="+e+"]").on("click",function(t){t.preventDefault();var n=$(this),r={bucket_slug:e,project_slug:$("[data-behavior=bucket-project]").data().id};return $.ajax({method:"POST",url:n.attr("href"),data:r,context:n,success:function(e){n.removeClass("added removed"),n.toggleClass(e.bucketClass)},error:function(e){console.log(e)}}),!1});var t=$("[data-behavior=remove-bucket][data-slug="+e+"]");t.one("click",function(e){return e.preventDefault(),$.ajax({url:$(this).attr("href"),method:"DELETE",context:t,success:function(){t.parents(".bucket-list-item").addClass("removed"),setTimeout(function(){t.remove()},1e3)},error:function(e){console.log(e)}}),!1})},e.Buckets.unbindElements=function(){$("[data-behavior=toggle-user]").unbind(),$("[data-behavior=remove-bucket]").unbind(),$("[data-behavior=show-project-detail]").unbind(),$("[data-behavior=share-bucket]").unbind()}}),ns("Inkshares.Charts",function(e){e.drawCharts=function(e){google.load("visualization","1",{packages:["corechart"]}),google.setOnLoadCallback(_.bind(function(){_(e).keys().each(_.bind(function(t){r[t].call(this,e[t])},this))},this))},e.maxValue=function(e,t){var n=0;return _.each(e[t],function(e){e[1]>n&&(n=e[1])}),n};var t={backgroundColor:"#ffffff",colors:["#80B266"],pointSize:5,legend:"none",fontName:"Lato",chartArea:{width:"85%",height:"70%"},hAxis:{gridlines:{color:"transparent"}}}
273,n={backgroundColor:"#ffffff",colors:["#4862A0","#58A4CD","#D34836","#6B9955","#fce99b","#825598","#b5ccaa","#FFE0FF","#b3b3b5","#D6D6FF"],fontName:"Lato",chartArea:{width:"80%",height:"70%",left:50,right:50},interpolateNulls:!1,hAxis:{slantedText:!1,gridlines:{color:"transparent"},format:"mm dd yyyy "},legend:{position:"top"}},r={line:function(e){_.each(e,function(e,n,r){var i=new google.visualization.DataTable;i.addColumn("date"),i.addColumn("number"),_.each(r[n],function(e){i.addRow([new Date(e[0]),e[1]])}),new google.visualization.LineChart(document.getElementById(n)).draw(i,t)})},scatter:function(e){_.each(e,function(e,n,r){var i=google.visualization.arrayToDataTable(r[n]);new google.visualization.ScatterChart(document.getElementById(n)).draw(i,t)})},multiline:function(e){_.each(e,function(e,t,r){function i(){count=r[t].length-1,n.hAxis.showTextEvery=count-1}function o(e){return e=e.map(function(e){return""===e?null:e})}function a(){s=s.map(function(e){return o(e)})}var s=r[t];a(),i();var u=new google.visualization.arrayToDataTable(s);new google.visualization.LineChart(document.getElementById(t)).draw(u,n)})},line_category:function(e){_.each(e,function(e,t,n){var r=new google.visualization.arrayToDataTable(n[t]);new google.visualization.LineChart(document.getElementById(t)).draw(r,{backgroundColor:"#ffffff",curveType:"function",slices:["#4862A0","#58A4CD","#D34836","#6B9955","#825598","#b5ccaa"]})})},pie:function(e){_.each(e,function(e,t,n){var r=google.visualization.arrayToDataTable(n[t]);new google.visualization.PieChart(document.getElementById(t)).draw(r,{backgroundColor:"#ffffff",colors:["#4862A0","#58A4CD","#D34836","#6B9955","#fce99b","#825598","#b5ccaa","#FFE0FF","#b3b3b5","#D6D6FF"],chartArea:{left:0,top:0,width:"100%",height:"100%"},slices:[{textStyle:{color:"#4862A0",fontSize:1}},{textStyle:{color:"#58A4CD",fontSize:1}},{textStyle:{color:"#D34836",fontSize:1}},{textStyle:{color:"#6B9955",fontSize:1}},{textStyle:{color:"#F7E092",fontSize:1}},{textStyle:{color:"#EC9DF5",fontSize:1}}]})})},column:function(e){_.each(e,function(e,n,r){var i=new google.visualization.arrayToDataTable(r[n],!0),o=new google.visualization.ColumnChart(document.getElementById(n)),a=$.extend(!0,{},t);a.hAxis.textStyle={fontSize:8},a.hAxis.slantedTextAngle=20,o.draw(i,a)})},column_date:function(e){_.each(e,function(e,n,r){var i=new google.visualization.DataTable;i.addColumn("date"),i.addColumn("number");var o=Inkshares.Charts.maxValue(r,n);_.each(r[n],function(e){i.addRow([new Date(e[0]),e[1]])}),new google.visualization.ColumnChart(document.getElementById(n)).draw(i,$.extend({minValue:0,maxValue:o,format:"#",gridLines:{count:o+2}},t))})},column_percentage:function(e){_.each(e,function(e,n,r){var i=new google.visualization.arrayToDataTable(r[n]),o=new google.visualization.ColumnChart(document.getElementById(n));new google.visualization.NumberFormat({fractionDigits:0,suffix:"%"}).format(i,1),t.vAxis={format:"#'%'"},o.draw(i,t)})},stacked_column:function(e){_.each(e,function(e,t,n){var r=new google.visualization.arrayToDataTable(n[t]);new google.visualization.ColumnChart(document.getElementById(t)).draw(r,{isStacked:!0,colors:["#f68aca","#80B266","#58A4CD","#a5a5a7"]})})},area_chart:function(e){_.each(e,function(e,n,r){var i=new google.visualization.arrayToDataTable(r[n]),o=new google.visualization.AreaChart(document.getElementById(n));new google.visualization.NumberFormat({fractionDigits:0}).format(i,1),t={legend:{position:"top"},hAxis:{textPosition:"none"},vAxis:{format:"short"},isStacked:!0},o.draw(i,t)})}}}),ns("Inkshares.Collections",function(e){e.initialize=function(){this.observeSectionChange()},e.observeSectionChange=function(e){function t(e,t,n){$("[data-behavior=load-section]").removeClass("active");var r=$("[data-behavior=section-target]");r.fadeOut(100).fadeIn(100).text("LOADING..."),e.addClass("active"),n||$("body").animate({scrollTop:r.offset().top-50}),$.ajax({url:e.attr("href"),data:{editing:t},context:r}).done(function(e){$(r).html($(e)).animate({opacity:1},250)}).fail(function(){r.html("There was an error retrieving this page. C
273ontact [email protected] if problem persists. ").animate({opacity:1},250)})}t($("[data-behavior=load-section]").first(),e,!0),$("[data-behavior=load-section]").on("click",function(n){n.preventDefault(),t($(this),e,!1)})},e.addTitle=function(){function e(e,r){t(!1),n(!1),$("input[data-behavior=project-field]").val(r.id),$("[data-behavior=add-submit]").toggleClass("hidden")}function t(e){e?$(".spinner").removeClass("hidden"):$(".spinner").addClass("hidden")}function n(e){e?$(".meh-face").removeClass("hidden"):$(".meh-face").addClass("hidden")}var r="<div class='row'> <div class='col-sm-3'> <img class='book-cover' src='{{book_cover_image}}'> </div> <div class='col-sm-9'> <div class='book-title'>{{name}}</div> <div class='author'>{{author_name}}</div> </div> </div>";$("[data-behavior=project-finder]").typeahead({name:"projects",remote:"/search?scope=all&mode=collection&q=%QUERY",valueKey:"name",template:r,beforeSend:Inkshares.Collections.onInProgress,highlight:!0,engine:Hogan}),$("[data-behavior=project-finder]").on("typeahead:selected",e),$("[data-behavior=project-finder]").on("typeahead:autocompleted",this.onRequestComplete),$("[data-behavior=project-finder]").on("keydown",function(){t(!0),n(!1)})},e.observeRemovalRequest=function(){$("[data-behavior=book-remover]").click(function(e){e.preventDefault(),$("a[data-behavior=removal-request]").attr("href",$(this).attr("data-removal-path")),$("[data-behavior=book-name-holder]").text($(this).attr("data-book-name")),$("#remove-modal").modal("show")})},e.observeOptOutRequest=function(){$("[data-behavior=opt-outer]").click(function(e){e.preventDefault(),$("a[data-behavior=opt-out-request]").attr("href",$(this).attr("data-opt-out-path")),$("[data-behavior=book-name-holder]").text($(this).attr("data-book-name")),$("#opt-out-modal").modal("show")})},e.observeCancelRequest=function(){$("[data-behavior=request-cancellor]").click(function(e){e.preventDefault(),$("a[data-behavior=cancel-request]").attr("href",$(this).attr("data-cancel-path")),$("[data-behavior=book-name-holder]").text($(this).attr("data-book-name")),$("#cancel-modal").modal("show")})}}),ns("Inkshares",function(e){e.Comments=function(){this.listenForIndex(),this.listenForSave(),this.listenForNew(),this.listenForEdit(),this.listenForCancel(),this.listenForDelete(),this.loadComments(),Inkshares.Mentions.listenForMention("[data-behavior=comment-container]",!0)},e.Comments.prototype.loadComments=function(t){var n=this;if(t==undefined)t=$("[data-behavior=load-comments]");$(t).on("click",function(t){t.preventDefault();var r=n._findCommentList(this),i=this;$.ajax({type:"GET",url:$(this).attr("href"),dataType:"html",context:[r,i],success:function(t){$(r).append(t),$(i).remove();var n=$(r).find("[data-behavior=load-comments]");e.Comments.prototype.loadComments(n)}})})},e.Comments.prototype.listenForIndex=function(){$("body").on("click","[data-comment-action=index-comments]",function(e){return e.preventDefault(),action=$(this).attr("href"),$.ajax({type:"GET",url:action,dataType:"html",success:function(e){$("[data-behavior=commentary-container]").html(e)}}),!1})},e.Comments.prototype.listenForNew=function(){var e=this;$("body").on("click","[data-comment-action=new-comment]",function(t){t.preventDefault();var n=$(t.target),r=e._findCommentaryContainer(n).find(".commentary").first();e._toggleCommentButton(n,!0),Inkshares.Comments.prototype.getNewComment(r,this)})},e.Comments.prototype.getNewComment=function(e,t){var n=this;$.ajax({type:"GET",url:"/comments/new",dataType:"html",data:$(t).data(),success:function(t){var r=$(e).prepend(t);n._makeEditable(n._findContainer(r))}})},e.Comments.prototype.listenForEdit=function(){var e=this;$("body").on("click","[data-comment-action=edit]",function(t){return t.preventDefault(),e._makeEditable(e._findContainer($(this))),!1})},e.Comments.prototype.listenForSave=function(){var e=this;$("body").on("click","[data-comment-action=save]",function(t){t.preventDefault();var n=$(this).attr("data-id")?$(this).attr("data-id"):null;return e._save(n,e._findContainer($(this))),e._toggleCommentButton(this,!1),!1})},e.Comments.prototype.listenForCancel=function(){var e=this;$("body").on("click","[data-comment-action=cancel]",function(t){t.preventDefault(),e._toggleCommentButton(t.target,!1);var n=e._findContainer($(this));return n.attr("data-comment-id")?(n.find("[data-comment-behavior=body]").html(e.originalBodyHtml),e._makeUnEditable(n)):n.remove(),!1})},e.Comments.prototype.listenForDelete=function(){var e=this;$("body").on("click","[data-comment-action=delete]",function(t){if(t.preventDefault(),confirm("Delete comment?")){var n=e._findContainer($(this)),r=$("[data-behavior=comment-form]").attr("action")+"/"+n.attr("data-comment-id");$.ajax({type:"DELETE",url:r,success:function(){n.fadeOut(1e3,function(){n.remove()})}})}return!1})},e.Comments.prototype._save=function(e,t){var n=this._findCommentaryContainer(t).find("[data-behavior=comment-form]"),r=this,i=n.attr("action"),o="POST";if(e&&(i=i+"/"+e,o="PUT"),$("#comment_body",n).val(t.find("[data-comment-behavior=body]").html().replace("\r\n","").trim()),$("#notify_all",n).val(t.find("input[data-behavior=notify-all]").is(":checked")),!e&&0===grecaptcha.getResponse().length)return $(".g-recaptcha iframe").addClass("error"),!1;if($("#g-recaptcha-response").length>0){var a=$("<input>").attr("type","hidden").attr("name","g-recaptcha-response").val($("#g-recaptcha-response").val());n.append($(a))}$.ajax({type:o,url:i,data:n.serialize(),dataType:"html",success:function(e){t.replaceWith(e),$("[data-comment-behavior=first-run]").remove(),r.pen.destroy()}})},e.Comments.prototype._findCommentaryContainer=function(e){return $(e).closest("[data-behavior=commentary-container]")},e.Comments.prototype._findCommentList=function(e){return $(e).closest("[data-behavior=comment-list]")},e.Comments.prototype._toggleCommentButton=function(e,t){self=this;var n=$(self._findCommentaryContainer(e)).find("[data-comment-action=new-comment]");t?n.addClass("disabled"):n.removeClass("disabled")},e.Comments.prototype._findContainer=function(e){var t=e.closest("[data-behavior=comment-container]");return 0>=t.length&&(t=$("[data-behavior=comment-container]:first",e)),t},e.Comments.prototype._makeEditable=function(e){var t=e.find("[data-comment-behavior=body]");e.find("[data-comment-action]:not([data-comment-action=delete])");this.originalBodyHtml=t.html(),t.attr("data-editable",!0),Inkshares.Editable.makeEditable(),t.focus(),this._toggleActions(e),this.pen=new Pen({editor:t[0],textarea:'<textarea name="content"></textarea>',list:["bold","italic","underline","createlink","insertimg"],stay:!1})},e.Comments.prototype._makeUnEditable=function(e){var t=$("[data-comment-behavior=body]",e);$("[data-comment-action]:not([data-comment-action=delete])",e);t.removeClass("editable"),t.attr("contenteditable",!1),t.attr("data-editable",!1),this._toggleActions(e),this.pen.destroy()},e.Comments.prototype._toggleActions=function(e){$("li:has(>[data-comment-action=edit])",e).toggleClass("hidden"),$("li:has(>[data-comment-action=save])",e).toggleClass("hidden"),$("li:has(>[data-comment-action=cancel])",e).toggleClass("hidden"),$("li:has(>[data-comment-action=delete])",e).toggleClass("hidden"),$("li:has(>[data-comment-action=notify])",e).toggleClass("hidden")}}),ns("Inkshares.Comps",function(e){e.initialize=function(){this.addComps()},e.addComps=function(e){var t=$('[data-behavior=comp-form][action="'+e+'"]'),n="<div class='comp-result-row row' data-behavior='comp-selection' data-external_id='{{external_id}}' data-title='{{title}}' data-photo='{{image_url}}' data-url='{{url}}' data-synopsis='{{synopsis}}' data-comp-type='{{comp_type}}'> <div class='col-xs-4'> <img class='poster' src='{{image_url}}'> </div> <div class='col-xs-8'> <div class='title'>{{title}}</div> <div class='year'>{{year}}</div> </div> </div>";$("[data-behavior=comp-finder][data-type=book]").typeahead({name:"bookcomps",remote:{url:"https://www.googleapis.com/books/v1/volumes?q=%QUERY",cache:!0,filter:function(e){var t=[];return $.each(e.items,function(e,n){var r=n.volumeInfo;r&&t.push({tokens:[r.title],external_id:n.id,title:r.title,image_url:function(){if(r.imageLinks)return r.imageLinks.smallThumbn
273ail},url:n.selfLink,synopsis:r.description,comp_type:"book"})}),t}},valueKey:"title",template:n,engine:Hogan}),$("[data-behavior=comp-finder][data-type=movie]").typeahead({name:"moviecomps",remote:{url:"https://www.omdbapi.com/?apikey=da4782bf&s=%QUERY",cache:!0,filter:function(e){var t=[];return e.Search?($.each(e.Search,function(e,n){t.push({tokens:[n.Title],external_id:n.imdbID,title:n.Title,image_url:function(){return"N/A"==n.Poster?"https://s3-us-west-2.amazonaws.com/inkshares-production/images/brand_assets/inkshares-nib-black.svg":n.Poster},url:"http://www.imdb.com/title/"+n.imdbID,synopsis:n.Plot,comp_type:"movie"})}),t):[{value:"No results"}]}},valueKey:"title",template:n,engine:Hogan}),$(t).find("[data-behavior=comp-finder]").on("typeahead:selected",function(e,n){var r=$("[data-comp-container="+n.comp_type+"]");t&&$.ajax({method:"POST",url:t.attr("action"),data:{comp:n},context:r,success:function(e){r.prepend(e)},error:function(){}})})},e.removeComp=function(e){var t=$('[data-behavior=remove-comp][href="'+e+'"]');t.on("click",function(e){e.preventDefault();var n=$(this).parents("[data-behavior=comp]").first();$.ajax({type:"DELETE",data:n.data(),url:t.attr("href"),context:n,success:function(){var e=new CustomEvent("comp:removed",{detail:"Example of an event"});n[0].dispatchEvent(e),n.animate({opacity:0}
273,250,function(){$(this).remove()})},error:function(){}})})},e.getComps=function(){var e=$("[data-behavior=get-comps][data-url]");e.length>0&&e.each(function(e,t){$.ajax({url:$(t).data().url,context:t,success:function(e){$(t).html(e)},error:function(){}})})}}),ns("Inkshares.Contest",function(e){e.initialize=function(e){this.observeSectionChange(e)},e.observeSectionChange=function(e){function t(e,t,n){$("[data-behavior=load-section]").removeClass("active");var r=$("[data-behavior=section-target]");r.fadeOut(100).fadeIn(100).html($("<div>").addClass("center").text("LOADING SECTION...")),e.addClass("active"),n||$("body").animate({scrollTop:r.offset().top-50}),$.ajax({url:e.attr("href"),data:{editing:t},context:r}).done(function(e){$(r).html($(e)).animate({opacity:1},250)}).fail(function(){r.html("There was an error retrieving this page. Contact [email protected] if problem persists. ").animate({opacity:1},250)})}t($("[data-behavior=load-section]").first(),e,!0),$("[data-behavior=load-section]").on("click",function(n){n.preventDefault(),t($(this),e,!1)})},e.initContenders=function(){var e=this;$("[data-contender=container]").find("[data-contender=load]").on("click",function(t){t.preventDefault(),$(this).text("Loading...").parents("div").first().attr({"data-contender":"load"}).addClass("pulsate");var n=$(this).attr("href");e.getContenders(n)})},e.getContenders=function(e){$.ajax({url:e}
273).done(function(e){function t(){setTimeout(function(){var e=$("[data-contender=contender].hidden");e.length>0&&(e.first().css({opacity:0}).removeClass("hidden").animate({opacity:1},1e3),t())},250)}$("[data-contender=load]").remove(),$("[data-contender=container]").append($(e)),t()}).fail(function(){})},e.initManage=function(){$("[data-behavior=reject-project]").on("click",function(e){e.preventDefault();var t=this;$.ajax({url:$(this).attr("href"),type:"POST",context:t,success:function(){$(t).parents("[data-behavior=project-row]").fadeOut(250,function(){this.remove()})},error:function(){}})})}}),ns("Inkshares.CreditCards",function(e){e.initialize=function(e){var t=this;$("[data-behavior=credit-card-form]").card({container:".card-wrapper",numberInput:"input#credit_card_number",expiryInput:"input#credit_card_exp_date",cvcInput:"input#credit_card_cvv",nameInput:"input#credit_card_name",formatting:!0}),Stripe.setPublishableKey(e),$("[data-behavior=credit-card-form-submit]").click(function(e){e.preventDefault(),t.toggleAuthorizing(!0),t.createCard()}),$("[data-behavior=change-card]").click(function(e){return e.preventDefault(),t.toggleCreditCardForm(),!1})},e.toggleCreditCardForm=function(){$("[data-behavior=credit-card-form-container]").toggleClass("hidden"),$("[data-behavior=current-card]").toggleClass("hidden")},e.observeExpiryDateTyping=function(){$("[data-behavior=exp-date]").keyup(function(e){2==e.target.value.length&&/^(0[1-9]|1[0-2])$/.test(e.target.value)&&(e.target.value=e.target.value+"/")})},e.toggleAuthorizing=function(e){var t=$("[data-behavior=credit-card-form-submit]");e?(t.attr("value","Authorizing..."),t.attr("disabled",!0)):(t.attr("value","USE"),t.attr("disabled",!1))},e.createCard=function(){try{var e=this,t=$("[data-behavior=credit-card-form]"),n=this.parseExpiryDate(t.find("#credit_card_exp_date").val()),r={name:t.find("#credit_card_name").val(),number:t.find("#credit_card_number").val(),exp_month:n[0],exp_year:n[1],cvc:t.find("#credit_card_cvv").val(),address_zip:t.find("#credit_card_post_code").val()};Inkshares.PaymentForm.clearValidationErrors(),this.validateInput(r,function(){try{Stripe.card.createToken(r,function(t,n){e.handleProviderResponse(t,n)})}catch(t){Inkshares.CreditCards.toggleAuthorizing(!1),Inkshares.PaymentForm.handleError(t)}})}catch(i){Inkshares.CreditCards.toggleAuthorizing(!1),Inkshares.PaymentForm.handleError(i)}},e.parseExpiryDate=function(e){try{var t=e.replace(/\s+/g,"").split("/");return 2==t[1].length&&(t[1]="20"+t[1]),t}catch(n){return["00","0000"]}},e.handleProviderResponse=function(e,t){try{if(t.error)"exp_year"==t.error.param||"exp_month"==t.error.param?Inkshares.PaymentForm.insertValidationError("credit_card_exp_date","Please use MM/YY format, i.e. 02/15"):"incorrect_number"==t.error.code||"invalid_number"==t.error.code?Inkshares.PaymentForm.insertValidationError("credit_card_number","Make sure your credit card number is valid."):"incorrect_zip"==t.error.code?Inkshares.PaymentForm.insertValidationError("credit_card_post_code","Double check your zip."):"invalid_cvc"==t.error.code||"incorrect_cvc"==t.error.code?Inkshares.PaymentForm.insertValidationError("credit_card_cvv","Double check your CVV."):"card_declined"==t.error.code?Inkshares.PaymentForm.notifyFinancialProblem("Hmm, it looks like your card has been declined. Have another one?"):"expired_card"==t.error.code?Inkshares.PaymentForm.insertValidationError("credit_card_exp_date","It looks like your card has expired."):Inkshares.PaymentForm.handleError(t);else if(200!=e)Inkshares.PaymentForm.handleError(t);else{var n=$("[data-behavior=credit-card-form]");Inkshares.PaymentForm.purgeForm(n,["#credit_card_number","#credit_card_expiration_month","#credit_card_exp_month","#credit_card_exp_year","#credit_card_cvv","#credit_card_post_code"]),Inkshares.PaymentForm.addFormInput(n,"credit_card[token]",t.id),Inkshares.PaymentForm.addFormInput(n,"credit_card[last_four]",t.card.last4),Inkshares.PaymentForm.addFormInput(n,"credit_card[card_type]",t.card.brand),n.submit()}}catch(r){Inkshares.CreditCards.toggleAuthorizing(!1),Inkshares.PaymentForm.handleError(r)}},e.validateInput=function(e,t){var n=this,r=!1;Stripe.card.validateCardNumber(e.number)||(r=!0,Inkshares.PaymentForm.insertValidationError("credit_card_number","Invalid Credit Card Number")),Stripe.card.validateCVC(e.cvc)||(r=!0,Inkshares.PaymentForm.insertValidationError("credit_card_cvv","Invalid Security Code (CVC)")),Stripe.card.validateExpiry(e.exp_month,e.exp_year)||(r=!0,Inkshares.PaymentForm.insertValidationError("credit_card_exp_date","Please enter an Expiration Date, i.e. 02 / 19")),""===$("[data-behavior=name]").val()&&(r=!0,Inkshares.PaymentForm.insertValidationError("credit_card_name","We need your name to validate your credit card.")),r?n.toggleAuthorizing(!1):t()}}),ns("Inkshares.Editable",function(e){e.timeoutHandles=[],e.initialize=function(e,t){var n=this;this.identifyChildren(),this.makeEditable(t),this.observePhoto(),this.observeStandalonePhoto(),this.observeSave(),this.toggleSavingText(!1),e&&$("[data-editable=true]").keydown(function(){for(i=0;i<n.timeoutHandles.length;i++)clearTimeout(n.timeoutHandles[i]);n.startAutosaveTimeout()}),$("[data-position=first]").focus()},e.makeEditable=function(e){$("[data-editable=true]").attr("contenteditable",!0),$("[data-editable=true]").addClass("editable"),$("[data-behavior=save]").click(this.submitData);var t=this;$("[data-behavior~=penable]").each(function(){t._scribify($(this))}),this._makePenable(this._mergePenOptions(e)),this._applyDefault(),this._insertPlaceHolders(),this._constrain()},e.toggleSavingText=function(t){var n=$("[data-behavior=save],[data-behavior=update]");t?e._styleTransition(n,!0):e._styleTransition(n,!1)},e._styleTransition=function(e,t){var n="Save";void 0!==e&&(n=void 0!==e.attr("data-resting-text")?e.attr("data-resting-text"):"Save"),t?(e.addClass("small-transition"),e.text("Processing"),e.attr("disabled",!0)):(e.removeClass("small-transition"),e.text(n),e.attr("disabled",!1))},e._constrain=function(){$("[data-type=inline], [data-type=short-form]").keypress(function(e){return 13!=e.which})},e._applyDefault=function(){$("[data-editable=true]").each(function(){var e=$
273(this).html().trim();0!=e.length&&"<p><br></p>"!=e||$(this).html($(this).attr("data-default-value"))})},e._insertPlaceHolders=function(){function e(e){/\S/.test($(e).html())||$(e).text("")}_.each($("[data-placeholder]"),e)},e._makePenable=function(e){$('[data-behavior~="penable"]').each(function(){new Pen({editor:$(this)[0],textarea:'<textarea name="content"></textarea>',list:e,stay:!1,debug:!0})})},e._mergePenOptions=function(e){var t=["blockquote","h3","bold","italic","underline","createlink","insertorderedlist","insertunorderedlist","insertimg"];return e&&e.penOptions&&Array.isArray(e.penOptions)&&e.penOptions.length>=1?e.penOptions:t},e._scribify=function(e){require({paths:{scribe:"/amd/scribe","scribe-plugin-sanitizer":"/amd/scribe-plugin-sanitizer"}},["scribe","scribe-plugin-sanitizer"],function(t,n){new t(e[0],{allowBlockElements:!0}).use(n({tags:{p:{"data-id":!0},br:{"data-id":!0},div:{"data-id":!0,"data-behavior":!0,"class":!0,style:!0,contenteditable:!0},img:{"data-id":!0,src:!0},b:{"data-id":!0},strong:{"data-id":!0},i:{"data-id":!0,"class":!0},s:{"data-id":!0},blockquote:{"data-id":!0},ol:{"data-id":!0},ul:{"data-id":!0},li:{"data-id":!0},a:{"data-id":!0,"data-toggle":!0,"data-behavior":!0,"data-loading-text":!0,"data-target":!0,href:!0,"class":!0,contenteditable:!0},h2:{"data-id":!0},h3:{"data-id":!0}}}))}),$("div:not([data-behavior~=section-media])",e).replaceWith(function(){return $("<p>",{html:this.innerHTML})}),e.html(e.html().replace(/(\r\n|\n|\r)/gm," ").replace(/ /gi," "))},e.collectData=function(e){var t=$("[data-behavior=save-form]");return void 0===e&&(e="body"),$("[data-editable=true]",e).each(function(){var e=$
273(this).attr("data-type"),n="";n="number"===e?$(this).text().replace("$","").replace(",",""):"long-form"===e||"short-form"===e?$(this).html():$(this).is("input, select")?$(this).val():$(this).text(),$("<input>").attr({type:"hidden",name:$(this).attr("data-field"),value:Inkshares.Editable.slenderize(n)}).appendTo(t)}),!0},e.slenderize=function(e){return e.replace("\r\n","").trim()},e.startAutosaveTimeout=function(){var e=setTimeout(function(){this.autosave()}.bind(this),1e4);this.timeoutHandles.push(e)},e.autosave=function(){var t=$("[data-behavior=save-form]");$("input [type=hidden]",t).remove(),Inkshares.Editable.collectData();var n=new FormData,r=document.getElementById("file-upload");$("input[type='hidden']",t).each(function(){n.append($(this).attr("name"),$(this).val())}),r&&r.files.length>0&&n.append(r.getAttribute("name"),r.files[0]),e.toggleSavingText(!0),$("[data-behavior=display-time-ago] i").addClass("fa-spinner"),$.ajax({type:"patch",url:t.attr("action"),cache:!1,contentType:!1,processData:!1,data:n,dataType:"json",success:function(e){$("[data-behavior=display-time-ago] span").text("autosaved at "+e.updated_at_short),$("[data-behavior=word-count]").text(e.word_count),$("[data-behavior=time_to_read]").text(e.time_to_read)},complete:function(){$("[data-behavior=display-time-ago] i").removeClass("fa-spinner"),e.toggleSavingText(!1)}})},e.submitData=function(t){t.preventDefault();var n=$("[data-behavior=save-form]");return Inkshares.Editable.collectData(),e.toggleSavingText(!0),n.submit(),!1},e.observeSave=function(){$("[data-behavior=update]").click(function(e){return e.preventDefault(),Inkshares.Editable.autosave(),!1})}
273,e.observePhoto=function(){var e=$("[data-behavior=file-upload]");$("[data-behavior=edit-photo]").click(function(){return e.trigger("click"),!1}),$(e).change(function(e){var t=$(e.currentTarget);if(t[0].files.length&&window.FileReader){var n=t[0].files[0];if(/^image/.test(n.type)){var r=new FileReader;r.readAsDataURL(n),r.onloadend=function(){$("[data-behavior=photo-target]").is("IMG")?$("[data-behavior=photo-target]").attr("src",this.result):$("[data-behavior=photo-target]").css("background-image","url("+this.result+")")}}else{var i=$(".photo-alert");0==i.length&&((i=$("<div class='photo-alert alert alert-danger'><button type='button' class='close' data-dismiss='alert' aria-hidden='true'>× </button>Please make sure you use an image file.</div>")).alert("close"),$(".photo").before(i))}}})},e.observeStandalonePhoto=function(){$("[data-behavior=edit-standalone-photo]").click(function(e){e.preventDefault();var t=$(this).attr("data-for"),n="<form name='standalone-photo-form' enctype='multipart/form-data' method='post' id='standalone-photo-form'><input type='file' id='temp-file-input'></input></form>";$("body").append(n);var r=$("#temp-file-input");r.trigger("click"),$(r).change(function(){$(this);var e=new FormData;e.append("picture",r[0].files[0]),$.ajax({type:"POST",url:"/api/photos",data:e,datatype:"json",cache:!1,processData:!1,contentType:!1,success:function(e){$("img[data-behavior=standalone-photo-target][data-for="+t+"]").attr("src",e),$("input[id="+t+"]").val(e),$("#standalone-photo-form").remove()}})})})},e.identifyChildren=function(){var e=function(){return $("[data-behavior~=id-children]").children()},t=function(){var e=new Array;return $("[data-id]").length>=0&&$("[data-id]").each(function(){e.push($(this).attr("data-id"))}),e},n=function(e){return e=void 0!==e?e:42,CryptoJS.MD5((new Date).getTime().toString()+e.toString()).toString().substr(0,5)},r=function(){for(var e=t(),r=0;r<e.length;r++)e[r]==e[r+1]&&$("[data-id="+e[r]+"]").first().attr({"data-id":n(r)})},i=function(){var t=0;e().each(function(){t++, 274$(this).is("[data-id]")||$(this).attr({"data-id":n(t)}),$(this).addClass("snippetable")})};window.setInterval(function(){r(),i()},5e3)}}),ns("Inkshares",function(e){e.FeedItems=function(e){this.observeLoadFeed(),this.observeFeedScope(e)},e.FeedItems.prototype.observeFeedScope=function(e){var t=function(e){$(".feed-item-scope").hide(),$(".feed-item-scope."+e).each(function(){$(this).fadeIn(1e3)}),$("[data-feed-scope]").removeClass("active"),$("[data-feed-scope="+e+"]").addClass("active")};
274t(e),$("[data-feed-scope]").click(function(){var e=$(this).attr("data-feed-scope");t(e)})},e.FeedItems.prototype.observeLoadFeed=function(){var t=this,n=$("[data-behavior=load-feed]").attr("href");console.log("observeLoadFeed",n),e.FeedItems.prototype.getFeedItems(n),$("body").on("click","[data-behavior=load-feed]",function(e){$(this).addClass("disabled").text("Retrieving..."),e.preventDefault(),e.stopPropagation(),url=$(this).attr("href"),t.getFeedItems(url)}),$("[data-behavior=activity-feed]").scroll(function(){var t=$("[data-behavior=load-feed]");$(t).is(":visible")&&e.FeedItems.prototype.getFeedItems($(t).attr("href"))})},e.FeedItems.prototype.getFeedItems=function(e){$.ajax({type:"GET",url:e,dataType:"html",success:function(t){$('a[href$="'+e+'"]').remove(),$(t).each(function(){$(this).appendTo("[data-behavior=activity-feed]").fadeIn(500)}),$("[data-behavior=load-feed]").fadeIn()}})}}),ns("Inkshares",function(e){e.Flip=function(e){this.loading=!1,this.nextBuffer=[],this.loadNextBuffer(e),this.observeNo(),this.observeYes(),this.observeTrending()},e.Flip.prototype.observeYes=function(){var e=this,t=function(){setTimeout(function(){e.popNext(),e.loadNextBuffer()},1e3)}.bind(this);Inkshares.Follows.initialize(t)},e.Flip.prototype.observeNo=function(){var e=this;$("body").on("click","[data-behavior=no]",function(t){t.preventDefault(),e.popNext(),$.ajax({type:"POST",url:"/project_interactions",data:{project:$(this).attr("data-project")},dataType:"json"})})},e.Flip.prototype.observeTrending=function(){var e=this;$("body").on("click","[data-behavior=trending-idea]",function(t){t.preventDefault();var n=$(this).attr("data-project");$.ajax({type:"GET",url:"/flip/"+n+"/trending",data:{project:n},dataType:"json",success:function(t){$("[data-behavior=flip-staging]").html(t.html),e.popNext()}})})},e.Flip.prototype.loadNextBuffer=function(e){if(!this.loading){this.loading=!0;var t=this;this.nextBuffer.length<10?$.ajax({type:"GET",url:"/flip/"+e.toString()+"/next",data:{page:e},dataType:"json",success:function(e){t.nextBuffer.push(e),t.nextBuffer.length<10?(t.loading=!1,t.loadNextBuffer(parseInt(e.page)+1)):t.loading=!1}}):this.loading=!1}},e.Flip.prototype.popNext=function(){var e=this,t=$("[data-behavior=flip-staging]"),n=$("[data-behavior=flip-content]");n.fadeOut(200,function(){n.html(t.html()),n.fadeIn(200);var r=e.nextBuffer[e.nextBuffer.length-1],i=e.nextBuffer.shift();t.html(i.html);var o="?flip="+(parseInt(i.page)-1).toString();window.history.pushState({id:"Home"},"",o),e.loadNextBuffer(parseInt(r.page)+1)})}}),ns("Inkshares.Follows",function(e){e.initialize=function(){},e.initializeFollowModal=function(){$("[data-follows=get]").on("click",function(e){e.preventDefault();var t=$("#follows-modal");t.find(".modal-body").html(""),t.modal("show"),$.ajax({url:$(this).attr("href"),data:{followable_id:$(this).data().slug},context:t,success:function(e){var n=t.find(".modal-body");t.find(".ball-spinner").fadeOut(500,function(){n.append(e)})}})})},e.initializeFollowButton=function(e){function t(e){return $('[href="'+e+'"]')}var n=$("[data-behavior=follow][data-id="+e.id+"]:not(.disabled)");$(n).unbind("click"),$(n).on("click",function(n){if(n.preventDefault(),e.url!==undefined&&e.el==undefined)var r=$(this).parents("[data-behavior*=follow-container]").first();if(r!==undefined){var i=$(this).attr("href");return $(r).find(".fa").replaceWith($("<i>").addClass("fa fa-spinner spin")),$.ajax({url:i,method:$(this).data().method,format:"html",success:function(e){$("[data-tooltip=true]").tooltip({delay:{show:500}}),t(i).each(function(t,n){$(n).parents("[data-behavior*=follow-container]").replaceWith(e)})}}),!1}})}}),ns("Inkshares",function(e){e.Forum=function(){this.projectSearch(),this.initializeModal()},e.Forum.prototype.initializeShow=function(){$(function(){Inkshares.Utility.submitOnChange(),"recent"==$("[data-forum=sort]").val()&&$("[data-scroll-to-comment]").fadeIn().on("click",function(e){e.preventDefault();var t=$(this).data().scrollToComment,n=$("[data-comment-id="+t+"]");$("html, body").animate({scrollTop:n.offset().top},500)})})},e.Forum.prototype.topicDropdown=function(){function e(e){"promo"==$(e).val()?$("[data-forum=project-field]").fadeIn():$("[data-forum=project-field]").fadeOut()}var t=$("#forum_thread_topic");t.on("change",function(){e(this)}),e(t)}
274,e.Forum.prototype.initializeModal=function(){this.topicDropdown()},e.Forum.prototype.projectSearch=function(){var e={minlength:0,name:"press-project-search",remote:"/search/typeahead_projects?q=%QUERY&image=false",valueKey:"name",cache:!0,template:"<div class='search-bar-result row' data-slug={{slug}}> <div class='col-xs-10 name'><i>{{name}}</i></div> </div>",engine:Hogan};$("[data-forum=project-search]").typeahead(e).bind("typeahead:selected",function(e,t){$("#forum_thread_project_id").val(t.slug)})}}),ns("Inkshares.FullImage",function(e){e.initialize=function(){var e;$(window).scrollTop($("nav").height()),this.resizeSectionPhotos(),$(window).resize(function(){clearTimeout(e),e=setTimeout(this.resizeSectionPhotos,100)}.bind(this))},e.resizeSectionPhotos=function(){$("header.cover-photo").height($(window).height()+1);var e=($("header.cover-photo").height()-$(".header-content").height())/2;$(".header-content").css("margin-top",e-40+"px")}}),ns("Inkshares",function(e){e.FundingFloor=function(){this.timeoutHandle=0,this.startRefreshGoalTimeout(),this.observeDataEntry()},e.FundingFloor.prototype.observeDataEntry=function(){var e=this;$("input[type=text]").on("keyup",function(){e.resetTimeout()}),$("input[type=number]").on("keyup",function(){e.resetTimeout()}),$("input:radio").change(function(){e.resetTimeout()})},e.FundingFloor.prototype.resetTimeout=function(){clearTimeout(this.timeoutHandle),this.startRefreshGoalTimeout()},e.FundingFloor.prototype.startRefreshGoalTimeout=function(){this.timeoutHandle=setTimeout(function(){$.ajax({type:"GET",url:"/funding_goal/calculate",data:{advance:Inkshares.Utility.scrubNumber($("input[data-behavior=advance]").val()),pages:Inkshares.Utility.scrubNumber($("input[data-behavior=pages]").val()),genre:$("input[data-behavior=genre]").val(),is_english_primary:$("input:radio[data-behavior=is_english_primary]:checked").val(),project_type:$("input[data-behavior=project_type]").val(),project_format:$("input:radio[data-behavior=project_format]:checked").val()||$("input#project-format").val()},dataType:"json",success:function(e){$("input[data-behavior=funding_goal]").val(e.print_funding_goal),$("input[data-behavior=print_unit_threshold]").val(e.print_unit_threshold),$("div[data-behavior=print_unit_threshold]").text(e.print_unit_threshold+" copies"),$("div[data-behavior=pod_unit_threshold]").text(e.pod_unit_threshold+" copies"),$("div[data-behavior=funding_list_price]").text("$ "+e.funding_list_price),$("input[data-behavior=pod_unit_threshold]").val(e.pod_unit_threshold),$("input[data-behavior=funding_list_price]").val(e.funding_list_price),e.print_funding_goal==e.pod_funding_goal?$("[data-behavior=pod-container]").addClass("hidden"):$("[data-behavior=pod-container]").removeClass("hidden")}})},500)}}),ns("Inkshares",function(e){e.Genres=function(){},e.Genres.prototype.getGenreFollows=function(){$("[data-genres=get-follows]").on("click",function(e){var t=$("[data-genres=modal]");e.preventDefault(),$(t).modal("show")}
274),$("[data-genres=get-follows]").on("click",function(){var e=$("[data-genres=modal]");$.ajax({url:$(this).attr("href"),context:e,success:function(t){$(e).find("[data-genres=modal-body]").html(t)}})})}}),ns("Inkshares",function(e){e.Home=function(e){this.initializeAjax(),this.observeBack(),this.updateMenuState(e)},e.Home.prototype.initializeMobileAjax=function(){$("[data-behavior=mobile-load-section] a").on("click",function(e){e.preventDefault();var t=$("[data-behavior=home-core]"),n=$(this).attr("href");$.ajax({type:"GET",url:n,context:this,format:"json",success:function(e){$(".loading-row").addClass("hidden"),t.delay(250).html(e).fadeIn()}})})},e.Home.prototype.initializeAjax=function(){var e=this,t=window.location.pathname;this.updateMenuState(t),$("[data-behavior=load-section] a").on("click",function(t){t.preventDefault();var n=$(this).attr("href");e.loadSection({url:n})})},e.Home.prototype.loadSection=function(e){var t=this;if(!(e.url.length>0))return!1;var n=$("[data-behavior=home-core]");$(n).fadeOut(0),$(".loading-row").removeClass("hidden"),t.updateMenuState(e.url),window.scrollTo(0,0),$.ajax({type:"GET",url:e.url,success:function(t){$('[data-toggle="dropdown"]');$(".loading-row").addClass("hidden"),n.html(t).fadeIn(),1==!e.ignorePush&&window.history.pushState({path:e.url},"",e.url)}})},e.Home.prototype.updateMenuState=function(e){$("[data-behavior=load-section]").removeClass("active"),$('[data-behavior=load-section] [href="'+e+'"]').parent().addClass("active")},e.Home.prototype.observeBack=function(){var e=this;history.pushState({path:window.location.pathname},"",window.location.pathname),window.onpopstate=function(t){null!==t.state&&e.loadSection({url:t.state.path,ignorePush:!0})}}}),ns("Inkshares.InfluentialBooks",function(e){e.initialize=function(e){void 0===e&&(e=this.onSelected);var t=this;$("[data-behavior=add-book] a").click(this.launchAddBookModal);var n="<div class='row book-finder-item'> <div class='col-sm-3'> <img class='book-cover' src='{{image_url}}'> </div> <div class='col-sm-9'> <div class='book-title'>{{title}}</div> <div class='author'>{{author}}</div> </div> </div>";$("[data-behavior=book-finder]").typeahead({name:"books",remote:"/influential_books?q=%QUERY",valueKey:"title",template:n,beforeSend:Inkshares.InfluentialBooks.onInProgress,engine:Hogan}),$("[data-behavior=book-finder]").on("typeahead:selected",e),$("[data-behavior=book-finder]").on("keydown",function(){t.toggleMotion(!0),t.toggleNoResults(!1),null!=t.timeOutHandle&&clearTimeout(t.timeOutHandle),t.searchTimeout()})},e.searchTimeout=function(){var e=this;this.timeOutHandle=setTimeout(function(){e.toggleMotion(!1),e.toggleNoResults(!0)},2e3)},e.toggleMotion=function(e){e?$(".spinner").removeClass("hidden"):$(".spinner").addClass("hidden")},e.toggleNoResults=function(e){e?$(".meh-face").removeClass("hidden"):$(".meh-face").addClass("hidden")},e.onSelected=function(e,t){Inkshares.InfluentialBooks.toggleMotion(!1),Inkshares.InfluentialBooks.toggleNoResults(!1);var n=$("[data-behavior=book-modal-sequence]").val(),r=$("[data-behavior=book-modal-record-id]").val(),i="[data-book-sequence="+n+"]",o=Hogan.compile(" <input data-book-field='id' id='user_influential_books_attributes_{{sequence}}_id' name='user[influential_books_attributes][{{sequence}}][id]' type='hidden' value='{{id}}'> <input data-book-field='title' id='user_influential_books_attributes_{{sequence}}_title' name='user[influential_books_attributes][{{sequence}}][title]' type='hidden' value='{{title}}'> <input data-book-field='external_id' id='user_influential_books_attributes_{{sequence}}_external_id' name='user[influential_books_attributes][{{sequence}}][external_id]' type='hidden' value='{{external_id}}'> <input data-book-field='author' id='user_influential_books_attributes_{{sequence}}_author' name='user[influential_books_attributes][{{sequence}}][author]' type='hidden' value='{{author}}'> <input data-book-field='image_url' id='user_influential_books_attributes_{{sequence}}_book_image_url' name='user[influential_books_attributes][{{sequence}}][book_image_url]' type='hidden' value='{{image_url}}'> ");$("[data-behavior=influential-book-fields-"+n+"]").html(o.render($.extend(t,{sequence:n,id:r}))),$(i+" .book-cover").attr("src",t.image_url),$(i+" .book-title").text(t.title),$(i+" .author").text(t.author),$(i+" [data-behavior=add-book]").length>0&&$(i+" [data-behavior=add-book] a").html('<i class="fa fa-plus"></i> Change'),$("#book-finder-modal").modal("hide")},e.launchAddBookModal=function(e){return e.preventDefault(),$("[data-behavior=book-modal-sequence]").val($(this).attr("data-sequence")),"null"!=$(this).attr("data-record-id")&&$("[data-behavior=book-modal-record-id]").val($(this).attr("data-record-id")),$("#books").val(""),$($(this).attr("data-target")).modal(),!1}}),ns("Inkshares.Introduction",function(e){e.project=function(e){var t,n=function(){$(".edit-control
274s").css("position","absolute"),(t=introJs().setOptions({showBullets:"false",showLabel:"false",showStepNumbers:"false",KeyboardNavigation:"false",steps:[{element:"#main_nav .navbar-right",intro:"This is your project navigation bar. It allows you to quickly access features, like editing your project page, messaging your backers, or creating a new project."},{element:".project-name",intro:"You are currently in edit mode. This allows you to directly edit those fields highlighted in yellow."},{element:".edit-controls",intro:"Once you are finished editing, save your work here."},{element:".edit-photo",intro:"Click here to change background image for your project.",position:"top"},{element:".video",intro:"Create a simple video explaining your project and embed it here."},{element:".incentives",intro:"These are the incentives for your backers. You can rename these incentives to better suit the spirit of your project.",position:"top"},{element:".user-writing-samples",intro:"Click here to add samples of your writing to your author profile."},{element:"#proj-description",intro:"This is where you explain your project in detail. You can format the text by highlighting the desired section.",position:"left"}]})).start(),$(".edit-controls").css("position","fixed")};1==e&&setTimeout(function(){n()},300),$(".launch-intro").on("click",function(){n(),$(".edit-controls").css("position","fixed")}),$("[data-intro]").keydown(function(){t._onResize()})},e.article=function(){var e;setTimeout(function(){(e=introJs().setOptions({showBullets:"false",showLabel:"false",showStepNumbers:"false",KeyboardNavigation:"false",steps:[{element:".header-content",intro:"<div style='font-weight: 700'>Type the title of your piece.</div> This can be the same as your project title, or different."},{element:".edit-photo",intro:"<div style='font-weight: 700'>Click to change the header image of your article.</div> Think of this image as the visual representation of your article.",position:"left"},{element:"#manuscript-body",intro:"<div style='font-weight: 700'>Start typing your article.</div> To see formatting options, double-click on the text you have typed."},{element:".edit-controls",intro:"<div style='font-weight: 700'>Save or Publish your article</div> Click 'Save' to save your manuscript or click 'Done' to publish. Note - manuscript is also saved automatically when you stop typing.",position:"left"}]})).start()},300),$("[data-intro]").keydown(function(){e._onResize()})}}),ns("Inkshares",function(e){e.Likes=function(){this.observeLike(),this.observeCloseRecommendation(),this.appendModalToBody()},e.Likes.prototype.appendModalToBody=function(){$(document).on("show.bs.modal",".modal",function(){$(this).appendTo($("body"))})},e.Likes.prototype.observeLike=function(){var e=this;$("body").on("click","[data-behavior=like]",function(t){t.preventDefault();var n=e.findContainer($(this)),r=$("form[data-behavior=like-form]",n);$(this).children("i").replaceWith($("<i>").addClass("fa fa-spinner spin")),$.ajax({url:r.attr("action"),method:r.attr("method"),data:r.serialize(),format:"html",success:function(t){var r=$(t);n.replaceWith(r),e.afterLike(r)}})})},e.Likes.prototype.observeCloseRecommendation=function(){$("body").on("click","[data-behavior=close-recommendation]",function(e){e.preventDefault(),$(this).closest(".popover").remove()})},e.Likes.prototype.findContainer=function(e){var t=e.closest("[data-behavior=likes-container]");return 0>=t.length&&(t=$("[data-behavior=likes-container]:last",e)),t},e.Likes.prototype.afterLike=function(e){var t=$("[data-state=liked]",e).attr("data-popover-content");void 0!==t&&0<t.length&&"null"!==t&&($("[data-state=liked]",e).popover({html:!0,trigger:"manual",placement:"top",content:t}),$("[data-state=liked]",e).popover("show"))}}),ns("Inkshares",function(e){e.Linkedin=function(e){this._observeLaunchMessageDialogue(),this._observeSend(),this.messageTemplate=Inkshares.Prospects.compileMessageTemplate(Inkshares.Prospects.cleanse(e))},e.Linkedin.prototype._observeLaunchMessageDialogue=function(){var e=this;$("body").on("click","[data-behavior=launch-linkedin-message-dialogue]",function(t){t.preventDefault();var n=$("#linkedin-message-modal");e._loadForm($(this),n),n.modal()})},e.Linkedin.prototype._loadForm=function(e,t){var n=Inkshares.Prospects.collectMessageAttributes(e),r=this.messageTemplate.render(n),i=$("[data-behavior=linkedin-message-form]");i.attr("action","/prospects/"+n.prospect_id+"/linkedin_messages"),$("[data-behavior=prospect-name]",t).html(n.prospect_first_name),$("input[data-field=source_id]",i).val(n.source_id),$("input[data-field=to]",i).val(n.prospect_full_name),$("input[data-field=subject]",i).val(n.project_name),$("[data-field=body]",i).val(r)},e.Linkedin.prototype._observeSend=function(){$("body").on("submit","form[data-behavior=linkedin-message-form]",function(e){e.preventDefault();var t=$(this);$.ajax({type:t.attr("method"),url:t.attr("action"),data:t.serialize(),dataType:"json",success:function(e){$("tr:has(>td[data-value='"+e.id+"'])").replaceWith(e.html),$("#linkedin-message-modal").modal("hide"),t.trigger("reset")}})})}}),ns("Inkshares.Location",function(){}),ns("Inkshares.Login",function(e){e.setupLoginForm=function(e){$(function(){function t(){$("#email").bind("keyup blur",n)}function n(e){var t=250;e&&"[object FocusEvent]"===Object.prototype.toString.call(e.originalEvent)&&(t=0),clearTimeout(r),r=setTimeout(o,t)}var r,i="none";t(),n();var o=function(){function t(){i="unconfirmed",$(".confirmed-user").hide("slow"),$("#next").replaceWith(e.unconfirmedButton),$(".unconfirmed-set-password").click(function(e){$(e.currentTarget).attr("href",function(e,t){return t+("?email="+encodeURIComponent($("#email").val()))})})}function n(){i="confirmed",$(".confirmed-user").fadeIn("slow"),$("#next").replaceWith(e.confirmedButton)}
274var r=/\S+@\S+\.\S+/,o=$("#email").val();r.test(o)&&(o=$("#email").val(),result=Inkshares.User.testUserEmail(o),result.isConfirmed?"confirmed"!=i&&n():"unconfirmed"!=i&&t())}})}}),ns("Inkshares",function(e){e.Madlib=function(){this._observeAutoComplete(),this._enforceGoodGrammar()},e.Madlib.prototype._observeAutoComplete=function(){var e=this;$("[data-autocomplete]").each(function(){var t=$(this).data().delimiter;t==undefined&&(t=",");var n=$(this).attr("data-autocomplete").split(t);$(this).autocomplete({source:n,minLength:0}),e._enforceCompliance($(this),n),e._handleFocus($(this))})},e.Madlib.prototype._enforceCompliance=function(e,t){$(e).keyup(function(){var n=$(this).val(),r=n.length;for(i=0;i<t.length;i++)if(n.toLowerCase()===t[i].substr(0,r))return;$(e).empty().val(n.substr(0,r-1))})},e.Madlib.prototype._handleFocus=function(e){$(e).on("click focus",function(){$(this).autocomplete("search","")})},e.Madlib.prototype._enforceGoodGrammar=function(){var e=$("[data-behavior=pronoun]");$("[data-pronoun-influencer=true]").on("blur",function(){/^[aeiou]/.test($(this).val())?e.text("an"):e.text("a")})}}),ns("Inkshares",function(e){e.Main=function(){$(".modal-fullscreen").on("show.bs.modal",function(){setTimeout(function(){$(".modal-backdrop").addClass("modal-backdrop-fullscreen")},0)}),$("[data-tooltip=true]").tooltip({delay:{show:500}}),Inkshares.Timezone.setStandardGMTOffset()}}),ns("Inkshares.Mentions",function(e){e.listenForMention=function(e,t){function n(e){return $(e).is("input.mention")}function r(e){var t=e.getRangeAt(0),n=i(e,t);o(n,t,e),$(n).focus()}function i(e,t){var n=$("<input>").addClass("mention")[0];
274return t.deleteContents(),t.insertNode(n),n}function o(e){var t={minlength:0,name:"mentions-search",remote:"/search/typeahead_users?scope="+s+"&n=5&q=%QUERY",valueKey:"name",cache:!1,template:"<div class='search-bar-result user-mention'> <span class='result-image'><img src={{image}}></span> <span class='name'>{{name}}</span> </div>",engine:Hogan};$(e).typeahead(t).bind("typeahead:selected",function(t,n){var r=$("<span>").html(" "),i=$("<a>").attr({"data-slug":n.slug}).text("@"+n.name).addClass("mention");$(e).parents(".twitter-typeahead").before(i),i.after(r),a(e,r)})}function a(e,t){$(e).typeahead("destroy");var n=window.getSelection();if(n.rangeCount){var r=n.getRangeAt(0);r.selectNodeContents(t[0]),r.collapse(!1),n.removeAllRanges(),n.addRange(r)}$(e).remove()}var s=$(e).attr("data-scope");void 0===s&&(s="all"),$("body").on("keypress",e,function(e){if((!t||"@"==String.fromCharCode(e.which))&&!n(e.target)&&window.getSelection){var i=window.getSelection();i.getRangeAt&&i.rangeCount&&r(i)}}).on("keydown",e,function(e){8==e.keyCode&&n(e.target)&&e.target.value.length<=1&&a($(e.target),$(e.target))})}}),ns("Inkshares",function(e){e.Messages=function(){this.observeSelect(),this.observeHide(),this.observeAbuseAction()}
274,e.Messages.prototype.newMessage=function(){var e=$("#new-message-modal");e.on("shown.bs.modal",function(){$.ajax({type:"GET",url:e.data().url,dataType:"html",success:function(e){$("[data-behavior=new-message-target]").html(e)},error:function(){$("[data-behavior=new-message-target]").html("Uh oh there was a problem! Contact [email protected].")}})})},e.Messages.prototype.sendMessage=function(e,t){$("[data-behavior=reply][data-slug="+e+"]").click(function(n){n.preventDefault(),$(this).text("Sending..."),$(this).attr("disabled","true");var r=$("[data-behavior=message-view-container]"),i=$("[data-behavior=save-form][data-slug="+e+"]");Inkshares.Editable.collectData("[data-behavior=save-form][data-slug="+e+"]"),$.ajax({type:"POST",url:i.attr("action"),data:i.serialize(),dataType:"html",success:function(e){t?$("#new-message-modal").modal("hide"):r.html(e)}})})},e.Messages.prototype.observeSelect=function(){$("[data-behavior=inbox-message]").click(function(e){e.stopImmediatePropagation(),e.preventDefault(),$(".selected").removeClass("selected"),$(this).toggleClass("selected"),$(this).addClass("read");var t=$("[data-behavior=message-view-container]");t.children().fadeOut(250,function(){$(this).html("Loading Messages...").css({"text-align":"center",padding:"50px"})});var n=$(this).attr("data-load-uri");return $.ajax({type:"GET",url:n,dataType:"html",success:function(e){t.html(e);var n=$("[data-behavior=message-view-container] .new-message");$("body").animate({scrollTop:n.offset().top-500})}}),!1})},e.Messages.prototype.observeHide=function(){$("[data-behavior=hide-conversation]").click(function(e){e.stopImmediatePropagation(),e.preventDefault();var t=$(this).closest("[data-behavior=inbox-message]"),n=t.next("[data-behavior=inbox-message]"),r=$(this).attr("href");return t.fadeOut(250,function(){t.remove()}),n.trigger("click"),$.ajax({type:"GET",url:r,success:function(){}}),!1})},e.Messages.prototype.observeAbuseAction=function(){$("body").on("click","[data-behavior=abuse-action]",function(e){e.stopImmediatePropagation(),e.preventDefault();var t=$(this),n=t.closest("[data-behavior=abuse-container]");return $.ajax({type:t.attr("data-method"),url:t.attr("href"),dataType:"html",success:function(e){n.replaceWith(e)}}),!1})}}),ns("Inkshares",function(e){e.Milestone=function(){this.observeSelectPredecessor(),this.updateDuration()},e.Milestone.prototype.observeSelectPredecessor=function(){$("select[data-behavior=select-predecessor]").change(function(){"none"!=$(this).find(":selected").text()?($("[data-behavior=dates]").addClass("hidden"),$("[data-behavior=interval]").removeClass("hidden")):($("[data-behavior=dates]").removeClass("hidden"),$("[data-behavior=interval]").addClass("hidden"))})},e.Milestone.prototype.updateDuration=function(){$("#milestone_end_at").on("change",function(){var e=new Date($(this).val());if($("input[data-behavior=starts-at]")>0)var t=new Date($("input[data-behavior=starts-at]").val());else t=new Date($("[data-behavior=starts-at]").text());var n=Math.round((e-t)/864e5);$("[data-behavior=interval]").text(n)})}}),ns("Inkshares.Negotiations",function(e){e.observeInquire=function(){$("form[data-behavior=inquire-form]").submit(function(e){e.preventDefault(),$("input[type=submit]").attr("disabled",!0),$("input[type=submit]").val("Sending...");var t=$(this);$.ajax({type:t.attr("method"),url:t.attr("action"),data:t.serialize(),dataType:"html",success:function(){$(".inquire").toggleClass("hidden"),$(".inquiry-sent").toggleClass("hidden")}})})},e.observeContact=function(){$("body").on("click","[data-behavior=negotiation-contact-action]",function(e){e.preventDefault();var t=$(this),n=t.closest("[data-behavior=negotiation-contact-container]");$.ajax({type:"get",url:t.attr("href"),dataType:"html",success:function(e){n.replaceWith(e)}})})}}),ns("Inkshares",function(e){e.Newsletters=function(e){this.observeSignUp(),$("input[data-behavior=email-field]").val(e)},e.Newsletters.prototype.observeSignUp=function(){$("[data-behavior=form-submit]").click(function(e){e.preventDefault();var t=$("section[data-behavior=email-section]"),n=$("input[data-behavior=email-field]");if(n.val().length>0){var r=$("form[data-behavior=newsletter-form]"),i=$("input[type=submit]",r);i.attr("value","Processing..."),i.attr("disabled",!0),$.ajax({url:r.attr("action"),method:r.attr("method"),data:r.serialize(),format:"html",success:function(e){t.replaceWith(e)}})}else n.toggleClass("input-error")})}}),ns("Inkshares.Nomination",function(e){e.initialize=function(){this.addComps()},e.addComps=function(e){$('[data-behavior=comp-form][action="'+e+'"]');
274var t="<div class='comp-result nomination-comp-result' data-behavior='comp-selection' data-external_id='{{external_id}}' data-title='{{title}}' data-photo='{{image_url}}' data-url='{{url}}' data-synopsis='{{synopsis}}' data-comp-type='{{comp_type}}'> <div class='nomination-comp-result_img'> <img class='poster' src='{{image_url}}'> </div> <div class='nomination-comp-result_text'> <div class='title'>{{title}}</div> <div class='year'>{{year}}</div> </div> </div>";$("[data-behavior=comp-finder][data-type=book]").typeahead({name:"bookcomps",remote:{url:"https://www.googleapis.com/books/v1/volumes?q=%QUERY",cache:!0,filter:function(e){var t=[];return $.each(e.items,function(e,n){var r=n.volumeInfo;r&&t.push({tokens:[r.title],external_id:n.id,title:r.title,image_url:function(){if(r.imageLinks)return r.imageLinks.smallThumbn
274ail},url:n.selfLink,synopsis:r.description,comp_type:"book"})}),t}},valueKey:"title",template:t,engine:Hogan}),$(".comps-container").find("[data-behavior=comp-finder]").on("typeahead:selected",function(e,t){if($(".comps-container").find(".comp").length<3){var n=$("[data-comp-container="+t.comp_type+"]"),r=`<div class='comp' data-behavior='comp' data-comp='${t.external_id}' >\n <div data-behavior='remove-comp' class='remove-comp'>\n <i class='fa fa-times'></i>\n </div>\n <input name="comp[][external_id]" type="hidden" value="${t.external_id}" />\n <input name="comp[][comp_type]" type="hidden" value="${t.comp_type}" />\n <div class='poster'>\n <img src='${t.image_url()}' />\n </div>\n </div>\n `;const e=n.prepend(r);Inkshares.Nomination.removeComp(e),$("[data-behavior=comp-finder][data-type=book]").val("")}})},e.removeComp=function(e){$(e).on("click",function(e){e.preventDefault(),$(e.target).parents("[data-behavior=comp]").remove(),$("[data-behavior=comp-finder][data-type=book]").val("")})}}),ns("Inkshares.Notifications",function(e){e.initialize=function(){this.getNotifications()}
274,e.updateViewed=function(){$(function(){var e=$("[data-behavior=notifications-menu] [data-viewed=false]");if(e.length>0){var t=e.map(function(){return $(this).data().id}).toArray();$("[data-behavior=get-notifications]").on("click",function(){$.ajax({type:"PUT",url:"/update_viewed_notifications",data:{notifications:t},success:function(){$("[data-behavior=notification-badge]").fadeOut(250)}})})}})},e.getNotifications=function(){var t=$("[data-behavior=notifications-menu]");$.ajax({url:"/get_notifications",type:"GET",success:function(n){t.children().replaceWith(n),new e.updateViewed}})}}),ns("Inkshares",function(e){e.Orders=function(e){this.initializeProducts(),this.observeBulkQuantity(e)},e.initializeProducts=function(){var e=$("[data-product-select]");e.on("click",function(){var t=$("[data-product-target="+$(this).data().productSelect+"]");$("[data-product-target]").removeClass("active"),t.addClass("active"),e.removeClass("active"),$(this).addClass("active")})},e.observeBulkQuantity=function(e){function t(e){return $(e).closest("[data-behavior=product]")}function n(t){var n={};n.container=$(t),n.quantity=1;var r=n.container.find("[data-behavior=bulk-quantity]");return r.length>0&&(n.quantity=parseInt(r.val())),n.bulkMin=parseInt(n.container.data().bulkMin)||0,n.unitCost=parseFloat(n.container.data().unitCost),n.bulkListPrice=parseFloat(n.container.data().bulkListPrice),n.listPrice=parseFloat(n.container.data().listPrice),n.credits=e,n.quantity<n.bulkMin?n.amountToCharge=parseFloat(n.listPrice):n.amountToCharge=parseFloat(n.unitCost),n.totalAmount=parseFloat(n.quantity*n.amountToCharge),n.bulklistAmount=parseFloat(n.quantity*parseFloat(n.bulkListPrice)),n.amountAfterCredit=Math.max.apply(Math,[parseFloat(n.totalAmount-n.credits),0]),n.fullPrice=n.quantity*n.listPrice,n.discount=parseInt((n.fullPrice-n.amountAfterCredit)/n.fullPrice*100),n}function r(e){Inkshares.Utility.isNumber(e.quantity)&&Inkshares.Utility.isNumber(e.unitCost)&&($("[data-behavior=discounted-amount]",e.container).length&&$("[data-behavior=discounted-amount]",e.container).text("$"+e.amountAfterCredit.toFixed(2)),$("[data-behavior=list]",e.container).length&&e.quantity>1&&$("[data-behavior=list]",e.container).text("$"+e.bulklistAmount.toFixed(2)),$("[data-behavior=amount]",e.container).text("$"+e.totalAmount.toFixed(2)),e.discount>0?$("[data-behavior=savings]",e.container).text("( save "+e.discount+"% )"):$("[data-behavior=savings]",e.container).text(""))}function i(e){var i=parseFloat(Inkshares.Utility.scrubNumber($(e).val())),o=parseInt($(e).attr("min"))||0,a=parseInt($(e).attr("max"))||9999,s=($(e).closest("[data-behavior=product]"),function(){$("[data-bulk-order-text]").fadeOut(),$("[data-min-order-text]").fadeOut(),$("[data-max-order-text]").fadeOut()});if(i<o||!Inkshares.Utility.isNumber(i))s(),$("[data-min-order-text]").fadeIn(),$("[data-behavior=bulk-order]").addClass("disabled");else if(i<=a&&i>=o){s(),$("[data-behavior=bulk-order]").removeClass("disabled"),r(n(t(e)))}else i>a&&(s(),$("[data-max-order-text]").fadeIn(),$("[data-behavior=bulk-order]").addClass("disabled"))}$(function(){$("[data-behavior=product]").each(function(){r(n(this))})}),$("[data-behavior=bulk-quantity]").on("change keyup blur",function(){i(this)}),$("[data-behavior=bulk-order]").click(function(e){e.preventDefault();var n=t(this),r=$("[data-behavior=amount]:first",n).text();r.indexOf("$")>-1&&(r=r.substring(r.indexOf("$")+1,r.length));var i=$("[data-behavior=bulk-quantity]",n).val(),o=$(this).attr("href").substring(0,$(this).attr("href").indexOf("?")),a=Inkshares.Utility.parseParams($(this).attr("href"));a.amount=r,a.quantity=i,a.product=$(this).attr("data-product"),a.referral_code=$(this).attr("data-referral-code");var s=$.map(a,function(e,t){if(e!=undefined)return"&"+t+"="+encodeURIComponent(e.trim())});return window.location.assign(o+"?"+s.join("").substr(1)),!1})}}),ns("Inkshares.PaymentForm",function(e){e.clearValidationErrors=function(){$("[data-behavior=validation-container]").remove(), 275$("[data-behavior=financial-problem]").empty(),$(".form-group").removeClass("has-error")}
275,e.insertValidationError=function(e,t,n){var r=$("#"+e).closest(".form-group");n=n||"col-sm-4";r.toggleClass("has-error"),r.append("<div class='"+n+"' data-behavior='validation-container'><span class='error_explanation'>"+t+"</span></div>")},e.notifyFinancialProblem=function(e){$("[data-behavior=financial-problem]").text(e)},e.purgeForm=function(e,t){for(i=0;i<t.length;i++)e.find(t[i]).val("")},e.addFormInput=function(e,t,n){$("<input>").attr({type:"hidden",value:n,name:t}).appendTo(e)},e.handleError=function(e){e.error.message?Inkshares.PaymentForm.notifyFinancialProblem("Oops: "+e.error.message+". Try again?"):Inkshares.PaymentForm.notifyFinancialProblem("Looks like our system had a bit of a hiccup (we've been notified). Try again?"),this.storeError(e)},e.storeError=function(e){$.ajax({type:"post",url:"/payment_errors",data:{error:JSON.stringify(e)}})}}),ns("Inkshares",function(e){e.PressMention=function(){this.initializeTypeahead()},e.PressMention.prototype.initializeTypeahead=function(){var e={minlength:0,name:"press-project-search",remote:"/search/typeahead_projects?q=%QUERY&field=id",valueKey:"name",cache:!0,template:"<div class='search-bar-result row' data-slug={{slug}}> <div class='col-xs-10 name'><i>{{name}}</i></div> </div>",engine:Hogan};$("[data-press=project-search]").typeahead(e).bind("typeahead:selected",function(e,t){$("#press_mention_project_id").val(t.id)})}}),ns("Inkshares",function(e){e.ProductionSchedule=function(){$("[data-behavior=submit-on-change]").on("click",function(){$(this).parents("form").submit()})}}),ns("Inkshares",function(e){e.Project=function(e){this._observeCustomAmount(),this._observeWritingSampleLink(),this._observeWritingSampleContainer(),this._observeSectionChange(e),new Inkshares.Likes,new Inkshares.Comments,new Inkshares.Affix({fixedTopMenu:!1}),Inkshares.Accolades.initialize(),Inkshares.Recommendations.initialize(),Inkshares.Follows.initialize()},e.Project.prototype._observeSectionChange=function(e){function t(e,t,n){$("[data-behavior=load-section]").removeClass("active");var r=$("[data-behavior=section-target]");r.animate({opacity:.05},100),e.addClass("active"),n||$("body").animate({scrollTop:r.offset().top-50}),$.ajax({url:e.attr("href"),data:{editing:t},context:r}).done(function(e){$(r).html($(e)).animate({opacity:1},250)}).fail(function(){r.html("There was an error retrieving this page. Contact [email protected] if problem persists. ").animate({opacity:1},250)})}t($("[data-behavior=load-section]").first(),e,!0),$("[data-behavior=load-section]").on("click",function(n){n.preventDefault(),t($(this),e,!1)})},e.Project.prototype.getProductDetails=function(){$("[data-behavior=edit-product-details]").on("click",function(e){e.preventDefault();var t=$(this),n=$("[data-product=edit-modal]");n.modal("show"),$.ajax({url:t.attr("href"),context:n}).done(function(e){$(n).find("[data-product=modal-body]").html(e)})}),$("[data-product=edit-modal].modal").on("hide.bs.modal",function(){$("[data-product=modal-body]").html("Loading...")})},e.Project.prototype._observeCustomAmount=function(){$("[data-behavior=custom-amount]").on("click",function(e){e.preventDefault(),e.stopPropagation();var t=$("#custom-order-input").val();if(t.length>0&&Inkshares.Utility.isNumber(t)){var n=$(this).attr("data-referral-code"),r=$(this).attr("href").substring(0,$(this).attr("href").indexOf("?"));return window.location.assign(r+"?amount="+t+"&referral_code="+n),!1}$("#custom-order-input").addClass("input-error")})},e.Project.prototype._observeWritingSampleLink=function(){$("[data-behavior=writing-sample-link]").on("click",function(e){e.preventDefault();var t=$(this).attr("href");return Inkshares.Editable.autosave(),window.location.assign(t+"/edit/#writing-samples"),!1})},e.Project.prototype._observeWritingSampleContainer=function(){$("[data-behavior=writing-sample-container]").on("click",function(e){e.preventDefault();var t=$(this).attr("href");return window.location.assign(t+"/#writing-samples"),!1})}}),ns("Inkshares.Properties",function(e){e.initializeShow=function(){$("[data-behavior=update-property]").click(function(e){e.preventDefault();var t=$(this).closest("[data-behavior=property]"),n=(t.attr("data-property"),$("input[data-behavior=property-status]",t).val()),r=$("input[data-behavior=property-amount]",t).val(),i=$(this).attr("href"),o=$(this);$.ajax({type:"PATCH",url:i,data:{status:n,amount:r},dataType:"html",success:function(){o.text("saved")}})})},e.initializeSearch=function(){$("body").on("loaded.bs.select",function(){$(".selectpicker").selectpicker({iconBase:"fa",tickIcon:"fa-check"}),$(".selectpicker").selectpicker("refresh")}),$("[data-property-id]").on("click",function(e){e.preventDefault()})}}),ns("Inkshares.PropertyDigest",function(e){e.initialize=function(){this.initializeDigestButtons()},e.selectRecommendationNamesFromModal=function(e){var t=e,n=$('[data-status="ready_for_digest"]').children();
275return $(n).each(function(){var e=$(this).find("table tbody tr td").last().find("p a").text();t.push(e)}),t},e.createNamesString=function(e){var t=e,n="";for(i in t)n+=""===n?t[i]:", "+t[i];return n},e.updateDigestRecommendations=function(e,t){var n=$(".property-recommendations-table").find("tbody tr");$(n).each(function(){var n=$(this).find("td div a").text();if((n+=" ")==e){var r=$(this).find('[data-recommendations="here"]');$(r).text(t)}})},e.moveSubscriptionToBottom=function(e){var t=$(".property-recommendations-table").find("tbody tr");$(t).each(function(){if($(this).find("td div a").text()==e){var t=$(this).parent().children().last();$(this).insertAfter(t),$(this).find('[data-last-emailed=""]').text("just emailed")}})},e.initializeDigestButtons=function(){$("[data-digest-preview]").on("click",function(t){t.preventDefault();var n=$("[data-digest=preview-modal]"),r=$(this);n.modal("show"),$.ajax({url:r.attr("href"),context:n,data:{property_recommendation:{user_slug:r.data().digestPreview}}}).done(function(t){$(n).find("[data-digest=modal-body]").html(t);var r=$(n).find("[data-digest-send]");e.initializeSendButton(r)})}),$("[data-digest-edit]").on("click",function(t){t.preventDefault();var n=$("[data-digest=edit-modal]"),r=$(this);n.modal("show"),$.ajax({url:r.attr("href"),context:n,data:{property_recommendation:{user_slug:r.data().digestEdit}}}).done(function(t){$(n).find("[data-digest=modal-body]").html(t),e.initializeEditBehavior()})}),$("[data-digest-send]").each(function(){e.initializeSendButton(this)}),$(function(){$("[data-digest].modal").on("hide.bs.modal",function(){$("[data-digest=modal-body]").html("Loading...")})})},e.initializeSendButton=function(t){$(t).on("click",function(t){t.preventDefault();var n=$(this);$.ajax({url:n.attr("href"),context:n,data:{property_recommendation:{user_slug:n.data().digestSend}}}).done(function(){$("[data-digest-send="+n.data().digestSend+"]").text("sent!").addClass("disabled"),$("[data-digest=preview-modal]").modal("hide");var t=$(n).data().digestSendName;e.moveSubscriptionToBottom(t)})})},e.initializeEditBehavior=function(){e.initializeAddRecommendation($(""));var t=$("[data-digest=edit-modal]");t.find("[data-status]").sortable({start:function(e,t){t.item,t.item.parent()},stop:function(){var n=t.find("[data-behavior=submit]"),r={};$.map($("[data-status]"),function(e){var t=$(e).data().status,n=$(e).find("[data-property-id]"),i=$.map(n,function(e){return $(e).data().propertyId});r[t]=i}),$.ajax({url:n.attr("href"),type:"PATCH",data:{property_recommendation:{user_slug:n.data().userSlug,recommendation_lists:r}}}).done(function(){var t=$('[data-author="here"]').text(),n=[];names=e.selectRecommendationNamesFromModal(n);var r=e.createNamesString(names);e.updateDigestRecommendations(t,r)})},change:function(e,t){t.sender&&t.placeholder.parent().parent()},connectWith:"[data-status]"}).disableSelection()},e.initializeAddRecommendation=function(){function t(t){var n=$("[data-behavior=add-recommendation]");$.ajax({url:n.attr("href"),type:"POST",data:{property_recommendation:{user_slug:n.data().id,project_id:t}}}).done(function(t){$("[data-status=ready_for_digest]").append(t);var n=$('[data-author="here"]').text(),r=[];names=e.selectRecommendationNamesFromModal(r);var i=e.createNamesString(names);e.updateDigestRecommendations(n,i)}).fail(function(){$("[data-status=ready_for_digest]").prepend("error retrieving project")})}var n={minlength:0,name:"recommendation-project-search",remote:"/search/typeahead_projects?q=%QUERY&field=id",valueKey:"name",cache:!0,template:"<div class='search-bar-result row' data-slug={{slug}}> <div class='col-xs-10 name'><i>{{name}}</i></div> </div>",engine:Hogan};$("[data-press=project-search]").typeahead(n).bind("typeahead:selected",function(e,n){t(n.id)})}}),ns("Inkshares.PropertySubscription",function(e){e.initializePropertiesSignup=function(){$(function(){function t(t){e.clearStatusBoxes();var n=3-t.find("[data-comp]").length,r=t.parents("[data-behavior=signup-step]").first();if(r.find("input").select(),n<1){var i=$("[data-behavior=signup-step]"),o=i.index(r),a=i.eq(o+1);e.showStep(a),a.find("input").select(),$("body").animate({scrollTop:a.offset().top-300},500)}
275else r.find("[data-behavior=step-status]").html("Add "+n+" more").addClass("helper")}function n(e){var t=$(e).find("[data-behavior=signup-step]"),n=$("<div>").addClass("status-box").attr({"data-behavior":"step-status"});t.each(function(e,t){$(t).find("[data-behavior=step-status]").length<1&&$(t).find("input").last().after(n.clone())})}function r(e){var t=a.eq(a.index(e)+1).find("input");t&&t.focus().select()}function i(){return a.each(function(t,n){e.showStep($(n));var r=$(n).find("input, select");return!(r.length>0)||($(n).find("[data-comp]").length>1||("INPUT"==$(r).prop("tagName")&&$(r).val().length<1?($(r).focus(),!1):"SELECT"==$(r).prop("tagName")&&$(r).prop("title").length<1?($(r).focus(),!1):void 0))}),!0}var o=$("[data-behavior=properties-signup]"),a=o.find("[data-behavior=signup-step]"),s=o.find("[data-behavior=signup-step] input, [data-behavior=signup-step] select");s.on("focus",function(){var e=this;e.currentStep=$(this).parent("[data-behavior=signup-step]"),$(this).on("keydown",function(t){13==t.keyCode&&(!0!==$(this).data().wait?r(e.currentStep):t.preventDefault())})}),s.on("keydown change",function(){if(!0!==$(this).data().wait){var t=$(this).parents("[data-behavior=signup-step]");e.showNext(t)}}),$(".ui-autocomplete-input").on("autocomplete:selected",function(){var t=$(this).parents("[data-behavior=signup-step]");e.showNext(t,0),r(t)}),i(),n(o.find("form")),$("#intro-modal").modal("show"),$("[data-signup=submit-unfocus] input").on("focusin",function(){$(this).one("focusout",function(){var t=$(this).parents("form").first();$.ajax({type:"POST",url:t.attr("action"),data:t.serialize(),success:function(){e.clearStatusBoxes();var n=t.data().behavior;"create-user"==n?e.getAsyncForms():"signup-async"==n&&initializeStoryTags()},error:function(t){e.clearStatusBoxes(),t.responseJSON&&$.each(t.responseJSON,function(t,n){console.log(t);var r=$('[data-behavior=signup-step] [name="user['+t+']"]');r.length>0&&e.getStatusEl(r).addClass("error").html(n)})}})})}),$("[data-behavior~=comp-finder]").on("typeahead:selected",function(e,n){var r=$(this).parents("form").first(),i=$("[data-comp-container="+n.comp_type+"]");r&&$.ajax({method:"POST",url:r.attr("action"),data:{comp:n},context:i,success:function(e){i.prepend(e),t(i)},error:function(){}})})})},e.initStoryTagSection=function(){var t=$("[data-behavior=associate-story-tag]").parents("[data-behavior=signup-step]"),n=t.find('[data-behavior=associate-story-tag][data-st-state="DELETE"]');e.updateItemsLeft(t,n,0),$("[data-behavior=associate-story-tag]").on("click",function(){var t=$(this).parents("[data-behavior=signup-step]"),n=t.find('[data-behavior=associate-story-tag][data-st-state="DELETE"]'),r="DELETE"==$(this).data().stState?-1:1;e.updateItemsLeft(t,n,r)})},e.updateFollowSection=function(){function t(){var e=n.parents("[data-behavior=signup-step]").find("[data-behavior=follow-container]"),t=$(n).val();if(t.length<1)e.fadeIn(250);else{var r=[],i=[];e.each(function(e,n){Inkshares.Utility.fuzzyMatch($(n).text(),t)?i.push(n):r.push(n)}),$.each(r,function(e,t){$(t).fadeOut(250)}),$.each(i,function(e,t){$(t).fadeIn(250)})}}var n=$("input[data-behavior=genre-search]").first();t();var r=$("[data-behavior=follow-container]").parents("[data-behavior=signup-step]"),i=r.find('[data-behavior=follow][data-method="DELETE"]');e.updateItemsLeft(r,i,0),$("[data-behavior=follow]").on("click",function(){var t=$(this).parents("[data-behavior=signup-step]"),n=t.find('[data-behavior=follow][data-method="DELETE"]'),r="DELETE"==$(this).data().method?-1:1;e.updateItemsLeft(t,n,r)}),$("input[data-behavior=genre-search]").on("keyup",function(){t()})},e.updateItemsLeft=function(t,n,r){var i=3-n.length-r;i<1?(e.clearStatusBoxes(),e.showNext(t)):t.find("[data-behavior=step-status]").html("Select "+i+" more").addClass("helper")},e.getStatusEl=function(e){return $(e).parents("[data-behavior=signup-step]").find("[data-behavior=step-status]")},e.clearStatusBoxes=function(){$("[data-behavior=step-status]").each(function(e,t){$(t).html("")})},e.showStep=function(e){e.animate({opacity:"1"},500)}
275,e.showNext=function(t,n){if(n==undefined)n=1e3;var r=$("[data-behavior=signup-step]"),i=r.index(t),o=r.eq(i+1);setTimeout(function(){e.showStep(o)},n)},e.getAsyncForms=function(){$("[data-behavior=signup-async]").each(function(){var e=$(this),t=e.data().url;t&&$.ajax({url:t,context:e,success:function(t){e.children().length<1&&(e.html(t),e.children("[data-behavior=signup-step]").animate({opacity:1},500))}})})},e.wirePreferences=function(){$("[data-behavior=save-preferences]").click(function(e){e.preventDefault(),$(this).attr("value","Thinking..."),$(this).text("Thinking..."),$(this).attr("disabled",!0);var t=[];$("[data-behavior=comp]").each(function(){t.push($(this).attr("data-comp"))}),$("input[data-behavior=comp-list]").val(t.join()),$("form[data-behavior=preferences-form]").submit()})},e.observeCustomReferralCode=function(){var e=null,t=$("form[data-behavior=referral-code-form]");$("#user_referral_code").on("keydown",function(){$(this);null!=e&&clearTimeout(e),n()});var n=function(){e=setTimeout(function(){$.ajax({url:t.attr("action"),method:t.attr("method"),data:t.serialize(),format:"html",success:function(e){$(".referral-code-status").addClass("hidden"),$(".referral-code-status.success-status").removeClass("hidden"),$("[data-behavior=share-container]").html(e)},error:function(){$(".referral-code-status").addClass("hidden"),$(".referral-code-status.taken-status").removeClass("hidden")}})},750)}}}),ns("Inkshares",function(e){e.Prospects=function(e,t,n,r,i,o){this.pageUrl=t,this.projectSlug=n,this.interrupt=!1,this._loadTable(1,"total"),this._observeEdit(),this._observeCancel(),this._observeAddProspect(e),this._observeSave(),this._observeDelete(),this._observeContact(),this.backerTemplate=Inkshares.Prospects.compileMessageTemplate(Inkshares.Prospects.cleanse(r)),this._observeSubNavFilters(),this.chapterTemplate=Inkshares.Prospects.compileMessageTemplate(Inkshares.Prospects.cleanse(i)),this.thanksTemplate=Inkshares.Prospects.compileMessageTemplate(Inkshares.Prospects.cleanse(o)),new Inkshares.Linkedin(r)},e.Prospects.compileMessageTemplate=function(e){return Hogan.compile(e)},e.Prospects.collectMessageAttributes=function(e){return{prospect_id:e.attr("data-prospect-id"),prospect_first_name:e.attr("data-prospect-first-name"),prospect_full_name:e.attr("data-prospect-full-name"),project_type:e.attr("data-project-type"),project_name:e.attr("data-project-name").toUpperCase(),project_slug:e.attr("data-project-slug"),book_segment_slug:e.attr("data-book-segment-slug"),project_link:e.attr("data-link"),referral_code:e.attr("data-referral-code"),source_id:e.attr("data-source-id"),author_name:e.attr("data-author-name")}},e.Prospects.cleanse=function(e){return e.replace(/\'/g,"'").replace(/\"/g,'"')},e.Prospects.prototype._loadTable=function(e,t){if(this.interrupt)this.interrupt=!1;else{var n=this,r=$("tbody","[data-behavior=prospects-table]");$.ajax({type:"GET",url:n.pageUrl,data:{page:e,who:t},dataType:"json",success:function(i){i.count>0?($.each(i.rows,function(e,t){r.append(t)}),n._loadTable(e+1,t)):"total"===t?n._loadTable(1,"prospects"):(Inkshares.Utility.tableSorter($("table[data-behavior=prospects-table]")),n._observePopover())}})}},e.Prospects.prototype._observePopover=function(){$("[data-toggle=popover]").popover()},e.Prospects.prototype._observeSubNavFilters=function(){var e=this;$("[data-behavior=subnav-filter]").click(function(t){t.preventDefault(),$("[data-behavior=subnav-filter]").parent("li").removeClass("active"),$(this).parent("li").addClass("active"),this.interrupt=!0,tableBody=$("tbody","[data-behavior=prospects-table]"),tableBody.empty(),this.interrupt=!1,e._loadTable(1,$(this).attr("data-who"))})},e.Prospects.prototype._observeContact=function(){var e=this;$("body").on("click","[data-behavior~=contact-prospect]",function(t){t.preventDefault();var n=$(this),r=n.attr("data-template"),i=n.attr("data-source");e._setFormContext(n),e._createInput("last_contacted_at",Inkshares.Utility.nowInRuby());var o=function(t){var n=Inkshares.Prospects.collectMessageAttributes(t),i="";
275"outreach"==r?i=e.backerTemplate.render(n):"chapter"==r?i=e.chapterTemplate.render(n):"thank"==r&&(i=e.thanksTemplate.render(n)),window.location.assign(t.attr("href")+"&body="+encodeURIComponent(i))};e._save(function(){"facebook"!=i&&"linkedin"!=i&&o(n)})})},e.Prospects.prototype._observeAddProspect=function(e){$("[data-behavior=add-prospect]").click(function(t){t.preventDefault();var n=$(e).prependTo("[data-behavior=prospects-table] > tbody");n.attr("data-saved",!1),n.find("[data-behavior=edit-prospect]").trigger("click")})},e.Prospects.prototype._observeEdit=function(){var e=this;$("body").on("click","[data-behavior=edit-prospect]",function(t){t.preventDefault();var n=$(this).closest("tr");e._toggleHidden(n),$("[data-behavior=editable]",n).each(function(){$(this).html('<input type="text" value="'+$(this).text().trim()+'" />')}),$(n).find("input:first").focus()})},e.Prospects.prototype._observeCancel=function(){var e=this;$("body").on("click","[data-behavior=cancel-edit-prospect]",function(t){t.preventDefault();var n=$(this).closest("tr");"false"===n.attr("data-saved")?n.remove():(e._toggleHidden(n),$("input",n).each(function(){$(this).closest("div").html($(this).val())}))})},e.Prospects.prototype._observeSave=function(){var e=this;$("body").on("click","[data-behavior=save-prospect]",function(t){t.preventDefault(),e._setFormContext($(this)),e._save()})},e.Prospects.prototype._observeDelete=function(){var e=this;$("body").on("click","[data-behavior=delete-prospect]",function(t){t.preventDefault(),e._setFormContext($(this)),$.ajax({type:"DELETE",url:e.prospectAction,dataType:"html",success:function(){e.container.fadeOut(300,function(){e.container.remove()}),e._resetForm()}})})},e.Prospects.prototype._setFormContext=function(e){this.container=e.closest("tr"),this.prospectId=this.container.find("[data-field=id]").attr("data-value"),this.prospectForm=$("[data-behavior=prospect-form]"),this.prospectAction=this.prospectForm.attr("action"),this.prospectMethod="POST",this.prospectId&&(this.prospectAction=this.prospectAction+"/"+this.prospectId,this.prospectMethod="PUT"),this._mineInput(this.container,"name"),this._mineInput(this.container,"email"),this._mineInput(this.container,"website"),this._mineInput(this.container,"group"),"thank"===e.attr("data-template")?$("input[data-behavior=thanked]").val("true"):$("input[data-behavior=thanked]").val("false")},e.Prospects.prototype._resetForm=function(){this.prospectForm.trigger("reset"),$("input:not([data-behavior=thanked])",this.prospectForm).remove()},e.Prospects.prototype._mineInput=function(e,t){var n=e.find("[data-field="+t+"] > input").val()||e.find("td[data-field="+t+"]").text().trim();n&&n.length>0&&this._createInput(t,n)},e.Prospects.prototype._createInput=function(e,t){$("<input>").attr({type:"hidden",name:"prospect["+e+"]",value:t}).appendTo(this.prospectForm)},e.Prospects.prototype._save=function(e){var t=this;$.ajax({type:t.prospectMethod,url:t.prospectAction,data:t.prospectForm.serialize(),dataType:"json",success:function(n){if(n.existing){var r=$("tr:has(>[data-value='"+n.id+"'])"),i=!1;$("html, body").animate({scrollTop:r.position().top-250},500,function(){i||(r.effect("highlight",{},1500),i=!0)}),t.container.remove()}else t.container.replaceWith(n.html);e&&e()},complete:function(){t._resetForm()}})},e.Prospects.prototype._toggleHidden=function(e){e.find("[data-behavior=prospect-action]").toggleClass("hidden")}}),ns("Inkshares.Questions",function(e){e.initialize=function(e){if(e==undefined)e={};Inkshares.Utility.charCounter(),Inkshares.Editable.observePhoto(),Inkshares.Utility.autocomplete(),this.offset=300,this._observeNumberInput(),this._observeSave(),this.initializeSignup()},e.initializeSignup=function(){function e(){return $(".progress-step.active").index()}function t(e){if(e>-1){var t=$("[data-launch='question-container']"),r=$("[data-launch=question]").eq(e),i={position:e,currentScrollPosition:t.scrollLeft(),questionOffset:r.offset().left};t.animate({scrollLeft:i.currentScrollPosition+i.questionOffset},function(){n(r),r.find("input, textarea").first().focus()}),$("body").animate({scrollTop:"0px"})}}function n(e){var t=$(".launch-progress .progress-step").length-1,n=$("[data-launch=question]").index(e);$(".launch-progress .progress-step").removeClass("active"),$(".launch-progress .progress-step").eq(n).addClass("active"),$("[data-launch=next], [data-launch=previous]").addClass("active"),0==n&&$("[data-launch=previous]").removeClass("active"),t==n&&$("[data-launch=next]").removeClass("active")}var r=$("[data-launch=question]");r.length<2&&$(".launch-nav").addClass("hidden"),jQuery.each(r,function(){$("<a>").addClass("progress-step").html('<i class="fa fa-circle"></i>').appendTo(".launch-progress")}),$(".progress-step").on("click",function(){t($(".progress-step").index(this))}),t(0),$(document).on("keydown",function(n){if(13==n.keyCode)return t(e()+1);if(9==n.keyCode){var r=$(document.activeElement),i=r.parents("[data-launch=question]").find("input, textarea"),o=i.index(r);if(n.shiftKey&&0==o)return n.preventDefault(),t(e()-1);if(i.length-1==o)return n.preventDefault(),t(e()+1)}}),$("[data-launch=next]").on("click",function(){t(e()+1)}),$("[data-launch=previous]").on("click",function(){t(e()-1)}),$("[data-launch=question] input").on("focus",function(){var n=$(this).parents("[data-launch=question]"),r=$("[data-launch=question]").index(n);e()!=r&&t(r)})},e._focus=function(e,t,n){if(n===undefined||!0===n){t=t||"down";n&&"up"===t?e.find("input, textarea").last().focus():e.find("input, textarea").first().focus()}},e._focusOnNext=function(e,t){var n=this,r=(t=t||"down",e.closest("[data-behavior=question]")),i="down"==t?r.next("[data-behavior=question]"):r.prev("[data-behavior=question]");if(0==i.length&&(r=e.closest(".group"),i="down"==t?r.next(".group"):r.prev(".group")),i.offset){var o=!1;$("body,html").animate({scrollTop:i.offset().top-n.offset},500,function(){o||(n._focus(i,t),o=!0)})}},e._observeQuestionFocus=function(){$("[data-behavior=question]").find("input,textarea").on("focus",function(){$("[data-question=container] .question-helper
275-text");$(this).parents("[data-question=container]").find(".question-helper-text").animate({opacity:1},300)})},e._observeQuestionClick=function(){var e=this;$("[data-behavior=question]").click(function(){e._focus($(this))}),$(".transition").click(function(t){return t.preventDefault(),e._focusOnNext($(this)),!1})},e._observeMouseOver=function(){var e=this;$("[data-behavior=question]").on("mouseover",function(){e._highlight($(this))})},e._observeQuestionAnswered=function(){var e=this;$("[data-behavior=question]").find("input,textarea").on("keydown",function(t){var n=$(this).closest("[data-behavior=question]");if(n&&"true"!==n.attr("data-last")){var r=t.which||t.keyCode;(13==r&&$(this).is("input")||9==r)&&(t.preventDefault(),t.shiftKey?e._focusOnNext($(this),"up"):e._focusOnNext($(this),"down"))}})},e._observeNumberInput=function(){$("[data-input-behavior=number]").on("keyup",function(){$(this).val(Inkshares.Utility.scrubNumber($(this).val()))})},e._observeScroll=function(){var e=this;$("[data-behavior=question]").waypoint(function(t){"down"==t&&e._highlight($(this))},{offset:e.offset}),$("[data-behavior=question]").waypoint(function(t){"up"==t&&e._highlight($(this))},{offset:e.offset/2})},e._highlight=function(e){$("[data-behavior=question]").removeClass("spotlight").addClass("obscure"),e.removeClass("obscure").addClass("spotlight"),$("[data-behavior=move-on]").not(e).addClass("hidden",function(){e.find("[data-behavior=move-on]").removeClass("hidden")})},e._observeSave=function(){$("[data-behavior=save-data]").click(function(e){e.preventDefault(),$(this).attr("value","Thinking..."),$(this).text("Thinking..."),$(this).attr("disabled",!0);var t=$("[data-launch=signup-form]");t.length>0&&t.submit(),$(this).closest("form").submit()})}}),ns("Inkshares.Readers",function(e){e.observeSimilarBooks=function(){$("body").on("click","[data-behavior=similar-book]",function(e){e.preventDefault(),Inkshares.Readers.saveSelection(null,$(this).data()),$(this).attr("disabled","true")})},e.observeGenreSelection=function(){$("[data-behavior=genre]").click(function(){$(this).toggleClass("chosen"),$(this).attr("data-selected",$(this).hasClass("chosen"));var e=$(this).attr("data-genre");$.ajax({type:"GET",url:"/readers/show_shelf?genre="+e,dataType:"html",success:function(e){$(e).hide().prependTo($("[data-behavior=shelves]")).fadeIn("slow")}})})},e.saveSelection=function(e,t){Inkshares.InfluentialBooks.toggleMotion(!1),Inkshares.InfluentialBooks.toggleNoResults(!1);var n=$("[data-behavior=book-selections]"),r=parseInt(n.attr("data-selected")),i=$("[data-behavior=book-finder]"),o=parseInt(i.attr("data-required-selections")),a=Hogan.compile(" <div class='selection'> <img class='book-cover' src='{{image_url}}'> <input data-book-field='id' id='user_influential_books_attributes_{{sequence}}_id' name='user[influential_books_attributes][{{sequence}}][id]' type='hidden' value='{{id}}'> <input data-book-field='title' id='user_influential_books_attributes_{{sequence}}_title' name='user[influential_books_attributes][{{sequence}}][title]' type='hidden' value='{{title}}'> <input data-book-field='external_id' id='user_influential_books_attributes_{{sequence}}_external_id' name='user[influential_books_attributes][{{sequence}}][external_id]' type='hidden' value='{{external_id}}'> <input data-book-field='external_id' id='user_influential_books_attributes_{{sequence}}_isbn' name='user[influential_books_attributes][{{sequence}}][isbn]' type='hidden' value='{{isbn}}'> <input data-book-field='author' id='user_influential_books_attributes_{{sequence}}_author' name='user[influential_books_attributes][{{sequence}}][author]' type='hidden' value='{{author}}'> <input data-book-field='image_url' id='user_influential_books_attributes_{{sequence}}_book_image_url' name='user[influential_books_attributes][{{sequence}}][book_image_url]' type='hidden' value='{{image_url}}'> <input data-book-field='genres' id='user_influential_books_attributes_{{sequence}}_genres' name='user[influential_books_attributes][{{sequence}}][genres]' type='hidden' value='{{genres}}'> <input data-book-field='description' id='user_influential_books_attributes_{{sequence}}_description' name='user[influential_books_attributes][{{sequence}}][description]' type='hidden' value='{{description}}'> </div> ");$("[data-sequence="+r+"]",n).replaceWith(a.render($.extend(t,{sequence:r}))),n.attr("data-selected",(r+1).toString()),o==r+1?(i.attr("placeholder","thanks!"),$("[data-behavior=save-data]").removeAttr("disabled"),i.val("thanks!"),i.attr("disabled","true")):1==o-(r+1)?i.attr("placeholder","one more..."):i.attr("placeholder","add another book..."),i.val("")},e.loadSimilarBooks=function(e){var t=Hogan.compile(" <div class='similar-book' data-behavior='similar-book' data-id='{{external_id}}' data-external_id={{external_id}} data-title='{{title}}' data-isbn='{{isbn}}' data-author='{{author}}' data-image_url='{{image_url}}' data-genres='{{genres}}' data-description='{{description}}'> <img class='book-cover' src='{{image_url}}'> </div> "),n=$("[data-behavior=similar-books]");n.empty(),$.ajax({type:"GET",url:"/influential_books/"+e,dataType:"json",success:function(e){for(i=0;i<e.length;i++)n.append(t.render(e[i]))}})}}),ns("Inkshares.Recommendations",function(e){e.initialize=function(){this.openPopover(),this.intializeRecommendation()}
275,e.openPopover=function(){$("body").on("click","[data-recommend-popover=true]",function(e){e.preventDefault(),e.stopPropagation();var t=$(this).find("[data-behavior=recommend-container]"),n=$(this).find("[data-recommend-target=true]");0==n.next(".popover:visible").length&&(n.popover({html:"true",viewport:".container",placement:"top",content:function(){return t[0]}}),n.popover("show"))})},e.intializeRecommendation=function(){$("body").on("click","[data-behavior=recommend-send]",function(){var e=$(this).parents("[data-behavior=recommend-container]"),t=$("[data-behavior=recommend-container]").find("[data-recipient]").map(function(){return $(this).data().recipient}).toArray(),n=e.find("[data-behavior=recommend-body]");n.val().length>0?$.ajax({url:$(this).attr("data-recommend-url"),type:"POST",dataType:"html",data:{recommendation:{body:n.val(),recipients:t}},success:function(t){e.children().css({opacity:0}),e.append(t)}}):n.attr("placeholder","Recommendation can't be blank!")}),$("body").on("click","[data-behavior=recommend-cancel]",function(e){e.stopPropagation(),$("[data-recommend-target=true]").popover("hide")})}}),ns("Inkshares.Royalties",function(e){e.initialize=function(){this.initializeDetailButton()},e.initializeDetailButton=function(){$("[data-royalty-details]").on("click",function(e){e.preventDefault();var t=$("[data-royalties=detail-modal]"),n=$(this);t.modal("show"),$.ajax({url:n.attr("href"),context:t,data:{royalty_statement_id:n.data().royaltyDetails}}).done(function(e){$(t).find("[data-royalties=modal-body]").append(e)}).fail(function(){$(t).find("[data-royalties=modal-body]").html("Something went wrong. If problem persists send us an email: [email protected]")}).always(function(){$(this).find("[data-spinner]").addClass("hidden")})}),$("[data-behavior=adjustment-details]").on("click",function(e){e.preventDefault();var t=$("[data-adjustments=detail-modal]"),n=$(this);t.modal("show"),$.ajax({url:n.attr("href"),context:t,data:{adjustment_statement_id:n.data().adjustmentDetails}}).done(function(e){$(t).find("[data-adjustments=modal-body]").append(e)}).fail(function(){$(t).find("[data-adjustments=modal-body]").html("Something went wrong. If problem persists send us an email: [email protected]")}).always(function(){$(this).find("[data-spinner]").addClass("hidden")})}),$(function(){$("[data-royalties=detail-modal], [data-adjustments=detail-modal]").on("hidden.bs.modal",function(){$(this).find(".modal-body").html(""),$(this).find("[data-spinner]").removeClass("hidden")})})}}),ns("Inkshares",function(e){e.Search=function(e){this.initializeAlgolia(e)},e.Search.prototype.initializeAlgolia=function(e){function t(t){t==undefined&&(t="project"),$(".ais-search-box").children().unwrap(),"project"==t.toLowerCase()&&Inkshares.Search.prototype.initializeProjectSearch(e),"user"==t.toLowerCase()&&Inkshares.Search.prototype.initializeUserSearch(e),$("[data-search-index]").removeClass("active"),$("[data-search-index="+t+"]").addClass("active"),$("[data-search-view]").fadeOut(),$("[data-search-view="+t+"]").fadeIn()}function n(){return!r.is(":visible")&&1!=e.hide_modal}void 0===e&&(e={});var r=$("#search_modal");$("#search-input").blur(),$("[data-behavior=toggle-search-modal]").on("click",function(){$("#search-input").focus()}),1==e.autoload_modal&&t(e.default_index.toLowerCase()),$("#search-input").on("focus",function(){0==$(".ais-search-box").length&&t(),n()&&r.modal("show")}),$("#main_nav").on("click",function(){$("#search-input").is(":focus")||r.modal("hide")}),$("[data-search-index]").on("click",function(e){e.preventDefault(),t($(this).data().searchIndex)}),$("#projects-pagination, #users-pagination").on("click",function(){$("#search_modal .modal-dialog").scrollTop(0)})},e.Search.prototype.initializeProjectSearch=function(e){ 276function t(e){return document.querySelector("#"+e+"-template").innerHTML}function n(e){return"<h5>"+e+"</h5>"}var r="Project",i=instantsearch({appId:"RF6A4B707K",apiKey:"906d921560ed6bb1c1a8f858af283a1d",indexName:r+"_"+e.env,urlSync:!1});[instantsearch.widgets.searchBox({container:"#search-input",placeholder:"SEARCH"}),instantsearch.widgets.hits({container:"#projects-hits",hitsPerPage:30,transformData:{item:function(e){return e.followers_count=Inkshares.Utility.numberWithCommas(e.followers_count),e}},templates:{item:t(r.toLowerCase()),empty:t("no-results")}}),instantsearch.widgets.menu({container:"#projects-genres",attributeName:"genre",limit:50,templates:{header:n("Genres")}}),instantsearch.widgets.menu({container:"#projects-status",attributeName:"public_status",limit:10,templates:{header:n("Status")}}),instantsearch.widgets.sortBySelector({container:"#projects-sort-by",autoHideContainer:!0,indices:[{name:i.indexName,label:"Most relevant"},{name:r+"_recent_"+e.env,label:"Most recent"},{name:r+"_trending_"+e.env,label:"Trending"}]}),instantsearch.widgets.pagination({container:"#projects-pagination"}
276)].forEach(i.addWidget,i),i.start()},e.Search.prototype.initializeUserSearch=function(e){function t(e){return document.querySelector("#"+e+"-template").innerHTML}var n="User",r=instantsearch({appId:"RF6A4B707K",apiKey:"906d921560ed6bb1c1a8f858af283a1d",indexName:n+"_"+e.env,urlSync:!1});[instantsearch.widgets.searchBox({container:"#search-input",placeholder:"SEARCH"}),instantsearch.widgets.hits({container:"#users-hits",hitsPerPage:30,transformData:{item:function(e){return e.followers_count=Inkshares.Utility.numberWithCommas(e.followers_count),e}},templates:{item:t(n.toLowerCase()),empty:t("no-results")}}),instantsearch.widgets.pagination({container:"#users-pagination"})].forEach(r.addWidget,r),r.start()}}),ns("Inkshares.Segment",function(e){e.identify=function(e){"undefined"!=typeof analytics&&analytics.identify(e)},e.alias=function(e){"undefined"!=typeof analytics&&analytics.alias(e)},e.track=function(e,t){"undefined"!=typeof analytics&&analytics.track(e,t)}}),ns("Inkshares.Sharing",function(e){e.Facebook=function(e){this.appId=e;$.ajaxSetup({cache:!0}),$.getScript("//connect.facebook.net/en_US/all.js",function(){FB.init({appId:e,logging:!0,channelUrl:"https://www.inkshares.com/channel"})}),this.observeShare(),this.observeMessage()},e.Facebook.prototype.observeMessage=function(){$("body").on("click","[data-behavior~=facebook-message]",function(){return FB.ui({method:"send",link:$(this).attr("data-link"),to:$(this).attr("data-source-id"),app_id:this.appId}),!1})},e.Facebook.prototype.observeShare=function(){$("body").on("click","[data-behavior~=facebook-share]",function(){return FB.ui({method:"share",href:$(this).attr("data-link"),app_id:this.appId}),!1})}}),ns("Inkshares.Sharing",function(e){e.Twitter=function(e){this.toggleText=e,this.wireUpShareClick()},e.Twitter.prototype.wireUpShareClick=function(){var e=this;$("body").on("click","[data-behavior=twitter-share]",function(){return e.launchDialog($(this).attr("data-content"),$(this).attr("data-link")),!1})},e.Twitter.prototype.launchDialog=function(e,t){var n=250,r=550,i=screen.width/2-r/2,o=screen.height/2-n/2;options="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+r+", height="+n+", top="+o+", left="+i,newWindow=window.open("https://twitter.com/share?text="+encodeURIComponent(e)+"&url="+encodeURIComponent(t),"Share on Twitter",options),window.focus()&&newWindow.focus(),this.toggleText&&($shareButton=$("[data-behavior=twitter-share]"),$backLink=$("[data-behavior=home-link]"),$backLink.text("Done"),$shareButton.text("Shared!"),$shareButton.attr("disabled",!0))}}),ns("Inkshares",function(e){e.Shelf=function(){this.initializeShelves(),this.initializeOrderModal()},e.Shelf.prototype.initializeShelves=function(){function t(t){n(t),e.Shelf.prototype.initializeOrderModal(),$(t).find("[data-shelf=load]").one("click",function(e){e.preventDefault(),r(t)})}function n(e){var t=i(e);
276$(t).unbind("scroll").on("scroll",function(){var e=$(t)[0].scrollWidth-$(t)[0].clientWidth,n=$(this).scrollLeft();e-n<1500&&n>99&&($(t).find("[data-shelf-scroll=left]").fadeIn(),$(t).find("[data-shelf=load]").click()),n<100&&$(t).find("[data-shelf-scroll=left]").fadeOut()})}function r(e){var n=$(e).find("[data-shelf=load]");n&&$.ajax({url:$(n).attr("href"),context:e}).done(function(e){var n=this;$(n).find(".load-button").fadeOut(250).remove(),i(n).append($(e)),t(n)})}function i(e){return $(e).find("[data-shelf-el=books]").first()}$("[data-shelf-slug]").each(function(){t(this);var e=i(this);$(this).find("[data-shelf-scroll]").on("click",function(t){t.preventDefault(),"left"==$(this).attr("data-shelf-scroll")?$(e).animate({scrollLeft:"-=500"},500):"right"==$(this).attr("data-shelf-scroll")&&$(e).animate({scrollLeft:"+=500"},500)})})},e.Shelf.prototype.initializeOrderModal=function(){$("[data-bookshelf=get-orders]").on("click",function(e){e.preventDefault();var t=$("#user_project_orders").modal("show").on("hidden.bs.modal",function(){$(this).find(".modal-body").html("")});$.ajax({url:$(this).attr("href"),context:t}).done(function(e){$(this).find(".modal-body").html(e)})})}}),ns("Inkshares",function(e){e.Signup=function(){this._wireUpTwitterSignupHandler()},e.Signup.prototype._wireUpTwitterSignupHandler=function(){var e=this;$("[data-behavior=twitter-signup]").click(function(t){t.preventDefault();var n=$("input[data-behavior=twitter-email]"),r=n.val();return r?/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(r)?(e._saveTwitterEmail(r),window.location.assign($(this).attr("href"))):Inkshares.PaymentForm.insertValidationError(n.attr("id"),"Please enter a valid email address.","col-sm-offset-2 col-sm-8"):Inkshares.PaymentForm.insertValidationError(n.attr("id"),"Please enter an email address first.","col-sm-offset-2 col-sm-8"),!1})},e.Signup.prototype._saveTwitterEmail=function(e){$.cookie("inkshares-email",e,{path:"/"})}}),ns("Inkshares.Slider",function(e){e.initialize=function(){refreshCaptions=function(e,t){var n=$(e).parents(".form-group");n.find("[data-behavior=value-caption]").addClass("hidden"),n.find("[data-slide-index="+t+"]").fadeIn(500).removeClass("hidden")};var e=$("[data-behavior=slider]");
276e.each(function(){var e=$(this);$(this).slider({tooltip:"hide",value:e.val()}),refreshCaptions(this,e.val())}),e.on("slide",function(e){e.value!=$(this).val()&&refreshCaptions(this,e.value)})}}),ns("Inkshares",function(e){e.Snippet=function(){this.setSnippets(),this.createSnippet(),this.deleteSnippet(),this.snippetHelperText()},e.Snippet.prototype.snippetHelperText=function(){$("[data-behavior=close-snippet-helper]").on("click",function(){$(".snippet-help-container").remove()})},e.Snippet.prototype.createSnippet=function(){$("[data-behavior~=snippetable]").on("mouseup",function(){var e=rangy.getSelection();if(e.toString().length>0){var t=e.getRangeAt(0).cloneRange(),n=$(t.startContainer).parents("[data-id]"),r=t.nativeRange.getBoundingClientRect().top+$(document).scrollTop();$("body").append($("<div>").css("top",r).addClass("fake-snippet col-sm-4 snippet-container").html("<i class='fa fa-spinner spin'></i> Creating Excerpt")),$.ajax({type:"POST",data:{snippet:{snippet_text:t.toString(),parent_id:n.attr("data-id")}},url:$("[data-behavior=new-snippet-url]").attr("href"),error:function(){$(".fake-snippet").remove(),$("[data-target='#new-session-modal']").first().click()},success:function(e){$(".fake-snippet").remove(),snippet=$(e).appendTo("body"),snippet.css("top",r),Inkshares.Comments.prototype.getNewComment(snippet.find(".commentary")),Inkshares.Snippet.prototype._highlightSnippet(snippet)}})}}.bind(this))},e.Snippet.prototype.deleteSnippet=function(){$("body").on("click","[data-delete-snippet]",function(e){e.preventDefault();var t=$(this),n=$(this).parents(".snippet-container");$.ajax({type:"DELETE",url:t.attr("data-delete-snippet"),success:function(){n.remove(),Inkshares.Snippet.prototype._highlightAllSnippets()}})})},e.Snippet.prototype.afterSave=function(e){e.removeClass("new-snippet"),e.removeAttr("data-new-snippet"),Inkshares.Snippet.prototype.newSnippet()},e.Snippet.prototype.setSnippets=function(){$(document).ready(function(){Inkshares.Snippet.prototype._placeAllSnippets(),Inkshares.Snippet.prototype._highlightAllSnippets()}),$(window).resize(function(){Inkshares.Snippet.prototype._placeAllSnippets()})},e.Snippet.prototype._placeAllSnippets=function(){$("[data-parent-id]").each(function(){Inkshares.Snippet.prototype._placeSnippet(this)})},e.Snippet.prototype._highlightAllSnippets=function(){$(".highlight").removeClass("highlight"),$("[data-parent-id]").each(function(){Inkshares.Snippet.prototype._highlightSnippet(this)})},e.Snippet.prototype._placeSnippet=function(e){var t=$(e).attr("data-parent-id"),n=$("[data-id="+t+"]");n.length>0&&$(e).removeClass("hidden").css("top",n.offset().top).appendTo("body")},e.Snippet.prototype._highlightSnippet=function(e){var t=$(e).attr("data-parent-id"),n=$(e).attr("data-full-snippet");n.length>0&&$("[data-id="+t+"]").highlight(n)}}),ns("Inkshares",function(e){e.StoryMachine=function(){},e.StoryMachine.prototype.initializeMachine=function(){var e=this;e.getProject(),$("[data-action=next]").on("click",function(t){t.preventDefault(),e.getProject()})}
276,e.StoryMachine.prototype.getProject=function(){var e=$("[data-behavior=stack-container]");$("[data-behavior=project-card]").removeClass("active"),$.ajax({url:e.data().url,context:e,success:function(t){$("[data-behavior=load-throb]").removeClass("spin"),$(e).prepend(t);var n=$(e).find("[data-behavior=project-card]").first();$(n).slideDown(500),$(".btn-next-story").removeClass("disabled")}})},Inkshares.StoryMachine.prototype.initializeActions=function(t){var n=this;e.StoryMachine.prototype.initializeIgnore(t),e.StoryMachine.prototype.initializePreview(t),$("[data-action=next], [data-action=next] a").on("click",function(){var e=$(this).siblings("[data-action=next]");$(e).addClass("disabled");var t=$(this).hasClass(".disabled"),r=$(this).parents("[data-behavior=project-card]").hasClass("active");!t&&r&&($("[data-behavior=load-throb]").addClass("spin"),n.getProject())})},e.StoryMachine.prototype.initializeIgnore=function(t){$("[data-ignore="+t+"]").on("click",function(n){n.preventDefault();var r=$(this);$.ajax({url:r.attr("href"),method:"POST",context:r,success:function(n){$("[data-ignore="+t+"]").replaceWith(n),e.StoryMachine.prototype.initializeUnignore(t)}})})},e.StoryMachine.prototype.initializeUnignore=function(t){$("[data-ignore="+t+"]").on("click",function(n){n.preventDefault();var r=$(this);$.ajax({url:r.attr("href"),method:"POST",context:r,success:function(n){$("[data-ignore="+t+"]").replaceWith(n),e.StoryMachine.prototype.initializeIgnore(t)}})})},e.StoryMachine.prototype.initializePreview=function(e){$("[data-preview-id="+e+"]").on("click",function(t){t.preventDefault();var n=$(this),r=$("[data-preview-modal="+e+"]");$(r).modal("show"),$.ajax({url:n.attr("href"),context:r}).done(function(e){$(this).find("[data-spinner]").addClass("hidden"),$(r).find("[data-preview=modal-body]").append(e)}).fail(function(){$(r).find("[data-preivew=modal-body]").html("Something went wrong. If problem persists send us an email: [email protected]")})}),$("[data-preview-modal="+e+"]").on("hidden.bs.modal",function(){$(this).find(".modal-body").html(""),$(this).find("[data-spinner]").removeClass("hidden")})}}),ns("Inkshares",function(e){e.StoryTags=function(){},e.StoryTags.prototype.initializeTag=function(e){var t=$('[data-behavior=associate-story-tag][data-st-url="'+e+'"]');t.tooltip({delay:{show:150},trigger:"hover"}),t.one("click",function(){var t=$(this);t.tooltip("hide"),$.ajax({url:e,method:t.data().stState,context:t,success:function(e){t.replaceWith(e)},error:function(){}})})}}),ns("Inkshares",function(e){e.TabbedNav=function(){this._mobileMenu()},e.TabbedNav.prototype._mobileMenu=function(){function e(){var e=$(".tabbed-nav-content");e[0].offsetWidth<n()&&($("[data-link=more]").removeClass("hidden"),$(t().get().reverse()).each(function(){return!!$(this).hasClass("mobile-more")||n()>e[0].offsetWidth&&$(this).appendTo($("[data-behavior='mobile-dropdown']"))}))}function t(){return $(".tabbed-nav-content > .nav-item")}function n(){return t().map(function(){return this.offsetWidth}).toArray().reduce(function(e,t){return e+t},0)}e(),$(window).on("resize",e())}}),ns("Inkshares",function(e){e.Task=function(){var e=this;this.observeUpdate(),this.countTasks(),$(".dropdown-menu .task").click(function(t){$(this).children().first().hasClass("ready")||t.stopPropagation(),e.countTasks()})},e.Task.prototype.observeUpdate=function(){var e=this;$("[data-behavior=update-task]").each(function(){e.updateTask($(this).attr("data-id"),$.parseJSON($(this).val()))}),$("[data-behavior=update-task]").on("click",function(t){t.preventDefault(),$.ajax({method:"put",url:"/tasks/"+$(this).attr("data-id"),data:{is_complete:!$.parseJSON($(this).val())},format:"json",success:function(t){e.updateTask(t.id,t.is_complete)}})})},e.Task.prototype.updateTask=function(e,t){$task=$("[data-id="+e+"]"),$task.prop("checked",t),$task.val(t),t?$task.next().addClass("completed"):$task.next().removeClass("completed")}
276,e.Task.prototype.countTasks=function(){var e=$(".task input").length-$(".task input:checked").length;$(".badge-tasks").text(e),0!=e?$('[data-behavior="ready-to-crowdfund"]').addClass("disabled btn-disabled").removeClass("ready"):$('[data-behavior="ready-to-crowdfund"]').removeClass("disabled btn-disabled").addClass("ready")}}),ns("Inkshares.Timezone",function(e){e.setStandardGMTOffset=function(){if(!$.cookie("GMTOffset")){var e=new Date,t=new Date(e.getFullYear(),0,1),n=new Date(e.getFullYear(),6,1);hourDelta=Math.max(t.getTimezoneOffset(),n.getTimezoneOffset())/60;var r=new Date;r.setTime(r.getTime()+18e5),$.cookie("GMTOffset",hourDelta-2*hourDelta,{path:"/",expires:r})}}}),ns("Inkshares",function(e){e.TopReaders=function(){this.observeLoadFeed()},e.TopReaders.prototype.observeLoadFeed=function(){$("body").on("click","[data-behavior=data-load-readers]",function(t){return t.stopPropagation(),$(this).addClass("disabled").text("Retrieving..."),url=$(this).attr("href"),e.TopReaders.prototype.getTopReaders(url),!1})},e.TopReaders.prototype.getTopReaders=function(e){$.ajax({type:"GET",url:e,dataType:"html",success:function(e){$("[data-behavior=data-load-readers]").hide(),$("[data-behavior=top-readers-list]").last().append($(e))}})}}),ns("Inkshares.Tree",function(e){e.initialize=function(){$("[data-behavior=tree-data]").jOrgChart({chartElement:"#tree",dragAndDrop:!1,chartClass:"tree"})}}),ns("Inkshares.User",function(e){e.fields=function(){$("[data-editable='true']").keypress(function(e){13==e.keyCode&&e.preventDefault()})},e.testUserEmail=function(e){return validationResult={isGoodFormat:!0,isUnique:!0,isLoggedIn:!1,isConfirmed:!1},$.ajax({type:"get",async:!1,url:"/api/test_user_email",data:{email:e},success:function(e){validationResult.isGoodFormat=!e.invalid,validationResult.isUnique=e.unique,validationResult.isLoggedIn=e.logged_in,validationResult.isConfirmed=e.confirmed}}),validationResult}}),ns("Inkshares.Utility",function(e){e.fuzzyMatch=function(e,t){if(t.length>0&&e.length>0)return t=t.toLowerCase(),e=e.toLowerCase(),t=t.split("").reduce(function(e,t){return e+".*"+t}),new RegExp(t).test(e)},e.detectIE=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)},e.numberWithCommas=function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},e.submitOnChange=function(){$("[data-behavior=submit-on-change]").on("change",function(){$(this).parents("form").submit()})},e.parseParams=function(e){if(e==undefined)e=location.search.substr(1);e.split("?").length>1&&(e=e.split("?")[1]);var t={};return e.split("&").forEach(function(e){if(e.split("=").length>1){var n=e.split("=");t[n[0]]=n[1]}}),t},e.encodeParams=function(e){return $.map(e,function(e,t){if(e&&e.length>0)return"&"+t+"="+e}).join("")},e.autocomplete=function(e){$("[data-autocomplete]").each(function(){var t=$(this).data().delimiter;t==undefined&&(t=",");var n=this,r=$(this).attr("data-autocomplete").split(t);e?$(this).autocomplete({minLength:0,source:function(e,t){t($.ui.autocomplete.filter(r,e.term.split(/,\s*/).pop()))},focus:function(){return!1},select:function(e,t){var n=this.value.split(/,\s*/);return n.pop(),n.push(t.item.value),n.push(""),this.value=n.join(","),!1}}):$(this).autocomplete({source:r,minLength:0,select:function(){var e=new CustomEvent("autocomplete:selected",{detail:"A selection was made"});n.dispatchEvent(e)}}),e||(Inkshares.Utility._handleFocus($(this)),Inkshares.Utility._enforceCompliance($(this),r))})},e._enforceCompliance=function(e,t){$(e).keyup(function(){var n=$(this).val(),r=n.length;for(i=0;i<t.length;i++)if(n.toLowerCase()===t[i].toLowerCase().substr(0,r))return;$(e).empty().val(n.substr(0,r-1))})},e._handleFocus=function(e){$(e).on("click focus",function(){$(this).autocomplete("search","")})},e.countWords=function(e){return 0==e.trim().length?0:(words=e.match(/\s+/g)?e.match(/\s+/g).length:0,+words)},e.nowInRuby=function(){var e=new Date,t=e.getDate(),n=e.getMonth()+1;return e.getFullYear()+"-"+n+"-"+t},e.renderErrors=function(e){function t(e,t){var n;n='<div class="error-message">'+e+"</div>",$($("[data-field*='["+t+"]']")[0]).parent().addClass("has-error").append(n)}_.each(e,t)},e.disableAfterClick=function(e){$(e).click(function(e){$(e.currentTarget).prop("disable",!0),$(e.currentTarget).fadeTo("slow",.33)})},e.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},e.maxWordCounter=function(){var e=function(e){var t=e.attr("data-max-words"),n=e.val()?e.val():e.text(),r=Inkshares.Utility.countWords(n),i=$(".word-count-container",e.parent()).length>0?$(".word-count-container",e.parent()):$(".word-count-container"),o=$(".word-count-max",i),a=$(".word-count-target",i);return o.text(t),a.html(r),i.removeClass("warning stop"),e.removeClass("warning stop"),r/+t>.98&&(i.addClass("warning"),e.addClass("warning"),r/+t>=1&&(i.removeClass("warning"),i.addClass("stop"),e.removeClass("warning"),e.addClass("stop"))),r-+t};$(".word-count-source").each(function(){e($(this))}),$(".word-count-source").on("focus",function(){($(".word-count-container",$(this).parent()).length>0?$(".word-count-container",$(this).parent()):$(".word-count-container")).fadeIn(500).removeClass("hidden")}),$(".word-count-source").on("input",function(){e($(this))})},e.commaSeparateNumber=function(e){for(;/(\d+)(\d{3})/.test(e.toString());)e=e.toString().replace(/(\d+)(\d{3})/,"$1,$2");return e},e.popover=function(){$("[data-toggle=popover]").popover({html:!0,trigger:"hover",delay:{show:800,hide:100}})},e.charCounter=function(){$field=$("[data-behavior~=counter]"),$.fn.calcChars=function(){if($that=$(this),maxlength=$(this).attr("maxlength"),$that.is("textarea, input"))var e=$that.val().length;else if($that.text().length>0)e=$that.text().trim().replace("\r\n","").length;else if($that.val().length>0)e=$that.val().trim().replace("\r\n","").length;else if(0==$that.text().length)e=0;var t=+maxlength-+e;$sibs=$(this).siblings(".counter-container"),$sibs.children(".counter").text(t),+t/+maxlength<.2?($sibs.addClass("warning"),+t<=0?$sibs.addClass("stop"):$sibs.removeClass("stop")):$sibs.removeClass("warning stop")},$field.each(function(){$(this).calcChars()}),$field.on("keyup change",function(){$(this).calcChars()})},e.scrubNumber=function(e){return e?e.replace(/[^0-9]/g,""):null},e.radio=function(){var e=function(e){$captions=$(e).parents(".radio-group").siblings(".value-captions"),$(e).parents(".radio-group").find(".radio-overlay").removeClass("radio-checked"),$(e).siblings(".radio-overlay").addClass("radio-checked"),$captions.find(".value-caption").addClass("hidden"),$captions.find("[data-value="+$(e).val()+"]").fadeIn(250).removeClass("hidden")};$radios=$("input[type=radio]"),$radios.css("opacity","0").after($("<div>").addClass("radio-overlay")),$("[type=radio]:checked").siblings(".radio-overlay").addClass("radio-checked"),$(".radio-group").each(function(){e($(this).find("input:radio:checked"))}),$radios.on("change",function(){e($(this))}),$(".radio-group").append($("<div>").addClass("radio-track"))},e.tableSorter=function(e){e.tablesorter({textExtraction:function(e){var t=$(e).attr("data-sort-value");return void 0!==t&&!1!==t?t:$(e).text()}}),$("[data-sort-first]").index()>-1&&e.trigger("sorton",[[[$("[data-sort-first]").index(),0]]])},e.escapeNewline=function(e){return e.replace(/\r/g,"%0D").replace(/\n/g,"%0A")},e.getViewportDimensions=function(){var e,t;return"undefined"!=typeof window.innerWidth?(e=window.innerWidth,t=window.innerHeight):"undefined"!=typeof document.documentElement&&"undefined"!=typeof document.documentElement.clientWidth&&
2760!=document.documentElement.clientWidth?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):(e=document.getElementsByTagName("body")[0].clientWidth,t=document.getElementsByTagName("body")[0].clientHeight),[e,t]}}),ns("Inkshares",function(e){e.Video=function(e){this.afterUploadCallback=e||this.insertVideo,this.observeVideoUpload(),this.observeVideoLinkProcess(),this.observeDeleteVideo(),this.observeResize()},e.Video.prototype.observeVideoLinkProcess=function(){var e=this;$("[data-behavior=process-video-link]").click(function(){$("input[data-behavior=video-url]").val($("[data-behavior=modal-video-url]").val()),e.upload()})},e.Video.prototype.observeDeleteVideo=function(){var e=this;$("body").on("click","[data-behavior=delete-video]",function(t){t.preventDefault(),$.ajax({type:"delete",url:"/videos/"+$(this).attr("data-video-id"),datatype:"html",success:function(t){e.insertVideo(t)}})})},e.Video.prototype.observeResize=function(){$.embedly.defaults.key="30f95ff89b6b47348c61a3ab2ade6afa",$("[data-behavior~=embeded-video]").embedly({display:function(e){if("video"===e.type||"rich"===e.type){var t=(e.height/e.width*100).toPrecision(4)+"%",n=$('<div class="responsive-object">').css({paddingBottom:t});n.html(e.html),$(this).replaceWith(n)}}})},e.Video.prototype.observeVideoUpload=function(){var e=this,t=$("[data-behavior=video-file-upload]");$("[data-behavior=upload-video]").click(function(){return t.trigger("click"),!1}),$(t).change(function(t){var n=$(t.currentTarget);if(n[0].files.length&&window.FileReader){var r=n[0].files[0],i=new FileReader;i.readAsDataURL(r),i.onloadend=function(){e.upload()}}})},e.Video.prototype.upload=function(){var e=this,t=new FormData,n=$("[data-behavior=video-form]"),r=document.getElementById("video-file-upload");$("input[type='hidden']",n).each(function(){t.append($(this).attr("name"),$(this).val())}),r&&r.files.length>0&&t.append(r.getAttribute("name"),r.files[0]),$.ajax({type:n.attr("method"),url:n.attr("action"),data:t,datatype:"html",cache:!1,processData:!1,contentType:!1,success:function(t){e.afterUploadCallback(t)},error:function(t){e.insertErrors(t.responseText)}})},e.Video.prototype.insertVideo=function(e){$("[data-behavior=video-content]").html(e)},e.Video.prototype.insertErrors=function(e){$("[data-behavior=upload-controls]").append(e)}}),ns("Inkshares.WritingSamples",function(e){e.timeoutHandle=null,e.initialize=function(){var e=this;$("[data-behavior=scrape-url]").keyup(function(){null!=e.timeoutHandle&&clearTimeout(e.timeoutHandle),e.startScrapeTimeout($(this))})},e.startScrapeTimeout=function(e){this.timeoutHandle=setTimeout(function(){this.scrapeUrl(e)}.bind(this),500)},e.scrapeUrl=function(e){var t=this,n=e.attr("data-sequence"),r=$("[data-writing-sample-sequence="+n+"]"),i=r.find("input[data-behavior=scrape-url]").val();$.ajax({type:"get",url:"/writing_samples",data:{url:i},dataType:"json",success:function(e){if(e.title){if($(r).find("[data-editable]").attr("data-editable",!0),Inkshares.Editable.makeEditable(),$(r).find("[data-attribute=title]").text(e.title),e.description&&e.description.trim().length>0)$(r).find("[data-attribute=sample]").html(e.description);else{var n=$(r).find("[data-attribute=sample]");n.html(n.attr("data-default-value"))}t.setDefaultImage(r,e),$(r).find("[data-behavior=explanation]").remove(),$(r).find("[data-behavior=meta]").removeClass("hidden")}},complete:function(){r.find("input[data-attribute=url]").val(i)}})},e.setDefaultImage=function(e,t){t.image&&t.image.length>0?(this.setMainImage(e,t.image),t.images.push(t.image),this.inspectImages(e,t.images)):t.images.length>0?(this.setMainImage(e,t.images[0]),this.inspectImages(e,t.images)):e.find("input[data-attribute=photo]").attr("data-editable",!1)},e.setMainImage=function(e,t){e.find("[data-attribute=photo] img").attr("src",t),e.find("input[data-attribute=photo]").val(t)},e.inspectImages=function(e,t){var n=this,r=t,i=0;$.each(t,function(o,a){var s=new Image;s.onload=function(){s.width<75&&(r=$(r).filter(function(e,t){return t!==s.src}).toArray()),++i===t.length&&n.enableImageNav(e,r)},s.src=a})},e.enableImageNav=function(e,t){var n=this,r=e.find(".arrows"),i=0;1==t.length?r.addClass("hidden"):(r.find("[data-behavior=previous]").on("click",function(){return i=0==i?t.length-1:i-1,n.setMainImage(e,t[i]),!1}),r.find("[data-behavior=next]").on("click",function(){return i=i==t.length-1?i=0:i+1,n.setMainImage(e,t[i]),!1}),r.removeClass("hidden"))}});
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.